Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/itchy-jars-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris-tokens': major
---

Remove legacy color tokens
5 changes: 5 additions & 0 deletions .changeset/pretty-moles-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris-tokens': major
---

Removed legacy color tokens
8 changes: 4 additions & 4 deletions polaris-tokens/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ Accessing all of the available token groups
// Token values only
import {tokens} from '@shopify/polaris-tokens';

console.log(tokens.colors.background); // 'rgba(246, 246, 247, 1)'
console.log(tokens.color.bg); // 'rgba(246, 246, 247, 1)'

// Tokens with metadata
import {metadata} from '@shopify/polaris-tokens';

console.log(metadata.colors.background.value); // 'rgba(246, 246, 247, 1)'
console.log(metadata.colors.background.description); // 'For use as a background color, in components such as Page and Frame backgrounds.'
console.log(metadata.color.bg.value); // 'rgba(246, 246, 247, 1)'
console.log(metadata.color.bg.description); // 'For use as a background color, in components such as Page and Frame backgrounds.'
```

#### CSS
Expand All @@ -41,7 +41,7 @@ Importing all of the css variables. CSS variables are prefixed with `--p` to sig
import '@shopify/polaris-tokens/css/styles.css';

div {
background: var(--p-background);
background: var(--p-color-bg);
}
```

Expand Down
11 changes: 0 additions & 11 deletions polaris-tokens/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,6 @@ export type {
BreakpointsAlias,
} from './token-groups/breakpoints';

export type {
ColorsTokenGroup,
ColorsTokenName,
ColorsBackgroundTokenAlias,
ColorsActionTokenAlias,
ColorsSurfaceTokenAlias,
ColorsBackdropTokenAlias,
ColorsOverlayTokenAlias,
ColorsBorderTokenAlias,
} from './token-groups/colors';

export type {
ColorTokenGroup,
ColorTokenName,
Expand Down
2 changes: 0 additions & 2 deletions polaris-tokens/src/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {depth} from './token-groups/depth';
import {font} from './token-groups/font';
import {legacy} from './token-groups/legacy';
import {color} from './token-groups/color';
import {colors} from './token-groups/colors';
import {motion} from './token-groups/motion';
import {shadow} from './token-groups/shadow';
import {shape} from './token-groups/shape';
Expand All @@ -17,7 +16,6 @@ export const metadata = createMetadata({
breakpoints: tokensToRems(breakpoints),
border: tokensToRems(border),
color,
colors,
depth,
font: tokensToRems(font),
legacy: tokensToRems(legacy),
Expand Down
Loading