Skip to content

Commit aa97557

Browse files
committed
docs: mark old token systems as deprecated and transitional
1 parent db190ab commit aa97557

4 files changed

Lines changed: 40 additions & 7 deletions

File tree

packages/eds-tokens/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212

1313
* update tokens from Tokens Studio release ([#5182](https://github.com/equinor/design-system/issues/5182)) ([6074f72](https://github.com/equinor/design-system/commit/6074f721b4072741c50498d63c10ab3ebe45185e))
1414

15+
## [2.3.2](https://github.com/equinor/design-system/compare/eds-tokens@v2.3.1...eds-tokens@v2.3.2) (2026-07-20)
16+
17+
Documentation-only release — no token changes.
18+
19+
### 📝 Documentation
20+
21+
* mark the legacy `tokens` JavaScript object as deprecated (do not use in new code) and flag the CSS variables as transitional: still the supported option for production, but the variable names will be replaced by the new token structure (currently on `@equinor/eds-tokens@beta`) in the next major release ([#5120](https://github.com/equinor/design-system/issues/5120))
22+
1523
## [2.3.1](https://github.com/equinor/design-system/compare/eds-tokens@v2.3.0...eds-tokens@v2.3.1) (2026-06-23)
1624

1725

packages/eds-tokens/README.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,32 @@ pnpm add @equinor/eds-tokens
1313

1414
## Usage
1515

16+
> **⚠️ Transition notice.** The token structure in this package is being
17+
> replaced. The replacement is developed on the beta line
18+
> (`@equinor/eds-tokens@beta`) and ships as the next major release.
19+
>
20+
> * **Need tokens today?** Use the CSS variables — they are the supported
21+
> option for production and keep working throughout 2.x. Expect the
22+
> variable names to change in the next major release; keeping direct
23+
> variable references few and centralised will make that migration cheap.
24+
> * **Do not** adopt the legacy `tokens` JavaScript object in new code — it
25+
> is deprecated and will be removed in the next major release.
26+
> * The beta line is for testing and feedback, not production use.
27+
1628
The package provides two token systems:
1729

18-
* **CSS Variables (Recommended)** -- Modern, theme-aware design tokens synced from Figma
19-
* **Legacy Tokens** -- Original token format, still supported for backward compatibility
30+
* **CSS Variables** -- Theme-aware design tokens synced from Figma. Supported for production; the variable names will change in the next major release.
31+
* **Legacy Tokens** -- Original token format. Deprecated: do not use in new code.
2032

2133
---
2234

23-
## CSS Variables (Recommended)
35+
## CSS Variables
36+
37+
> These `--eds-*` variables will be replaced by the new token structure in
38+
> the next major release. They remain the supported way to consume EDS
39+
> tokens today (`@equinor/eds-core-react` 2.x requires `css/variables`) —
40+
> just keep direct variable references organised so the rename in the next
41+
> major is easy to absorb.
2442
2543
The new token system uses CSS custom properties that automatically adapt to light and dark color schemes via explicit `[data-color-scheme]` scope rules with a `prefers-color-scheme` media-query fallback. These tokens are directly synced from Figma variables.
2644

@@ -309,9 +327,9 @@ These utilities use modern CSS features (`text-box-trim`) and gracefully degrade
309327

310328
---
311329

312-
## Legacy Tokens (Backward Compatible)
330+
## Legacy Tokens (deprecated — do not use)
313331

314-
The original token format is still available for existing applications. These tokens use a structured JavaScript object format.
332+
**Deprecated.** The original token format remains published only so existing applications keep working, and will be removed in the next major release. These tokens use a structured JavaScript object format.
315333

316334
### Using Legacy Tokens in JavaScript/TypeScript
317335

@@ -334,7 +352,7 @@ const typography = tokens.typography.heading.h1
334352
* Interaction states
335353
* Typography (`ot`, `woff` or `woff2` font required)
336354

337-
> We recommend migrating to CSS Variables for new projects to benefit from automatic theme support and better performance.
355+
> Do not adopt these legacy tokens in new projects. If you need tokens today, use the CSS variables above; the long-term replacement is the new token structure currently on the beta line (`@equinor/eds-tokens@beta`).
338356
339357
[design tokens]: https://css-tricks.com/what-are-design-tokens/
340358

packages/eds-tokens/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@equinor/eds-tokens",
3-
"version": "2.3.1",
3+
"version": "2.3.2",
44
"description": "Design tokens for the Equinor Design System",
55
"type": "module",
66
"exports": {

packages/eds-tokens/src/base/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ import { shape } from './shape'
66
import { typography } from './typography'
77
import { spacings } from './spacings'
88

9+
/**
10+
* @deprecated Do not use in new code — this legacy token object will be
11+
* removed in the next major release. If you need tokens today, use the CSS
12+
* variables (`@equinor/eds-tokens/css/variables`); the long-term
13+
* replacement is the new token structure on the beta line
14+
* (`@equinor/eds-tokens@beta`).
15+
*/
916
export const tokens = {
1017
clickbounds,
1118
colors,

0 commit comments

Comments
 (0)