-
Notifications
You must be signed in to change notification settings - Fork 17
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
Configure AssetHelper to load individual stylesheets #3200
Configure AssetHelper to load individual stylesheets #3200
Conversation
38b1599
to
019cab3
Compare
019cab3
to
54235da
Compare
54235da
to
96ba9e2
Compare
96ba9e2
to
48d7e89
Compare
48d7e89
to
0f20fce
Compare
0f20fce
to
955e8f5
Compare
955e8f5
to
bf84ac2
Compare
bf84ac2
to
9001d5f
Compare
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.
Looks good to me.
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 work! The changes look good to me, any thoughts I had are already covered in the "Anything else" section you provided in the PR description 👍
06d7a81
to
f74db2a
Compare
45c9bb1
to
4979ff4
Compare
4979ff4
to
43b7fcb
Compare
43b7fcb
to
fc05b3c
Compare
fc05b3c
to
4cd6ed5
Compare
- Hoist body content in application layout - Call AssetHelper helper `render_component_stylesheets` - Remove GOV.UK Component stylesheets from application stylesheet
Remove unused _margins.scss and replace with responsive spacing override class
4cd6ed5
to
a60c19b
Compare
What
https://trello.com/c/9RMdBVHj/1866-enable-individual-loading-of-stylesheets-in-collections
Changes to load component and view style sheets only required on the page being viewed. For example, CSS for "topics" only loads on the following pages:
Why
This reduces the amount of CSS required for each page and increases the ability of a browser to cache the stylesheets - this should mean a faster load time for both first time and repeat visitors.
See RFC #149 for more details.
Review URL(s)
Visual changes
None
Anything else
application.scss
imports custom margin helpers/helpers/_margins.scss
which I think could be replaced with Design System utility classes (with some very minor differences).application.scss
then only includes the following settings (below) which can be removed since they are included with_individual_component_support.scss
(imported fromgovuk_publishing_components
) andapplication.scss
can then be removed