Skip to content

Commit

Permalink
Add subtle on-strong foreground color tokens (#2302)
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer authored Nov 22, 2023
1 parent 38cbcb5 commit 815ae9d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/famous-masks-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sumup/design-tokens': minor
---

Added the `--cui-fg-on-strong-subtle`, `--cui-fg-on-strong-subtle-hovered`, `--cui-fg-on-strong-subtle-pressed`, and `--cui-fg-on-strong-subtle-disabled` color tokens. Use them for secondary content that provides additional information on backgrounds ending with `-strong` in order to achieve the necessary contrast for accessibility.
20 changes: 20 additions & 0 deletions packages/design-tokens/themes/light.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,26 @@ export const light = [
value: 'rgba(255, 255, 255, 0.4)',
type: 'color',
},
{
name: '--cui-fg-on-strong-subtle',
value: 'rgba(255, 255, 255, 0.7)',
type: 'color',
},
{
name: '--cui-fg-on-strong-subtle-hovered',
value: 'rgba(255, 255, 255, 0.8)',
type: 'color',
},
{
name: '--cui-fg-on-strong-subtle-pressed',
value: 'rgba(255, 255, 255, 0.8)',
type: 'color',
},
{
name: '--cui-fg-on-strong-subtle-disabled',
value: 'rgba(255, 255, 255, 0.4)',
type: 'color',
},
/* Accent foregrounds */
{
name: '--cui-fg-accent',
Expand Down
4 changes: 4 additions & 0 deletions packages/design-tokens/themes/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ export const schema = [
{ name: '--cui-fg-on-strong-hovered', type: 'color' },
{ name: '--cui-fg-on-strong-pressed', type: 'color' },
{ name: '--cui-fg-on-strong-disabled', type: 'color' },
{ name: '--cui-fg-on-strong-subtle', type: 'color' },
{ name: '--cui-fg-on-strong-subtle-hovered', type: 'color' },
{ name: '--cui-fg-on-strong-subtle-pressed', type: 'color' },
{ name: '--cui-fg-on-strong-subtle-disabled', type: 'color' },
/* Accent foregrounds */
{ name: '--cui-fg-accent', type: 'color' },
{ name: '--cui-fg-accent-hovered', type: 'color' },
Expand Down

1 comment on commit 815ae9d

@vercel
Copy link

@vercel vercel bot commented on 815ae9d Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.