Skip to content

Commit

Permalink
Merge pull request #3320 from alphagov/update-readme-to-include-asset…
Browse files Browse the repository at this point in the history
…helper

Update readme to include info on using AssetHelper
  • Loading branch information
MartinJJones authored Dec 4, 2023
2 parents 8b330d9 + 8bd7d68 commit 94b76f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Binary file added docs/images/individual-stylesheets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions docs/set-up-individual-component-css-loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ Use `yield` to add body content between `<body>` and `</body>`:
</head>
```

### Check stylesheets are loading individually

When the setup is complete, only the component stylesheets required to render the page are requested. For example, the screenshot below displays network activity for a [browse page e.g. benefits](https://www.gov.uk/browse/benefits) and shows separate network requests for the `browse`, `lead-paragraph` and `cards` stylesheets:

![Network requests for individual stylesheets](./images/individual-stylesheets.png)

## Why

See [RFC #149](https://github.com/alphagov/govuk-rfcs/pull/152) for more details about this approach.

0 comments on commit 94b76f6

Please sign in to comment.