Skip to content

Commit

Permalink
Merge pull request #4198 from uswds/jm-state-color-utils
Browse files Browse the repository at this point in the history
USWDS - Color: Add state color tokens to default palettes.
  • Loading branch information
thisisdano committed May 24, 2021
2 parents 756c31e + 70f4882 commit 758a8ed
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
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

0 comments on commit 758a8ed

Please sign in to comment.