Skip to content

feat(theme): new utilities based on system tokens - #2608

Draft
spike-rabbit wants to merge 2 commits into
refactor/search-bar-extract-theme-stylingfrom
feat/theme-system-utilities-deprecation
Draft

feat(theme): new utilities based on system tokens#2608
spike-rabbit wants to merge 2 commits into
refactor/search-bar-extract-theme-stylingfrom
feat/theme-system-utilities-deprecation

Conversation

@spike-rabbit

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

Copy link
Copy Markdown
Member

Generate background, text, and border utilities from Element system tokens and migrate Element usage to the new classes.

BREAKING CHANGE: Replace the CSS class text-primary with text-accent to preserve the previous color.

The legacy text-primary selector conflicts with the new system-token text-primary utility and cannot be retained. Applications using text-primary must update templates or styles before upgrading.

DEPRECATED: Legacy color utilities are deprecated in favor of system-token utility classes.

The following legacy utilities remain available during the deprecation period. Replace them with system-token utility classes.
Run the Element update schematic to migrate supported classes in Angular templates.

Deprecated utility Replacement
bg-primary background-accent
bg-secondary background-neutral
bg-tertiary background-4
bg-success background-success
bg-info background-information
bg-warning background-warning
bg-danger background-danger
bg-base-0 background-0
bg-base-1 background-1
bg-base-2 background-2
bg-base-3 background-3
bg-base-4 background-4
bg-base-info background-information-subtle
bg-base-success background-success-subtle
bg-base-caution background-caution-subtle
bg-base-warning background-warning-subtle
bg-base-danger background-danger-subtle
bg-base-critical background-critical-subtle
text-body text-primary
text-tertiary text-disabled
text-muted text-disabled
text-info text-information
status-success text-success
status-info text-information
status-caution text-caution
status-warning text-warning
status-danger text-danger
status-critical text-critical
status-neutral text-disabled
status-success-contrast text-on-success
status-info-contrast text-on-information
status-caution-contrast text-on-caution
status-warning-contrast text-on-warning
status-danger-contrast text-on-danger
status-critical-contrast text-on-critical

Documentation.
Examples.
Dashboards Demo.
Playwright report.

Coverage Reports:

Code Coverage

Comment on lines +40 to +42
<si-icon class="icon text-danger" [icon]="icons.elementCancelFilled" />
<si-icon class="icon text-warning" [icon]="icons.elementManualFilled" />
<si-icon class="icon text-danger" [icon]="icons.elementAlarmFilled" />

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.

are you sure about that?

Currently status-* colors are not text colors. e.g. the current status-information color matches --si-sys-border-information. And it should! E.g. in inline-notification the icons and the bar on the left currently have the same color.

Image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

no, I am not sure. I figured I first one to update the existing utilities to the system tokens in another PR before proceeding here. I have no idea yet, what the AI did content wise in this PR beside the main change.

@spike-rabbit
spike-rabbit force-pushed the feat/theme-system-utilities-deprecation branch 3 times, most recently from 4bdaa74 to 2b6ddc6 Compare August 26, 2026 08:00
@spike-rabbit
spike-rabbit force-pushed the feat/theme-system-utilities-deprecation branch 4 times, most recently from 65dfd48 to cc1c4a8 Compare August 27, 2026 03:50
@spike-rabbit
spike-rabbit changed the base branch from main to fix/datepicker-tertiary-header-buttons August 27, 2026 05:03
@spike-rabbit
spike-rabbit force-pushed the feat/theme-system-utilities-deprecation branch from cc1c4a8 to 56706bb Compare August 27, 2026 05:04
Base automatically changed from fix/datepicker-tertiary-header-buttons to main August 27, 2026 05:17
@chintankavathia
chintankavathia force-pushed the feat/theme-system-utilities-deprecation branch from 56706bb to 4a934a2 Compare August 27, 2026 05:17
@spike-rabbit
spike-rabbit changed the base branch from main to refactor/search-bar-extract-theme-styling August 27, 2026 12:44
@spike-rabbit
spike-rabbit force-pushed the feat/theme-system-utilities-deprecation branch from 4a934a2 to a31c18f Compare August 27, 2026 12:46
The search-bar component is unusable when access to the native input is needed, for instance in the si-select. Extracting the styling into the theme makes it reusable.
The pointer-events: none on the icon removes the need for extra hover/click forwarding.
@spike-rabbit
spike-rabbit force-pushed the feat/theme-system-utilities-deprecation branch from a31c18f to b0edefa Compare August 27, 2026 14:34
Generate background, text, and border utilities from Element system tokens and migrate Element usage to the new classes.

BREAKING CHANGE: Replace the CSS class `text-primary` with `text-accent` to preserve the previous color.

The legacy `text-primary` selector conflicts with the new system-token `text-primary` utility and cannot be retained.
Applications using `text-primary` must update templates or styles before upgrading.

DEPRECATED: Legacy color utilities are deprecated in favor of system-token utility classes.

The following legacy utilities remain available during the deprecation period.
Replace them with system-token utility classes.
Run the Element update schematic to migrate supported classes in Angular templates.

| Deprecated utility | Replacement |
| --- | --- |
| bg-primary | background-accent |
| bg-secondary | background-neutral |
| bg-tertiary | background-4 |
| bg-success | background-success |
| bg-info | background-information |
| bg-warning | background-warning |
| bg-danger | background-danger |
| bg-base-0 | background-0 |
| bg-base-1 | background-1 |
| bg-base-2 | background-2 |
| bg-base-3 | background-3 |
| bg-base-4 | background-4 |
| bg-base-info | background-information-subtle |
| bg-base-success | background-success-subtle |
| bg-base-caution | background-caution-subtle |
| bg-base-warning | background-warning-subtle |
| bg-base-danger | background-danger-subtle |
| bg-base-critical | background-critical-subtle |
| text-body | text-primary |
| text-tertiary | text-disabled |
| text-muted | text-disabled |
| text-info | text-information |
@spike-rabbit
spike-rabbit force-pushed the feat/theme-system-utilities-deprecation branch from b0edefa to 55bb7f4 Compare August 27, 2026 15:45
@spike-rabbit

Copy link
Copy Markdown
Member Author

@dr-itz can you please have a look again here. I dropped the whole status related changes.
For compatibility I needed to add !important to each utility

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.

2 participants