Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: CMD-182 design tokens core-v3 concept #375

Merged
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
2 changes: 1 addition & 1 deletion dist/core-styles.cms.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-styles.demo.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-styles.docs.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-styles.portal.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings/color--cms.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/settings/color--demo.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/settings/color--docs.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/settings/color--portal.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion dist/settings/color.accent--blue.css

This file was deleted.

1 change: 0 additions & 1 deletion dist/settings/color.accent--purple.css

This file was deleted.

1 change: 1 addition & 0 deletions dist/settings/color.accent.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/settings/color.accent.v3.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/settings/color.v3.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 21 additions & 2 deletions src/lib/_imports/settings/color--cms.css
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
/* Support the default accent color in all the scopes */
@import url("./color--demo.css");
@import url("../settings/color.accent.css");
@import url("../objects/o-section.selectors.css");
@import url("../components/c-card.selectors.css");

/* Set scope for accent colors */

@custom-selector :--light-context
.c-recognition--style-light,
:--o-section--muted,
:--o-section--light,
:--c-card--standard,
:--c-card--standard-N,
:--c-card--plain;
@custom-selector :--dark-context
.c-recognition--style-dark,
:--o-section--dark;

@custom-selector :--light-context-safe
:where(:--dark-context :--light-context);
@custom-selector :--dark-context-safe
:where(:--dark-context:not(:--light-context *));
29 changes: 1 addition & 28 deletions src/lib/_imports/settings/color--demo.css
Original file line number Diff line number Diff line change
@@ -1,28 +1 @@
@import url("../objects/o-section.selectors.css");
@import url("../components/c-card.selectors.css");



/* Load accent colors without scope */

@import url("../settings/color.accent--blue.css");



/* Set scope for accent colors */

@custom-selector :--light-context
.c-recognition--style-light,
:--o-section--muted,
:--o-section--light,
:--c-card--standard,
:--c-card--standard-N,
:--c-card--plain;
@custom-selector :--dark-context
.c-recognition--style-dark,
:--o-section--dark;

@custom-selector :--light-context-safe
:where(:--dark-context :--light-context);
@custom-selector :--dark-context-safe
:where(:--dark-context:not(:--light-context *));
@import url("./color--cms.css");
4 changes: 1 addition & 3 deletions src/lib/_imports/settings/color--docs.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* Load accent colors without scope */
@import url("../settings/color.accent--purple.css");
@import url("../settings/color.accent.css");

/* Set scope for accent colors */
/* Override accent colors from base */
@custom-selector :--light-context-safe
:root;
40 changes: 9 additions & 31 deletions src/lib/_imports/settings/color--portal.css
Original file line number Diff line number Diff line change
@@ -1,40 +1,18 @@
/* Load accent colors without scope */
@import url("../settings/color.accent--purple.css");
@import url("../settings/color.accent.css");

@design-tokens url('../../tokens/Tokens.core-v2.Light.tokens.json') format('style-dictionary3');

/* Set scope for accent colors */
/* Override accent colors from base */
@custom-selector :--light-context-safe
:root;

/* Override other colors from base */
/* FAQ: Updating portal colors was delayed (to reduce complexity of TUP redesign) */
:root {
/* TODO: Update clients to use --global-color-accent--xx-light instead */
--global-color-accent--alt: #d2cce7;
/* TODO: Update clients to use --global-color-accent--x-light instead */
--global-color-accent--weak: #6039cc40; /* similar to #E3D7FD on #f4f4f4 */

--global-color-success--x-light: #E7F9E5;
--global-color-success--light: #AFECA7;
--global-color-success--normal: #43d130;
--global-color-success--dark: #237119;
--global-color-success--x-dark: #263824;

--global-color-success--weak: #43d13020;

--global-color-warning--x-light: #FDFDEA;
--global-color-warning--light: #F2F06F;
--global-color-warning--normal: #E9E000;
--global-color-warning--dark: #735911;
--global-color-warning--x-dark: #3A3320;

--global-color-warning--weak: #DFA70C20;

--global-color-danger--x-light: #FDF1F1;
--global-color-danger--light: #F8C9C9;
--global-color-danger--normal: #F09393;
--global-color-danger--dark: #AF1818;
--global-color-danger--x-dark: #3C3030;

--global-color-danger--weak: #F0939320;
/* DEPRECATED */
--global-color-accent--alt: var(--global-color-accent--light);
--global-color-accent--weak: var(--global-color-accent--x-light);
--global-color-success--weak: rgb( from design-token('color.success.medium') r g b / 0.5);
--global-color-warning--weak: rgb( from design-token('color.warning.medium') r g b / 0.5);
--global-color-danger--weak: rgb( from design-token('color.danger.medium') r g b / 0.5);
}
Loading