Skip to content

Commit

Permalink
fix: align token name with design (#1630)
Browse files Browse the repository at this point in the history
* fix: align token name with design

* refactor: readd deprecated token to prevent breaking changes
  • Loading branch information
jinlee93 authored May 24, 2023
1 parent 01b2ea8 commit cfd928a
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions .storybook/data/tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
"eds-theme-color-text-grade-revise": "#21272D",
"eds-theme-color-text-grade-stop": "#BD0044",
"eds-theme-color-text-disabled": "#C0C4C8",
"eds-theme-color-text-brand-default": "#5751D2",
"eds-theme-color-text-brand-primary": "#5751D2",
"eds-theme-color-transparent-black-0": "rgba(0, 0, 0, 0)",
"eds-theme-color-transparent-black-30": "rgba(0, 0, 0, .3)",
Expand Down
2 changes: 1 addition & 1 deletion .storybook/pages/WireframeDemo/GlobalStyles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
--eds-theme-color-icon-utility-warning-hover: var(--wireframe-gray-c);
--eds-theme-color-icon-utility-warning: var(--wireframe-gray-c);
--eds-theme-color-modal-brand-header-background: var(--wireframe-gray-c);
--eds-theme-color-text-brand-primary: var(--wireframe-gray-d);
--eds-theme-color-text-brand-default: var(--wireframe-gray-d);
--eds-theme-color-text-disabled: var(--wireframe-gray-b);
--eds-theme-color-text-grade-complete: var(--wireframe-gray-d);
--eds-theme-color-text-grade-revise: var(--wireframe-gray-e);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Heading/Heading.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
color: var(--eds-theme-color-text-utility-error);
}
.heading--brand {
color: var(--eds-theme-color-text-brand-primary);
color: var(--eds-theme-color-text-brand-default);
}
/* stylelint-disable-next-line eds/no-tier-1-color-variable */
.heading--info {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tag/Tag.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
}

:where(.tag--brand) {
--tag-primary-color: var(--eds-theme-color-text-brand-primary);
--tag-primary-color: var(--eds-theme-color-text-brand-default);
--tag-secondary-color: var(
--eds-theme-color-background-brand-primary-default
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Text/Text.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
color: var(--eds-theme-color-text-neutral-strong);
}
.text--brand {
color: var(--eds-theme-color-text-brand-primary);
color: var(--eds-theme-color-text-brand-default);
}
/* stylelint-disable-next-line eds/no-tier-1-color-variable */
.text--info {
Expand Down
2 changes: 1 addition & 1 deletion src/design-tokens/mixins.css
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
--messaging-icon-color: var(--eds-theme-color-icon-brand-primary);

background: var(--eds-theme-color-background-brand-primary-default);
color: var(--eds-theme-color-text-brand-primary);
color: var(--eds-theme-color-text-brand-default);
}

@define-mixin messagingNeutral {
Expand Down
6 changes: 5 additions & 1 deletion src/design-tokens/tier-2-usage/colors-text.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@
"value": "{eds.color.neutral.300}"
},
"brand": {
"primary": {
"default": {
"value": "{eds.color.brand.grape.700}"
},
"primary": {
"value": "{eds.theme.color.text.brand.default}",
"comment": "deprecated"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/tokens-dist/css/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@
--eds-theme-color-text-grade-revise: #21272D;
--eds-theme-color-text-grade-stop: #BD0044;
--eds-theme-color-text-disabled: #C0C4C8;
--eds-theme-color-text-brand-primary: #5751D2;
--eds-theme-color-text-brand-default: #5751D2;
--eds-theme-color-text-brand-primary: #5751D2; /* deprecated */
--eds-theme-color-transparent-black-0: rgba(0, 0, 0, 0);
--eds-theme-color-transparent-black-30: rgba(0, 0, 0, .3);
--eds-theme-color-transparent-white-0: rgba(255, 255, 255, 0);
Expand Down
1 change: 1 addition & 0 deletions src/tokens-dist/json/variables-nested.json
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@
},
"disabled": "#C0C4C8",
"brand": {
"default": "#5751D2",
"primary": "#5751D2"
}
},
Expand Down
3 changes: 2 additions & 1 deletion src/tokens-dist/ts/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ export const EdsThemeColorTextGradeComplete = '#007249';
export const EdsThemeColorTextGradeRevise = '#21272D';
export const EdsThemeColorTextGradeStop = '#BD0044';
export const EdsThemeColorTextDisabled = '#C0C4C8';
export const EdsThemeColorTextBrandPrimary = '#5751D2';
export const EdsThemeColorTextBrandDefault = '#5751D2';
export const EdsThemeColorTextBrandPrimary = '#5751D2'; // deprecated
export const EdsThemeColorTransparentBlack0 = 'rgba(0, 0, 0, 0)';
export const EdsThemeColorTransparentBlack30 = 'rgba(0, 0, 0, .3)';
export const EdsThemeColorTransparentWhite0 = 'rgba(255, 255, 255, 0)';
Expand Down

0 comments on commit cfd928a

Please sign in to comment.