Skip to content
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 - Color: Add state color tokens to default palettes. #4198

Merged
merged 2 commits into from May 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/components/test/state-color/state-color.config.yml
@@ -0,0 +1,30 @@
label: State color utils

context:
# $tokens-color-state in _variables.scss
state_colors:
- error-lighter
- error-light
- error
- error-dark
- error-darker
- warning-lighter
- warning-light
- warning
- warning-dark
- warning-darker
- success-lighter
- success-light
- success
- success-dark
- success-darker
- info-lighter
- info-light
- info
- info-dark
- info-darker
- disabled-light
- disabled
- disabled-dark
- emergency
- emergency-dark
14 changes: 14 additions & 0 deletions src/components/test/state-color/state-color.njk
@@ -0,0 +1,14 @@
<div class="padding-2 maxw-desktop">
{% for color in state_colors %}
<div class="grid-row flex-align-center">
<div class="tablet:grid-col-2">
<div>
{{ color }}
</div>
</div>
<div class="tablet:grid-col-10">
<div class="bg-{{ color }} util-test padding-205"></div>
</div>
</div>
{% endfor %}
</div>
3 changes: 2 additions & 1 deletion src/stylesheets/utilities/palettes/_default-palettes.scss
Expand Up @@ -23,7 +23,8 @@ $palettes-default: (
map-collect(
$tokens-color-basic,
$tokens-color-grayscale,
$tokens-color-theme
$tokens-color-theme,
$tokens-color-state
),
"palette-cursor-default": get-standard-values(cursor),
"palette-display-default": get-standard-values(display),
Expand Down