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

Fix text overflow bug in Firefox #1764

Merged
merged 1 commit into from
Jan 14, 2021
Merged

Conversation

andysellick
Copy link
Contributor

@andysellick andysellick commented Nov 4, 2020

What

Fix a layout bug in Firefox that was causing single column list items to column wrap into the next column. Wasn't occurring in any other browsers, because apparently only Firefox doesn't support the break-inside property, so this is a bit of a workaround, but including it for other browsers just in case.

Tested in Firefox, Chrome, Edge, everything back to IE8.

Why

The layout footer component is now being used live, in Accounts 😱

Visual Changes

Before:

Screenshot 2020-11-04 at 14 26 37

After:

Screenshot 2020-11-04 at 14 26 49

@bevanloon bevanloon temporarily deployed to govuk-publis-footer-com-dwqrsh November 4, 2020 14:31 Inactive
alex-ju
alex-ju previously approved these changes Nov 4, 2020
Copy link
Contributor

@alex-ju alex-ju left a comment

Choose a reason for hiding this comment

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

The fix seems to cover browsers well. I suggest linking this to an issue in govuk-frontend to keep track of it.

@bevanloon bevanloon temporarily deployed to govuk-publis-footer-com-dwqrsh November 5, 2020 09:59 Inactive
@36degrees
Copy link
Contributor

overflow: hidden causes the focus state to be clipped to the box for .govuk-footer__list-item:

Screenshot 2020-11-06 at 16 52 33

@andysellick
Copy link
Contributor Author

After almost completely forgetting about this PR, I've applied a far less complex fix. I've tested it in a ton of browsers and it seems to have solved the problem properly this time, but happy for further discussion.

Copy link
Contributor

@danacotoran danacotoran left a comment

Choose a reason for hiding this comment

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

This is a simple solution and it fixes the issue 💯

The only thing I think I should note is that changing the list items' display property to inline-block does slightly affect the overall spacing on the footer.

Screen.Recording.2021-01-14.at.15.05.35.mov

I don't think it's a significant enough issue to hold this back so I'm happy to approve.

@andysellick andysellick merged commit e92dbcb into master Jan 14, 2021
@andysellick andysellick deleted the footer-component-tweak branch January 14, 2021 15:19
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.

None yet

5 participants