-
Notifications
You must be signed in to change notification settings - Fork 333
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
Remove padding-right
from details component
#2312
Conversation
This was discussed in a thread asking why the right padding is present in the #govuk-design-system channel in x-gov Slack. I shared the question with designers in an internal Slack thread, @joelanman and @christopherthomasdesign agreed that it didn't need to be there. Looking at the git history, the right padding has been there since this component was added (see commit 2e6769a), with no reason given as to why it is there. |
The details component came from Elements, where it was known as hidden text. In Elements, it used the 'panel' styles which were shared with inset text and conditional reveals, so changes to those panel styles affected all three things. At one point, there was no right padding on the panel. However, this was changed in alphagov/govuk_elements@af2375b (part of alphagov/govuk_elements#106), when the spacing was adjusted 'so the padding is 15px on all sides'. As far as I can tell, there's been padding on all sides ever since. I do think this change makes sense though – it makes it consistent with the conditional reveals which don't have right padding either. |
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.
Thanks for this @edwardhorsford – are you able to add an entry to the changelog?
It'd also be really useful to include before/after screenshots in the PR description, if possible.
@36degrees updated description with your screenshots and added an entry in the changelog. |
Rebased against |
padding-right
from details component
The details element doesn't need
padding-right
- having it will mean contents don't line up nicely with the rest of the page.