nhsuk / nhsuk-frontend

NHS.UK frontend contains the code you need to start building user interfaces for NHS websites and services.
https://nhsuk.github.io/nhsuk-frontend/
MIT License
606 stars 106 forks source link

Update label margins to match fieldsets and align with GOV.UK #946

Closed edwardhorsford closed 2 months ago

edwardhorsford commented 2 months ago

Description

This updates the bottom margins of labels to better match those of legends. I've followed a bit of how GOV.UK structures these.

At the moment I think the label margins are overly large - too separated from the hint or inputs they relate to. GOV.UK doesn't have responsive margins for these - the label margins are all fixed and the same as the fieldset legends.

The only label that doesn't now match fieldset legends is the small size - where it follows the no modifier size 1.

XL label before xl-before

XL label after xl-after

L label before l-before

L label after l-after

M label before m-before

M label after m-after

S label before s-before

S label after s-after

No modifier label before no-modifier-before

No modifier label after no-modifier-after

Fixes #947

Checklist