Skip to content

refactor(utilities): use system tokens - #2477

Draft
spike-rabbit wants to merge 1 commit into
mainfrom
refactor/utilities/use-system-tokens
Draft

refactor(utilities): use system tokens#2477
spike-rabbit wants to merge 1 commit into
mainfrom
refactor/utilities/use-system-tokens

Conversation

@spike-rabbit

@spike-rabbit spike-rabbit commented Aug 3, 2026

Copy link
Copy Markdown
Member

Replaces the semantic tokens with the system tokens without adjusting any class names.


Documentation.
Examples.
Dashboards Demo.
Playwright report.

Coverage Reports:

Code Coverage

Replaces the semantic tokens with the system tokens without adjusting
any class names.
@spike-rabbit
spike-rabbit force-pushed the refactor/utilities/use-system-tokens branch from 9f21737 to 8c2cbe0 Compare August 3, 2026 07:32
@kfenner

kfenner commented Aug 3, 2026

Copy link
Copy Markdown
Member

The utilities do not match the names of the tokens (e.g. primary vs accent). This is mainly because we are/were following Bootstrap terminology for the utils etc. Should we change anything here or leave as is?

WDYT? @spike-rabbit @dr-itz @timowolf

@kfenner kfenner added the core-team-discussion Topics that should be discussed in the core team meeting label Aug 3, 2026
@spike-rabbit

spike-rabbit commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Leave them as they are and introduce a bunch of new utilities called sys-*-*?

'base-critical': semantic-tokens.$element-base-critical,
'primary': system-tokens.$si-sys-background-accent,
'secondary': system-tokens.$si-sys-text-secondary,
'tertiary': system-tokens.$si-sys-text-disabled,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I assume these are wrong and should map to background colors

@timowolf timowolf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes are needed and the new tokens need to be made available. I would prefer to remove old tokens and or generate the utility on token level.

'danger': system-tokens.$si-sys-text-danger,
'inverse': system-tokens.$si-sys-text-inverse,
'muted': system-tokens.$si-sys-text-disabled
) !default;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

While these mappings looks good, we should also add the new token names as utility and make those deprecated.

Doing so will result in conflicts as some names are redundant. Bootstrap primary is our accent, I think this should be a breaking change and we should map those.

So, make all new token names available, keep old names that are not existent anymore and mark as breaking change

Comment on lines +61 to +62
'secondary': system-tokens.$si-sys-text-secondary,
'tertiary': system-tokens.$si-sys-text-disabled,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same, these bg colors do not exist. We should remove them.

Comment on lines +72 to +77
'base-success': system-tokens.$si-sys-background-success-subtle,
'base-info': system-tokens.$si-sys-background-information-subtle,
'base-caution': system-tokens.$si-sys-background-caution-subtle,
'base-warning': system-tokens.$si-sys-background-warning-subtle,
'base-danger': system-tokens.$si-sys-background-danger-subtle,
'base-critical': system-tokens.$si-sys-background-critical-subtle,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does not make sense, I would map them to the background status colors and add the subtle as its own token.

Comment on lines +89 to +101
'success': system-tokens.$si-sys-background-success,
'info': system-tokens.$si-sys-background-information,
'caution': system-tokens.$si-sys-background-caution,
'warning': system-tokens.$si-sys-background-warning,
'danger': system-tokens.$si-sys-background-danger,
'critical': system-tokens.$si-sys-background-critical,
'neutral': system-tokens.$si-sys-border-4,
'success-contrast': system-tokens.$si-sys-text-on-success,
'info-contrast': system-tokens.$si-sys-text-on-information,
'caution-contrast': system-tokens.$si-sys-text-on-caution,
'warning-contrast': system-tokens.$si-sys-text-on-warning,
'danger-contrast': system-tokens.$si-sys-text-on-danger,
'critical-contrast': system-tokens.$si-sys-text-on-critical

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this should be the text colors, let us sync on this one.

@kfenner kfenner removed the core-team-discussion Topics that should be discussed in the core team meeting label Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants