-
Notifications
You must be signed in to change notification settings - Fork 170
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
USWDS-Site - Card: Fix card grid presentation #2299
Conversation
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.
Ran into an issue trying to get my local to build. Also just left a question about the approach and the alternative you mentioned in the description.
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.
Added a possible alternative to adding more to custom SCSS.
@mejiaj @mahoneycm I added a note about why I didn't turn on the breakpoint via settings in this comment. Let me know if you see a better way to do this. |
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.
Hey Amy!
I found a way to achieve the same styles using the string replacement without the need for any scss changes. This route resolves the build errors and isolates the changes.
Let me know what you think about this approach!
The comment history here has gotten a bit jumbled, but I wanted to summarize the recent changes in this PR:
|
@mejiaj @mahoneycm ready for your re-review. Let me know if you have comments. |
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!
As long as we're ok with maintaining the CSS overrides, I think that this is a visual improvement to showcase cards 👍
- Cards break at logical breakpoints
- Cards do not feel two thing at any point
- No errors when running
npm run build:css
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, glad we were able to agree on a fix. Good to merge once builds pass.
Summary
Related issue
Related to #2323
Preview link
Problem statement
The card component preview page shows cards that get too narrow and elements within the cards overlap at narrow browser widths.
Solution
Adjusting the grid breakpoints in the card template improves the display of the component at narrow widths.
This fix currently provides specific grid classes for only for the scenarios needed. Alternatively, we could turn on the "widescreen" and "tablet-lg" values in
$theme-utility-breakpoints
. However, this felt heavy-handed for this specific need (See more info in this comment).Testing and review