-
Notifications
You must be signed in to change notification settings - Fork 38
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
Tidy up and optimise imports #118
Conversation
Neither of these font files are included anywhere. The font is provided by GOV.UK Frontend.
This selectively imports only the components that we actually need for the tech docs.
@import "govuk/components/input/input"; | ||
@import "govuk/components/tag/tag"; | ||
@import "govuk/components/skip-link/skip-link"; | ||
@import "govuk/components/warning-text/warning-text"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I've done this sort of thing in the past I've left in the full component list as comments for other developers ease of use but probably is an opinionated idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to leave as-is, mainly because I can see a list like that going out of date relatively quickly as we introduce new components etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's a good point 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 🚤
printable
mixin withgovuk-media-query
Reduces the CSS size from 145KB to ~98KB (before gzip)
(I attempted to do the same for the JavaScript, but couldn't get Frontend to play nicely with Sprockets, so that's a job for the future)