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

Add explicit width to summary list row with 'no actions' pseudo-element #2515

Merged
merged 2 commits into from
Jan 25, 2022

Conversation

domoscargin
Copy link
Contributor

When a summary list row has no actions, it gets an after pseudoelement that adds an empty table cell, so that row borders are drawn correctly.

If the first row has no actions, it spaces itself automatically unless a width is specified for the pseudoelement. This then cascades to the rest of the summary list, and the actions column on every row takes up too much space, clipping content in other columns.

This can be solved by explicitly setting a width on the pseudoelement.

Additionally, we don't need this pseudoelement on widths below tablet, as the summary list cells split onto separate rows.

Closes #2495

…"after"

When a summary list row has no actions, it gets an `after` pseudoelement that adds an empty table cell, so that row borders are drawn correctly.

If the first row has no actions, it spaces itself automatically unless a width is specified for the pseudoelement. This then cascades to the rest of the summary list, and the actions column on every row takes up too much space, clipping content in other columns.

This can be solved by explicitly setting a width on the pseudoelement.

Additionally, we don't need this pseudoelement on widths below tablet, as the summary list cells split onto separate rows.
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2515 January 25, 2022 10:07 Inactive
@36degrees 36degrees self-requested a review January 25, 2022 10:16
@fofr
Copy link
Contributor

fofr commented Jan 25, 2022

Thank you @domoscargin 🎉

@36degrees
Copy link
Contributor

Needs a changelog entry, but otherwise this is looking good to me 👍🏻

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2515 January 25, 2022 11:22 Inactive
@domoscargin
Copy link
Contributor Author

domoscargin commented Jan 25, 2022

Needs a changelog entry, but otherwise this is looking good to me 👍🏻

Done!

@domoscargin domoscargin merged commit 7eecbc6 into main Jan 25, 2022
@domoscargin domoscargin deleted the bk-incorrect-content-width-summary-list-row-2495 branch January 25, 2022 11:59
@EoinShaughnessy EoinShaughnessy changed the title Add explicit width to summary list row with no actions pseudoelement Add explicit width to summary list row with 'no actions' pseudo-element Feb 1, 2022
@owenatgov owenatgov mentioned this pull request Feb 8, 2022
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.

Incorrect content width on summary list rows when not all rows have actions
4 participants