Skip to content

[DO NOT MERGE] Impact header different image size - #5735

Draft
andysellick wants to merge 1 commit into
mainfrom
impact-header-prototype
Draft

[DO NOT MERGE] Impact header different image size#5735
andysellick wants to merge 1 commit into
mainfrom
impact-header-prototype

Conversation

@andysellick

@andysellick andysellick commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

What

  • modify the impact header on desktop to remove the specific sizing of the image to be square
  • the best way to do this without breaking any existing images seems to be to remove the height specifications and rely on the image dimensions
  • to allow for this we remove the vertical centering of the text on the left, and apply top padding instead
  • this allows us to refactor the caption markup so it sits beneath the image (previously this had to be separate because the expanded details element would cause the text on the left to move with the changing height of the overall component)

Why

Exploring design options so we can have landscape aspect ratio images in the impact header instead of squares.

Need to be aware of existing use like https://www.gov.uk/government/topical-events/youth-matters-national-youth-strategy

Visual changes

Image now sets the height of the component, as shown with this new example.

Screenshot 2026-08-14 at 13 55 27

The text changes position slightly as it is no longer vertically aligned to centre, but the nature of this change means it won't impact (no pun intended) existing instances of the component, like on https://www.gov.uk/government/topical-events/youth-matters-national-youth-strategy

Before After
Screenshot 2026-08-14 at 13 57 35 Screenshot 2026-08-14 at 13 57 40

@govuk-ci
govuk-ci temporarily deployed to govuk-frontend-app-pr-5735 August 14, 2026 12:58 Inactive
@govuk-ci
govuk-ci temporarily deployed to govuk-frontend-app-pr-5735 August 17, 2026 10:55 Inactive
@andysellick
andysellick force-pushed the impact-header-prototype branch from 2e0901c to b123e4e Compare September 7, 2026 15:21
@govuk-ci
govuk-ci temporarily deployed to govuk-frontend-app-pr-5735 September 7, 2026 15:21 Inactive
- modify the impact header on desktop to remove the specific sizing of the image to be square
- the best way to do this without breaking any existing images seems to be to remove the height specifications and rely on the image dimensions
- to allow for this we remove the vertical centering of the text on the left, and apply top padding instead
- this allows us to refactor the caption markup so it sits beneath the image (previously this had to be separate because the expanded details element would cause the text on the left to move with the changing height of the overall component)
@andysellick
andysellick force-pushed the impact-header-prototype branch from b123e4e to 05b3245 Compare September 7, 2026 15:24
@andysellick andysellick changed the title [DO NOT MERGE] Prototype impact header different image size [DO NOT MERGE] Impact header different image size Sep 7, 2026

@AshGDS AshGDS left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me 👍

}
}

.app-c-impact-header__image-thing {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will this class be renamed?

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