-
Notifications
You must be signed in to change notification settings - Fork 334
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 Summary List action link alignment #2668
Conversation
0db63e1
to
5b3b57d
Compare
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.
Looks good to me! Would be good to get this in a Changelog entry before merging.
@vanitabarrett Would this be listed as a regular fix, or do we want to provide additional guidance about removing whitespace from within list items? |
@querkmachine I think it would just be listed as a regular fix? If we want to tell our users how to remove whitespace if they're not using Nunjucks macros I think we should consider either 1) having the flex fix in combination with the Nunjucks whitespace fix and/or documenting it somewhere a bit more permanent than the release notes |
Adds ':first-child)' to the disallow list for postcss-pseudo-classes, so PostCSS doesn't attempt to transform it and triggers an error.
Fixes the alignment on the Summary List component action links, if there are enough links to wrap onto multiple lines. It does this by reversing the side of the link that margin, padding and borders are applied to depending on the breakpoint. On mobile, links are left aligned with spacing and borders on the right. On tablet and above, links are right aligned with spacing and borders on the left.
Fixes errant whitespace causing one side of the separators appearing larger than the other.
f684468
to
1df31ba
Compare
When there are several action links in the Summary List component, the links become misaligned on large screens, due to the links being right-aligned and the separator being appended to the right of each link. Links are aligned correctly on narrow screens, as the links are left-aligned in that context.
Additionally, the spacing on each side of the separator is uneven due to extra whitespace being counted between each link.
This PR intends to fix these issues by:
Fixes #2281.
Comparisons
Small screens (modern browsers, IE11, IE10)
Large screens (modern browsers, IE11, IE10)
Large screens (IE9)
Flexbox is not supported by IE9, so the uneven spacing between separators is still present.
Large screens (IE8)
Neither flexbox, nor the
:first-child
and:last-child
pseudo-selectors, are supported in IE8.