-
Notifications
You must be signed in to change notification settings - Fork 324
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
Ensure fieldset never exceeds max-width #1269
Ensure fieldset never exceeds max-width #1269
Conversation
a40e67c
to
de6c1a1
Compare
Rebased with |
margin: 0; | ||
padding: 0; | ||
border: 0; | ||
@include govuk-clearfix; | ||
} | ||
|
||
// Fix for Firefox < 53 |
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.
Given Firefox 53 was released in April 2017 and we're now on version 66 I think we can probably omit this? On GOV.UK, 6.18% of Firefox users were using a version older than 53, which represents about 0.29% of the total traffic.
Thoughts?
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.
@36degrees Honestly I'll leave this one down to you and the team. I was stung many times in my career by Firefox fieldset oddities so maybe I'm emotionally attached 😁
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.
Actually, whilst the default browser was changed to IE11 a few months ago, DWP Jobcentre work coaches and other staff still have access to Firefox 45 ESR.
It's included in various automated tests.
Is that reason to keep it? Thanks
Including workaround for Firefox < 53
de6c1a1
to
0f97d84
Compare
@36degrees Just the last review point to address now: #1269 (comment) Let me know if I should remove the Firefox < 53 fix. |
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, @colinrotherham 👍
This ended up in the release notes for v2.10, but it hasn't gone out yet
Move changelog entry for #1269 to correct place
- Add new secondary and warning button variants ([PR #1207](alphagov/govuk-frontend#1207)) - Add new govuk-shade and govuk-tint functions for creating shades and tints of colours. ([PR #1207](alphagov/govuk-frontend#1207)) - Add support for custom row classes on the summary list component (including support for some rows without action links) ([PR #1259](alphagov/govuk-frontend#1259)) - Ensure fieldset never exceeds max-width This fix ensures that both WebKit/Blink and Firefox are prevented from expanding their fieldset widths to the content's minimum size. This was preventing `max-width: 100%` from being applied to select menus inside a fieldset. See discussion in ["Reset your fieldset"](https://thatemil.com/blog/2015/01/03/reset-your-fieldset/) and raised by [issue #1264](alphagov/govuk-frontend#1264) ([PR #1269](alphagov/govuk-frontend#1269)) - Add various fixes to the summary list component: 1. Fixes the 1px row height change when borders are removed Padding is now adjusted by 1px instead 2. Fixes the text alignment when the actions column isn't added So the key column always stays at 30% width ([PR #1259](alphagov/govuk-frontend#1259)) https://github.com/alphagov/govuk-frontend/releases/tag/v2.11.0
This fix ensures that both WebKit/Blink and Firefox are prevented from expanding their fieldset widths to the content's minimum size.
Online demo
https://tourmaline-spoonbill.glitch.me/
This was preventing
max-width: 100%
from being applied to select menus inside a fieldset. There's further discussion in "Reset your fieldset" and raised by @kr8n3r in issue #1264.Due to Firefox's legacy fieldset behaviour, I've also added a workaround for Firefox < 53.
It uses
x:-moz-any-link
to make the snippet Firefox-only, but with@supports not (caret-color: auto)
to exclude Firefox >= 53 when caret-color support was added.