Skip to content

Add a full width utility class for media#129

Merged
Demotive merged 1 commit intomainfrom
full-width-component
Aug 29, 2025
Merged

Add a full width utility class for media#129
Demotive merged 1 commit intomainfrom
full-width-component

Conversation

@Demotive
Copy link
Copy Markdown
Collaborator

@Demotive Demotive commented May 30, 2025

Allow media such as images to break horizontally out of the grid.

Add to a lone element (ie img) or a container (ie figure) -

<figure class="app-media--full-width">
  <img src="prototype-flow.png" alt="Diagram depicting the prototype user journey using sequential screen grabs from left to right.">
  <figcaption>The prototype journey from left to right, from calculator result to a 'finding services' loading screen.</figcaption>
</figure>
<figure class="app-media--full-width">
  <img src="prototype-flow.png" alt="Diagram depicting the prototype user journey using sequential screen grabs from left to right.">
</figure>

The .app-media--full-width element with remain at 92vw up to a max of 960px.

Screenshot showing 2 elements using the new css class, with the main grid container highlighted

@frankieroberto frankieroberto temporarily deployed to screening-de-full-width-2wnjup May 30, 2025 15:40 Inactive
@Demotive Demotive marked this pull request as draft August 29, 2025 14:16
@Demotive Demotive force-pushed the full-width-component branch from d8e6468 to ac8ab4c Compare August 29, 2025 14:18
@Demotive
Copy link
Copy Markdown
Collaborator Author

Rebased over the newer application.

Example using nunjucks:

{% from "nhsuk/components/images/macro.njk" import image as nhsukImage %}
{{ nhsukImage({
  classes: "app-media--full-width",
  src: "prototype-flow.png",
  alt: "Diagram depicting the prototype user journey using sequential screen grabs from left to right.",
  caption: "The prototype journey from left to right, from calculator result to a ‘finding services’ loading screen."
}) }}

@Demotive Demotive marked this pull request as ready for review August 29, 2025 14:21
@Demotive Demotive merged commit c96751f into main Aug 29, 2025
2 checks passed
@Demotive Demotive deleted the full-width-component branch August 29, 2025 15:11
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.

3 participants