alphagov / government-frontend

Serves government pages on GOV.UK
https://docs.publishing.service.gov.uk/apps/government-frontend.html
MIT License
52 stars 17 forks source link

Fix spacing around figure component #3259

Closed andysellick closed 3 months ago

andysellick commented 3 months ago

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

What / why

This fixes the spacing around the government-frontend figure component, specifically on mobile.

Example page with the problem: https://www.gov.uk/government/news/secretary-of-state-meets-first-and-deputy-first-ministers

Visual changes

Before (desktop) After (desktop)
Screenshot 2024-07-09 at 09 24 30 Screenshot 2024-07-09 at 09 23 37
Before (mobile) After (mobile)
Screenshot 2024-07-09 at 09 23 45 Screenshot 2024-07-09 at 10 41 06

Trello card: https://trello.com/c/03XY4VZm/236-no-padding-below-the-image-caption

andysellick commented 3 months ago

@maxgds here's a screenshot of the spacing reduced on mobile. Personally I think it looks a little tight (especially since the font size of the caption will increase from 14px to 16px once v5 is rolled out, making it the same size as the text of the article) but I'm not overly fussed, the important thing is having some space 😁

Now When v5 goes out
Screenshot 2024-07-09 at 10 41 06 Screenshot 2024-07-09 at 10 43 33