-
Notifications
You must be signed in to change notification settings - Fork 90
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
:last-child issue with margin-top (Form elements) #428
Comments
i believe you need to add padding-top to 0 in here |
Hi @mcgoooo I'm affraid that won't fix the issue. A little more work is involved to fix this. |
Hi @trevorsaint. To clarify are you saying the issue is the grey and red lines not being the same height? |
Hi @colmjude this has nothing to do with the red line. Please look at the gap from the Monthly radio upto the panel. The gap differs to that of weekly or fortnightly. It's essentially the last child. https://govuk-elements.herokuapp.com/form-elements/example-form-elements/ Scroll to Your income. Click Weekly, Fortnightly and look at the gap from the radio upto the panel. Now click on the last item Monthly. Hopefully you can see what I am talking about |
Thanks for clarifying, that is clear to see. Looks like it was introduced with this commit e4f47e0 but not fully clear why from the description. |
Fixes :last-child issue with margin-top (Form elements) #428
Looks good selecting the first item or the second item.
We have an issue when it comes to selecting the last item as shown below:
.form-group .panel-border-narrow:last-child
This includes margin-top of 10px which causes a visual issue as shown above.
How would you expect it to work?
I would not expect the last child in this instance to have a margin top attribute.
We could target .form-group within .form-group.
You can see this here: https://govuk-elements.herokuapp.com/form-elements/example-form-elements/
The text was updated successfully, but these errors were encountered: