-
Notifications
You must be signed in to change notification settings - Fork 15
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
Upgrade to LGDS 9.0 to reset prose styling #1207
Conversation
b45f4dd
to
0ef8137
Compare
Hey, @aduth - I've noted several quirks in the table chart. The impact of prose styling becomes more apparent on pages that aren't long-form content like Policy or Help Center articles. In the Policy and Help Center articles, the prose styling update is minimal but does enhance, so these look good to me. Happy to discuss more in this issue or meet if it's easier. |
@nickttng Thanks for taking a detailed look!
Yeah, I think this would be related to the note in the original comment about "use a USWDS configurable value 1.75 value rather than an ad-hoc 1.875rem", though in practice I see it's actually
I think part of the issue here is that Prose component should be the immediate wrapping element for content sections, since it applies many of its styles using CSS child selectors. Since the substitution to use
This is another quirk of how prose heading styles are applied with CSS next-sibling selectors, adding margin because there's a hidden alert banner on the page that's shown during maintenance windows (see screenshot in #1023). Ideally USWDS could account for hidden content, but I'll see if I can come up with another workaround. Typically if the heading were the first content, it wouldn't have a top margin. |
0ef8137
to
7285229
Compare
@nickttng I pushed up a few changes which should hopefully resolve some of the issues you identified:
|
Thank you for these. I'll take another detailed look in the next few days |
@aduth The changes look good. One last question: Do you have a stance on having a max-width for list items? In this screenshot, the list width in the preview (right side) extends further than the list width on the current site (left side). Several lines have a number of characters with more than 80 characters per WCAG SC 1.4.8
Is it possible to set a width with 80 characters or less per line? |
@nickttng That's a good catch. It looks like early on in this pull request I overrode the Edit: Actually, I think the |
@aduth Yes, I think so. Is the impact on paragraphs already reflected in the current build? (I think so, but want to double check.) |
Yep, it's already present in the preview. For example, you can see the content is slightly narrower on policy pages between the preview and production.
|
The first line of the narrower version has a character count of Also, any concern with the additional white spacing between the main content and the side navigation? |
@nickttng I think I prefer the narrower versions as being consistent with our help articles, being conformant with WCAG 1.4.8, and aligning to USWDS defaults.
Not especially concerned, especially since this is now consistent with the amount of whitespace that already exists on help articles that have a similar side navigation. If we did have concerns, I'd wonder if we should (separately) reevaluate if the side navigation ought to be shown on the left instead of on the right, similar to what we're doing on the developer site redesign (example). |
Narrower version, then. 👍🏼
I agree. It'd be helpful to have the side nav on the left to better and quickly support users with orientation of site/page whereabout. Should we treat this as a separate work/topic to discuss what it involves in making it happen? |
Yep, that makes sense to me 👍 |
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.
Appreciate your work here!
7f5d88c
to
b088060
Compare
@nickttng FYSA I've updated this with the final release of LGDS 9.0. I added a small revision to icon lists in the Accepted Identification Documents pages after noticing the default USWDS styling removes margins from icon lists in prose content, which was causing it to bump very close to the alert on those pages. I'll also plan to seek a technical review here. |
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.
LGTM
See: #1207 (comment) Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
See: #1207 (comment) Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
7429bd7
to
7466703
Compare
I fixed up a couple more items in some final QA I ran over the preview. Also rebased to simplify slightly with the changes in #1221 being merged.
I also noticed that the reduction of the content width doesn't apply to non-simple content such as alert banners, which can stand out a bit. @nickttng not sure how you feel about this, and maybe it's something we can follow-up separately. We could enforce a maximum width here as well, though it seems like something we may want to do from the design system, and perhaps more holistically than just one or two components? Example: |
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.
LGTM, following up in a separate PR for max text width inside alerts seems fine to me
@aduth +1 to zach's on following up separately. we can discuss about if or how to approach it holistically at our upcoming LGDS office hours. |
* Upgrade to LGDS 9.0 to reset prose styling * Apply use-prose targeted to immediate content parent * Remove alert element outside maintenance window * Style page content section as prose * Remove text measure override Restore max line width within prose * Update to LGDS 9.0 final release * Update import for navigation component * Refine margins for prose icon lists * Add comment listing include parameters See: #1207 (comment) Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com> * Restore link styling to "Back to top" link * Restore link styling for help articles * Use common "Back to top" link styling for partners --------- Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
* Upgrade to LGDS 9.0 to reset prose styling * Apply use-prose targeted to immediate content parent * Remove alert element outside maintenance window * Style page content section as prose * Remove text measure override Restore max line width within prose * Update to LGDS 9.0 final release * Update import for navigation component * Refine margins for prose icon lists * Add comment listing include parameters See: #1207 (comment) Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com> * Restore link styling to "Back to top" link * Restore link styling for help articles * Use common "Back to top" link styling for partners --------- Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
* Upgrade to LGDS 9.0 to reset prose styling * Apply use-prose targeted to immediate content parent * Remove alert element outside maintenance window * Style page content section as prose * Remove text measure override Restore max line width within prose * Update to LGDS 9.0 final release * Update import for navigation component * Refine margins for prose icon lists * Add comment listing include parameters See: #1207 (comment) Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com> * Restore link styling to "Back to top" link * Restore link styling for help articles * Use common "Back to top" link styling for partners --------- Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
🛠 Summary of changes
Updates to
@18f/identity-design-system@9.0.0-beta.2
(currently prerelease), which includes changes to reset prose styling. The initial implementation of this site included custom variant of the prose styles, presumably to work around some of the undesirable implications of the original styles.As a draft, the intent is to assess potential impact and whether additional changes are necessary to the design system revisions before a final 9.0.0 release (as described at 18F/identity-design-system#390 (comment)).
This also reconfigures line-height to use a USWDS configurable value
1.75
value rather than an ad-hoc1.875rem
, which may result in a slight reduction in line height.📜 Testing Plan