-
Notifications
You must be signed in to change notification settings - Fork 110
Update table styles so nhsuk-table has bottom margin #1005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Might be worth opening a second PR to remove Do you know about this at all @anandamaryon1? |
Looks good to me, I've not seen the Perhaps leave it in for now. Based on this, the responsive table example will need both classes, so the block class adding too ( Note to self: will need to check service manual aligns. |
9ef85d5
to
a829a33
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 🙌
I've added regression test images and made a tweak below
Unfortunately requiring both nhsuk-table
and nhsuk-table-responsive
classes would be a breaking change for non-Nunjucks users, but this works:
- .nhsuk-table {
+ .nhsuk-table,
+ .nhsuk-table-responsive {
a829a33
to
2b40ea4
Compare
Updated the reference images again (for the new sizes) |
2b40ea4
to
ef0e99d
Compare
48b3915
ef0e99d
to
48b3915
Compare
Updated reference images again since #1170 merged |
Just reviewed this with @anandamaryon1 and we're going to get it merged Thanks @edwardhorsford |
48b3915
to
0ec0b0a
Compare
0ec0b0a
to
78e6adc
Compare
This fixes some inconsistency with the table styles.
The current table styles rely on a bottom margin being applied to the
table
element rather thannhsuk-table
. The responsive table variant resets this so it has no bottom margin.The styles include a
nhsuk-table-container
class that's presumably meant to wrap tables, but this is not used or documented on the design system site. I might guess it was added for a specific use case. For now I've left it, but teams shouldn't need to use it to get the correct bottom margin.This applies some basic styles to
nhsuk-table
similar to howgovuk-table
styles it. Ifnhsuk-table-container
can still be used.I think this should probably have no visual impact for most users. But if any had added extra margin to account for the responsive table not having margin, then that could double. It now sets the font too - which it's possible could conflict with a non standard font.