Skip to content

Commit

Permalink
feat: add status color tokens, fix a duplicated red orange value, cha…
Browse files Browse the repository at this point in the history
…nge the max width of the copy button to show full token name, and change order of categories on Netlify page
  • Loading branch information
marionnegp committed Dec 12, 2023
1 parent a5dfee5 commit 3004f0e
Show file tree
Hide file tree
Showing 8 changed files with 188 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/assets/tokens.css
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ code {
.token:is(.value, .name) .copy-button {
background-color: var(--rh-color-surface-lighter);
overflow-x: hidden;
max-width: 350px;
max-width: 400px;
white-space: pre;
text-overflow: ellipsis;
}
Expand Down
86 changes: 86 additions & 0 deletions tokens/color/border.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,92 @@ color:
on-dark:
$value: '{color.blue.30}'
$description: Interactive border color (dark theme)
attributes:
category: border
type: color

danger:

on-light:
$value: '{color.red-orange.50}'
$description:
attributes:
category: border
type: color
on-dark:
$value: '{color.red-orange.40}'
$description:
attributes:
category: border
type: color

warning:

on-light:
$value: '{color.orange.50}'
$description:
attributes:
category: border
type: color
on-dark:
$value: '{color.orange.40}'
$description:
attributes:
category: border
type: color

caution:
on-light:
$value: '{color.yellow.60}'
$description:
attributes:
category: border
type: color
on-dark:
$value: '{color.yellow.30}'
$description:
attributes:
category: border
type: color

neutral:
on-light:
$value: '{color.gray.60}'
$description:
attributes:
category: border
type: color
on-dark:
$value: '{color.gray.40}'
$description:
attributes:
category: border
type: color

note:
on-light:
$value: '{color.purple.50}'
$description:
attributes:
category: border
type: color
on-dark:
$value: '{color.purple.30}'
$description:
attributes:
category: border
type: color

success:
on-light:
$value: '{color.green.60}'
$description:
attributes:
category: border
type: color
on-dark:
$value: '{color.green.40}'
$description:
attributes:
category: border
type: color
2 changes: 1 addition & 1 deletion tokens/color/crayon/blue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ color:
blue:
$extensions:
com.redhat.ux:
order: 301
order: 306
10:
$value: '#E0F0FF'
$description: Alert - Info background
Expand Down
2 changes: 1 addition & 1 deletion tokens/color/crayon/orange.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ color:
orange:
$extensions:
com.redhat.ux:
order: 305
order: 302
10:
$value: '#FFE8CC'
$description: Label - Filled (Orange) background color
Expand Down
2 changes: 1 addition & 1 deletion tokens/color/crayon/purple.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ color:
purple:
$extensions:
com.redhat.ux:
order: 306
order: 307
10:
$value: '#ECE6FF'
$description: Label - Filled (Purple) background color
Expand Down
4 changes: 2 additions & 2 deletions tokens/color/crayon/red-orange.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ color:
red-orange:
$extensions:
com.redhat.ux:
order: 303
order: 301
description: >-
The red orange color is reserved for danger or error states. Do not use it anywhere else.
Expand All @@ -15,7 +15,7 @@ color:
40:
$value: '#F4784A'
50:
$value: '#F4784A'
$value: '#F0561D'
60:
$value: '#B1380B'
70:
Expand Down
2 changes: 1 addition & 1 deletion tokens/color/crayon/teal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ color:
teal:
$extensions:
com.redhat.ux:
order: 302
order: 305
10:
$value: '#DAF2F2'
$description: Alert - Default background
Expand Down
95 changes: 95 additions & 0 deletions tokens/color/status.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
color:
status:
$extensions:
com.redhat.ux:
order: 500

danger:
on-light:
$value: '{color.red-orange.50}'
$description:
on-dark:
$value: '{color.red-orange.40}'
$description:
surface:
on-light:
$value: '{color.red-orange.10}'
$description:
on-dark:
$value: '{color.red-orange.70}'
$description:

warning:
on-light:
$value: '{color.orange.50}'
$description:
on-dark:
$value: '{color.orange.40}'
$description:
surface:
on-light:
$value: '{color.orange.10}'
$description:
on-dark:
$value: '{color.orange.70}'
$description:

caution:
on-light:
$value: '{color.yellow.60}'
$description:
on-dark:
$value: '{color.yellow.30}'
$description:
surface:
on-light:
$value: '{color.yellow.10}'
$description:
on-dark:
$value: '{color.yellow.70}'
$description:

neutral:
on-light:
$value: '{color.gray.60}'
$description:
on-dark:
$value: '{color.gray.40}'
$description:
surface:
on-light:
$value: '{color.gray.10}'
$description:
on-dark:
$value: '{color.gray.80}'
$description:

note:
on-light:
$value: '{color.purple.50}'
$description:
on-dark:
$value: '{color.purple.30}'
$description:
surface:
on-light:
$value: '{color.purple.10}'
$description:
on-dark:
$value: '{color.purple.60}'
$description:

success:
on-light:
$value: '{color.green.60}'
$description:
on-dark:
$value: '{color.green.40}'
$description:
surface:
on-light:
$value: '{color.green.10}'
$description:
on-dark:
$value: '{color.green.70}'
$description:

0 comments on commit 3004f0e

Please sign in to comment.