-
Notifications
You must be signed in to change notification settings - Fork 327
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
Improve word wrapping in summary list component #1220
Conversation
Use readable English to better highlight any issues with wrapping
Check how wrapping behaves in the context we expect.
In order to use overflow-wrap with table CSS we need to use a fixed layout. This means we can't rely on a table's automatic resizing, so we have to compromise with a larger 'actions' column that we have before.
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.
Generally looks a lot better to me 👍
Improvements most obvious in IE, Edge and Firefox.
I got an approval from @dashouse over Slack for this so I'm going to push forwards and get it merged thanks again for the great review @36degrees |
Need to add a CHANGELOG entry for this, will follow up in a second. |
Following the improvements to the GOV.UK frontend summary list component alphagov/govuk-frontend#1220 these changes have been applied.
Following the improvements to the GOV.UK frontend summary list component alphagov/govuk-frontend#1220 these changes have been applied.
Following the improvements to the GOV.UK frontend summary list component alphagov/govuk-frontend#1220 these changes have been applied.
Following the improvements to the GOV.UK frontend summary list component alphagov/govuk-frontend#1220 these changes have been applied.
Following the improvements to the GOV.UK frontend summary list component alphagov/govuk-frontend#1220 these changes have been applied.
This seems like a problem where we have to make some compromises.
The summary list currently wraps text in all browsers, but only in blink/webkit does it wrap entire words, all other browsers it can wrap mid word which can make it more difficult to read.
To make this better we want to try and use
overflow-wrap
which works cross browsers, however...In order to use
overflow-wrap
with table CSS we need to use a fixed layout since the summary list uses table CSS.This means we can't rely on a table's automatic resizing, so we have to compromise
with a larger actions column that we have before, so that we can have at least two actions on one line without the actions wrapping.
Welcome any input to an alternative that I may have missed.
I have also considered that this might be best solved with CSS Grid but have discounted that for now based on the support for browsers.
You can take a look at the two by comparing:
Before
Screenshots
After
Pros
Cons
Screenshots
Related links
Aims to resolve #1211