-
Notifications
You must be signed in to change notification settings - Fork 16
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 "centered" banner component variant #429
Conversation
docs/_components/banner.md
Outdated
## Centered | ||
|
||
{% capture example %} | ||
<section |
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 is a lot of repeated stuff for just the id
and class
to be different, do we ever consider making these into partials w/ variables?
2c2
< class="usa-banner"
---
> class="usa-banner usa-banner--centered"
28c28
< aria-controls="gov-banner-default"
---
> aria-controls="gov-banner-centered"
36c36
< id="gov-banner-default"
---
> id="gov-banner-centered"
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.
Yes! It was made difficult to propose with how I split up the pull requests, but part of what I'm hoping with #433 is to just {% include banner.html %}
for these component examples and have some variable (or auto-incrementing number) to create unique IDs.
Reflected in that PR message:
This also opens the possibility of internally reusing "includes" for header with documented usage for guaranteed one-to-one documentation and usage
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.
I'll try to arrange merge order of the pull requests so that I can rebase to include this improvement.
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.
Rebased and updated to reuse banner.html
in 4b3fcca.
🛠 Summary of changes
Formalizes the "centered" variant of the banner component used in the IdP, and adds documentation for banner component usage.
This also includes revisions and recommendations that build upon the default USWDS documentation, slated for upstream pull requests:
width
andheight
attributes to all images (related blog post, avoids common automated scanner issues)us_flag.svg
(vector) instead ofus_flag_small.png
(raster) for improved scalability, smaller file sizeicon.svg
as<img />
element📜 Testing Plan
npm start
👀 Screenshots