Use consistent inset padding across components#1737
Conversation
9aa20c1 to
b03478c
Compare
b03478c to
acc44cc
Compare
acc44cc to
6c607ff
Compare
6c607ff to
846d2ff
Compare
846d2ff to
f8fd933
Compare
f8fd933 to
e4d59ca
Compare
e4d59ca to
db3dee9
Compare
db3dee9 to
d8940ba
Compare
|
Happy with this as it stands @paulrobertlloyd ? I'm thinking about getting this into v11. |
Mostly. But one last thing… shouldn’t the padding for inset text align with that for details content and fields with an error, which share a very similar design? In which case, this would mean the left padding for inset text would be reduced to 16px. Before
After
Also, should we update the togglable overlay guides on this page so that they also visibly show the 24px inset size too? |
57e2690 to
d2f2fa6
Compare
Looking at them together, yes. But, when looked at alone, or alongside other components, I feel 16px is too close for the inset text. With such a heavy blue border the added empty space is needed to make the text not feel cramped, in my opinion. And I feel this trumps consistency with those two specific other components because they are less likely to be used right next to an inset text. Eg.
Yeah that'd be helpful 👍 --
This isn't great is it, thanks @colinrotherham. Maybe it wouldn't be crazy to have the tabs not align, to maximise available space. |
d2f2fa6 to
15d2584
Compare
|
15d2584 to
4f032f5
Compare
|
I've rebased this against #1961 and had another go at making pagination comply We've still got issues with Tabs spacing and I'm still not sure about inset text versus error summary spacing
|
beefa14 to
bac6737
Compare
4f032f5 to
770602c
Compare
bac6737 to
7131041
Compare
770602c to
bf4196d
Compare
Co-authored-by: Colin Rotherham <work@colinr.com>
bf4196d to
10cb376
Compare











Description
Fixes #1735.
Using 24px across the following components across all breakpoints:
File upload (#1556) will need the same values applied, once that is merged.
24px is a size that works well across all different components. It also works for components such as details and pagination where text with left padding can align with the global value, but not if it gets much bigger. While cards have reduced padding, this works better for cards within card groups with many columns.
I’ve added this as a global setting:
$nhsuk-inset-size.Take a look at the updated reference images for comparison.
In #1740 I added a page with components that have inset padding, and in this PR you can see this page with the inset spacing highlighted.
I’ve also aligned the design for mobile tab links to match that of the contents list; we may want to pull this out into a separate PR.
Checklist