Skip to content

Configure AssetHelper to load individual stylesheets#1622

Merged
jon-kirwan merged 2 commits intomainfrom
configure-asset-loading
Mar 30, 2023
Merged

Configure AssetHelper to load individual stylesheets#1622
jon-kirwan merged 2 commits intomainfrom
configure-asset-loading

Conversation

@kashifatcha
Copy link
Contributor

@kashifatcha kashifatcha commented Mar 29, 2023

What

https://trello.com/c/76GY8acK/1906-enable-individual-loading-of-stylesheets-in-feedback

Changes to load component and view style sheets only required on the page being viewed. For example, CSS for "radio" 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 only includes the following settings (below) which can be removed since they are included with _individual_component_support.scss (imported from govuk_publishing_components) and application.scss can then be removed
$govuk-new-link-styles: true;
$govuk-include-default-font-face: false;

@govuk-ci govuk-ci temporarily deployed to feedback-pr-1622 March 29, 2023 13:58 Inactive
@govuk-ci govuk-ci temporarily deployed to feedback-pr-1622 March 29, 2023 14:05 Inactive
@kashifatcha kashifatcha changed the title configure asset loader to load individual stylesheets Configure AssetHelper to load individual stylesheets Mar 29, 2023
@kashifatcha kashifatcha force-pushed the configure-asset-loading branch from 336b5ae to ab8e1f7 Compare March 29, 2023 15:02
@govuk-ci govuk-ci temporarily deployed to feedback-pr-1622 March 29, 2023 15:02 Inactive
Copy link
Contributor

@KludgeKML KludgeKML left a comment

Choose a reason for hiding this comment

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

Looks okay to me.

Copy link
Contributor

@MartinJJones MartinJJones left a comment

Choose a reason for hiding this comment

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

Changes look good to me 👍

@jon-kirwan jon-kirwan force-pushed the configure-asset-loading branch from ab8e1f7 to 15e0f2b Compare March 30, 2023 11:18
@govuk-ci govuk-ci temporarily deployed to feedback-pr-1622 March 30, 2023 11:18 Inactive
@jon-kirwan jon-kirwan force-pushed the configure-asset-loading branch from 15e0f2b to 1179ab6 Compare March 30, 2023 11:23
@govuk-ci govuk-ci temporarily deployed to feedback-pr-1622 March 30, 2023 11:23 Inactive
@jon-kirwan jon-kirwan merged commit 1937468 into main Mar 30, 2023
@jon-kirwan jon-kirwan deleted the configure-asset-loading branch March 30, 2023 11:35
Rosa-Fox added a commit that referenced this pull request Apr 12, 2023
Updated due to a rebase from the main branch which changed how CSS components are loaded.

The new way of loading individual components: https://github.com/alphagov/govuk_publishing_components/blob/main/docs/set-up-individual-component-css-loading.md

PR that introduced the change: #1622
Rosa-Fox added a commit that referenced this pull request Apr 12, 2023
Updated due to a rebase from the main branch which changed how CSS components are loaded.

The new way of loading individual components: https://github.com/alphagov/govuk_publishing_components/blob/main/docs/set-up-individual-component-css-loading.md

PR that introduced the change: #1622
Rosa-Fox added a commit that referenced this pull request May 5, 2023
Updated due to a rebase from the main branch which changed how CSS components are loaded.

The new way of loading individual components: https://github.com/alphagov/govuk_publishing_components/blob/main/docs/set-up-individual-component-css-loading.md

PR that introduced the change: #1622
Rosa-Fox added a commit that referenced this pull request May 31, 2023
Updated due to a rebase from the main branch which changed how CSS components are loaded.

The new way of loading individual components: https://github.com/alphagov/govuk_publishing_components/blob/main/docs/set-up-individual-component-css-loading.md

PR that introduced the change: #1622
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants