Repository navigation
fix(tokens): update tokens version and adjust its usage - #31680
BenOsodrac wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@brandyscarney the angular failures are false positives, probably missing next sync from main. |
There was a problem hiding this comment.
🟡 Changes recommended
Opaque child backgrounds hide the elevated modal and popover surfaces, requiring overlay-scoped defaults that preserve explicit consumer background and color overrides.
1 open issue
1 file not reviewed
core/package-lock.json: Generated file
What changed in this PR
Updates Ionic components to use the latest design tokens, aligning overlay backgrounds and shadows with the new elevation styles.
Changes:
- Upgrades
outsystems-design-tokensfrom 2.5.0 to 2.6.0. - Adds elevation background variables and reorganizes base color definitions.
- Updates overlay backgrounds and adjusts modal, popover, and toast shadows.
| File | Description |
|---|---|
| core/src/foundations/ionic.vars.scss | Adds elevation surface variables and relocates base color definitions. |
| core/src/components/toast/toast.ionic.scss | Changes the shadow to elevation 2. |
| core/src/components/popover/popover.ionic.scss | Uses elevation-3 background and shadow tokens. |
| core/src/components/modal/modal.ionic.scss | Uses an elevation-3 background and elevation-4 shadow. |
| core/src/components/alert/alert.ionic.scss | Uses the elevation-3 background token. |
| core/src/components/action-sheet/action-sheet.ionic.scss | Uses the elevation-3 background token. |
| core/package.json | Updates the design tokens dependency range. |
| core/package-lock.json | Locks design tokens to version 2.6.0. |
Review effort: Balanced
|
Hey @BenOsodrac, working on a sync PR for main into next currently (here) |
ShaneK
left a comment
There was a problem hiding this comment.
Looks good to me! I left a couple of questions about the overlay surfaces, but nothing that should hold this up.
|
|
||
| :host { | ||
| --background: #{globals.$ion-bg-surface-default}; | ||
| --background: #{globals.$ion-bg-surface-elevation-3}; |
There was a problem hiding this comment.
Should the alert shadow move too? It's still on $ion-elevation-4, while popover now uses elevation-3 for both. That does match the modal, so it might be intentional. Also, the action sheet has no shadow at all in the ionic theme. Are both of these per Figma?
There was a problem hiding this comment.
The alert stays on elevation-4 on purpose.
It follows the same mapping OutSystems UI uses (they share the same tokens now, and we still don't have a figma updated for MobileUI on this): dialogs and sheets (popup, bottom sheet, action sheet) use elevation-4, while popovers and dropdowns use elevation-3. That's also why the modal moved from 3 to 4.
The action sheet never had a shadow in the ionic theme, so I left it as it was.
| :host { | ||
| --background: #{globals.$ion-bg-surface-default}; | ||
| --box-shadow: #{globals.$ion-elevation-3}; | ||
| --background: #{globals.$ion-bg-surface-elevation-3}; |
There was a problem hiding this comment.
The elevated background gets covered by whatever's inside the modal or popover. The ionic theme gives ion-content, ion-toolbar and ion-item a $ion-bg-surface-default background, so with --token-bg-surface-elevation-3 set to a dark gray, the popover wrapper turns gray but the content and items inside it stay white. Both tokens are white right now, so it doesn't show yet. Is that intended, or a follow-up for when they start to differ, like in dark mode?
There was a problem hiding this comment.
Good catch. It wasn't intended, and it's now fixed in eaf250b. In the ionic theme, ion-content, ion-toolbar and ion-item inside a modal or popover now default to the same surface-elevation-3 fill as the overlay. That means they'll stay consistent once the tokens differ, as in dark mode.
It's scoped with :where(), so it stays a default that consumers can still override. Let me know if you don't like this approach
There was a problem hiding this comment.
I like this approach! I left one comment on the new rule about items inside cards.
…ic theme ion-content, ion-toolbar and ion-item paint their own surface background, which covered the elevated modal/popover fill. Default them to the same elevation-3 surface inside overlays, using :where() so consumer --background overrides still apply. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ShaneK
left a comment
There was a problem hiding this comment.
Thanks for the updates, looks good to me! I left one small suggestion, up to you!
|
|
||
| :host { | ||
| --background: #{globals.$ion-bg-surface-default}; | ||
| --background: #{globals.$ion-bg-surface-elevation-3}; |
| :host { | ||
| --background: #{globals.$ion-bg-surface-default}; | ||
| --box-shadow: #{globals.$ion-elevation-3}; | ||
| --background: #{globals.$ion-bg-surface-elevation-3}; |
There was a problem hiding this comment.
I like this approach! I left one comment on the new rule about items inside cards.
| * surface. `:where()` keeps the specificity at zero so any consumer | ||
| * `--background` override on these components still applies. | ||
| */ | ||
| :where(html.ionic ion-modal, html.ionic ion-popover) :where(ion-content, ion-toolbar, ion-item) { |
There was a problem hiding this comment.
| :where(html.ionic ion-modal, html.ionic ion-popover) :where(ion-content, ion-toolbar, ion-item) { | |
| :where(html.ionic ion-modal, html.ionic ion-popover) :where(ion-content, ion-toolbar, ion-item:not(ion-card ion-item)) { |
Items inside an ion-card pick this up too, but the card itself stays on the default surface, so once the tokens differ you get a dark item inside a white card. Excluding card items fixes that and keeps the specificity at zero. Also, ion-datetime stays on the default surface inside overlays, which is probably worth a follow-up since ion-datetime-button puts it in a popover or modal pretty often.

Issue number: internal
What is the new behavior?
This pull request updates the design tokens package and refines the visual styling of several Ionic components to improve consistency and support new elevation/background tokens. The most significant changes are the adoption of new elevation background variables, updates to box-shadow levels, and a dependency bump for design tokens.
Design tokens and dependency updates:
outsystems-design-tokensdependency from version2.5.0to2.6.0in bothpackage.jsonandpackage-lock.json, ensuring access to the latest design primitives and variables. [1] [2] [3]Component visual updates:
action-sheet,alert,modal,popover, andtoastcomponents to use the new elevation tokens (e.g.,--background: #{globals.$ion-bg-surface-elevation-3}and adjusted shadow levels), aligning with the new design system elevations. [1] [2] [3] [4] [5]Design token variable management:
Moved the definitions for
$ion-primitives-base-white,$ion-primitives-base-black, and their RGB variants to a new location inionic.vars.scssto improve organization and maintainability. [1] [2]Added new elevation background variables (
$ion-bg-surface-elevation-2,$ion-bg-surface-elevation-3, and their RGB variants) to the design token definitions to support the updated component backgrounds.Does this introduce a breaking change?