Repository navigation
style: use ionic-ds tokens for colors that match them exactly - #4883
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ShaneK
approved these changes
Nov 23, 2026
ShaneK
left a comment
Member
There was a problem hiding this comment.
Looks good to me! Just a couple of small things in the README 🚀
|
|
||
| `customCss` loads `tokens.css` from `@ionic-internal/ionic-ds`, Ionic's design system package, before `custom.scss`, so its custom properties work in every stylesheet, CSS modules included. The site uses its color scales and `--shadow-0`, not its type, spacing, or radius tokens. | ||
|
|
||
| - Each color is a scale from `0`, the lightest, to `100`, the darkest, such as `--c-indigo-50` or `--c-blue-70`. Indigo, carbon, and gray step by 10, the other colors by 5. |
Member
There was a problem hiding this comment.
Suggested change
| - Each color is a scale from `0`, the lightest, to `100`, the darkest, such as `--c-indigo-50` or `--c-blue-70`. Indigo, carbon, and gray step by 10, the other colors by 5. | |
| - Each color is a scale that gets darker as the number goes up, such as `--c-indigo-50` or `--c-blue-70`. Indigo, carbon, and gray run from `0` to `100`, the other colors from `0` to `200`, all in steps of 10. |
Only indigo, carbon and gray stop at 100. The other colors in tokens.css go up to 200 and nothing steps by 5, so --c-blue-100 is a mid blue (#0054e9) and the darkest one is --c-blue-200. Someone reading this could go looking for a --c-blue-55 that doesn't exist.
| - A token has the same value in both themes, so a dark style uses a different step under `html[data-theme='dark']` instead of redefining the token. | ||
| - Use a token only when its value is exactly the color you need. A near match changes how the page renders, so keep the hard-coded value instead. | ||
|
|
||
| The values are in [tokens.css](/node_modules/@ionic-internal/ionic-ds/dist/tokens/tokens.css), once dependencies are installed. |
Member
There was a problem hiding this comment.
Suggested change
| The values are in [tokens.css](/node_modules/@ionic-internal/ionic-ds/dist/tokens/tokens.css), once dependencies are installed. | |
| The values are in [tokens.css](https://unpkg.com/@ionic-internal/ionic-ds@8/dist/tokens/tokens.css), also at `node_modules/@ionic-internal/ionic-ds/dist/tokens/tokens.css` once dependencies are installed. |
This link 404s on GitHub since node_modules isn't committed, and GitHub is pretty much the only place anyone reads this README. I pinned the unpkg link to @8 so it matches the ^8.0.0 range in package.json. Up to you!
thetaPC
force-pushed
the
css-ds-tokens
branch
from
November 23, 2026 23:26
e5c33c5 to
2524a12
Compare
Co-authored-by: Shane <561207+ShaneK@users.noreply.github.com>
thetaPC
force-pushed
the
css-ds-tokens
branch
from
November 23, 2026 23:29
2524a12 to
80f7034
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue URL: N/A
What is the current behavior?
ionic-dstoken, while the rest of the site's styles use the tokens.What is the new behavior?
Does this introduce a breaking change?
Other information
Screenshots
Every spot whose color now uses a token, built from
mainand from this branch. All 8 pairs are pixel-identical (0 pixels differ).The data has no minor releases, so the minor badge, which uses the same gray, doesn't render. The
--accent-color-100to-900scale isn't used by any rule, so it renders nothing.