Skip to content
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 unnecessary select height adjustment #3424

Merged
merged 1 commit into from
Jun 5, 2023
Merged

Conversation

36degrees
Copy link
Contributor

What

Remove a height adjustment for selects that was needed because of an old issue in GOV.UK Frontend which has since been fixed.

Why

This was introduced in August 2019 to mitigate an issue in GOV.UK Frontend where the height of a select component was set in pixels, which meant it did not scale if users changed the text size in their browser.

That issue was fixed in GOV.UK Frontend and released as part of v3.3.0 in October 2019. Since then the height of a select component has been set in rem (as long as compatibility mode is not enabled) which means this adjustment can be removed.

Visual Changes

None

This was introduced in August 2019 [1] to mitigate an issue in GOV.UK Frontend where the height of a select component was set in pixels, which meant it did not scale if users changed the text size in their browser [2].

That issue was fixed in GOV.UK Frontend [3] and released as part of v3.3.0 [4] in October 2019. Since then the height of a select component has been set in rem (as long as compatibility mode is not enabled) which means this adjustment can be removed.

[1]: #1018
[2]: alphagov/govuk-frontend#1519
[3]: alphagov/govuk-frontend#1574
[4]: https://github.com/alphagov/govuk-frontend/releases/tag/v3.3.0#:~:text=Pull%20request%20%231574%3A%20Make%20form%20elements%20scale%20correctly%20when%20text%20resized%20by%20user.
@36degrees 36degrees requested a review from andysellick June 1, 2023 09:20
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-3424 June 1, 2023 09:20 Inactive
@36degrees
Copy link
Contributor Author

Looks like there is a slight visual difference being picked up by Percy. I believe this is because the height of the select changes from 40.66 to 40 (which then matches the height as it is in the Design System).

Screenshot 2023-06-01 at 10 25 35
Screenshot 2023-06-01 at 10 25 39

Copy link
Contributor

@andysellick andysellick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff. Thanks for spotting and resolving this 👍

@36degrees 36degrees merged commit e30741c into main Jun 5, 2023
@36degrees 36degrees deleted the remove-select-height-em branch June 5, 2023 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants