Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#392] Inline CSS dependencies. #402

Merged
merged 4 commits into from
Oct 6, 2024

Conversation

alan-cole
Copy link
Collaborator

@alan-cole alan-cole commented Oct 4, 2024

#392

Checklist before requesting a review

  • I have formatted the subject to include the issue number
    as [#123] Verb in past tense with a period at the end.
  • I have provided information in the Changed section about WHY something was
    done if this was a bespoke implementation.
  • I have performed a self-review of my code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run new and existing relevant tests locally with my changes,
    and they have passed.
  • I have provided screenshots, where applicable.

Changed

  1. Implemented the media query into ct-breakpoint and removed breakpoint-sass lib. On tests this built exactly as per before.
  2. Removed normalize lib. Integrated the useful parts including:
  3. Removing any IE fixes as Internet Explorer is not supported in civictheme.
  4. Removing any outdated fixes that no longer apply to modern browsers.
  5. Integrating any global styles (like box-sizing: border-box;) into components. A component should not rely on styles applied outside the scope of the component. This could lead to conflicts if used alongside other component systems, and also makes packaging discreet component styles difficult.

Known issues:

  1. Footer spacing is slightly smaller (within ~5px) - this may be attributed to the box-sizing change, however I was unable to track down what the cause was.
  2. Dev testing focused on what was rendered on the page, and there may be individual components that need further testing.
  3. There are some required common styles (html, and body) that will be moved into the Drupal theme, as they aren't related to a component that exists within civictheme. PR here: [CIVIC-1937] Add page level styles into Drupal theme. monorepo-drupal#1308 and should be merged before the UI Kit changes are merged.

Screenshots

Screen Shot 2024-10-04 at 13 39 00-fullpage

@alan-cole alan-cole self-assigned this Oct 4, 2024
@alan-cole alan-cole added the PR: Needs review Pull request needs a review from assigned developers label Oct 4, 2024
Copy link

github-actions bot commented Oct 4, 2024

@github-actions github-actions bot temporarily deployed to pull request October 4, 2024 06:51 Inactive
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 13.87%. Comparing base (7315692) to head (4cf5371).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #402   +/-   ##
=======================================
  Coverage   13.87%   13.87%           
=======================================
  Files          27       27           
  Lines        1290     1290           
  Branches      307      307           
=======================================
  Hits          179      179           
  Misses        894      894           
  Partials      217      217           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@richardgaunt richardgaunt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @alan-cole this is awesome - two depedencies removed.

@richardgaunt richardgaunt merged commit 9c1e70a into main Oct 6, 2024
7 checks passed
@richardgaunt richardgaunt deleted the feature/CIVIC-1937-inline-css-dependencies branch October 6, 2024 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Needs review Pull request needs a review from assigned developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants