-
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
LG-4226: Add wide button variants #192
Conversation
a38e3f1
to
c7c8732
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.
LGTM
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.
This looks great! To answer your qs:
- The Figma includes text "All buttons default to full width for mobile viewports". Should this behavior apply to the unmodified usa-button ("flexible") button, or only minimum-width and full-size buttons? The unmodified "flexible" button should be full width on mobile as well, in alignment with USWDS defaults
- The Figma mentions using btn-wide as the class for a minimum width button. As implemented here, I chose to follow the BEM convention as usa-button--wide. Is that okay? Yes, whatever class name makes the most sense with our conventions. Updated in Figma
- What specific breakpoint should mobile behavior stop taking effect (see USWDS "Utility breakpoints")? As implemented here is tablet. Yes, tablet (640px) seems to be our current main breakpoint in the IdP between mobile and desktop layouts, but lmk if you catch inconsistencies on this because that would be good to know.
- I included an explicit usa-button--full-width modifier to handle cases like in the IDP where we want full-width buttons on desktop viewports. Is that reasonable to include here, or should that be considered an exceptional case and custom to the IDP? Yes this is great! Updated in Figma
c7c8732
to
4e91e35
Compare
I checked on this more closely, and it appears that USWDS actually cuts over at https://github.com/uswds/uswds/blob/1f9bb1c/src/stylesheets/elements/_buttons.scss#L24-L26 I assume we'd probably want to match that. Edit: Updated in 3203f25. |
**Why**: Match USWDS cut-over. See: - https://github.com/uswds/uswds/blob/1f9bb1c/src/stylesheets/elements/_buttons.scss#L24-L26 - #192 (comment)
Adds two new button variants: 1. Minimum width occupies full width on mobile, and a minimum width on wider viewports 2. Full width always occupies full width
**Why**: Already full-width at small viewports
**Why**: Match USWDS cut-over. See: - https://github.com/uswds/uswds/blob/1f9bb1c/src/stylesheets/elements/_buttons.scss#L24-L26 - #192 (comment)
799041f
to
3203f25
Compare
Adds two new button variants:
Questions: (cc @anniehirshman-gsa)
usa-button
("flexible") button, or only minimum-width and full-size buttons?btn-wide
as the class for a minimum width button. As implemented here, I chose to follow the BEM convention asusa-button--wide
. Is that okay?tablet
.usa-button--full-width
modifier to handle cases like in the IDP where we want full-width buttons on desktop viewports. Is that reasonable to include here, or should that be considered an exceptional case and custom to the IDP?Screenshot:
Live Preview: https://federalist-2f194a10-945e-4413-be01-46ca6dae5358.app.cloud.gov/preview/18f/identity-style-guide/aduth-lg-4226-wide-button/components/buttons/#button-widths