Skip to content

Commit

Permalink
feat(tokens): add/update color tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
dtsanevmw committed May 28, 2024
1 parent 5c8b522 commit 1ae4e02
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
15 changes: 12 additions & 3 deletions projects/core/build/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,13 @@ const aliases = {
borderColor: token(color.construction[500]),
background: {
value: token(color.white),
hover: token(color.blue[50]),
active: token(color.blue[75]),
selected: token(color.blue[50]),
hover: token(color.construction[50]),
active: token(color.construction[100]),
selected: {
value: token(color.blue[75]),
hover: token(color.construction[100]),
active: token(color.construction[200]),
},
disabled: token(color.white),
highlight: token(color.blue[700]),
},
Expand Down Expand Up @@ -613,6 +617,11 @@ const aliases = {
shade: token(color.construction[300]),
},
},
backdrop: {
background: {
value: token('hsla(0, 0%, 100%, 0.6)'),
},
},
borderColor: token(color.construction[200]),
},
},
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/index.performance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { testBundleSize } from 'web-test-runner-performance/browser.js';
describe('performance', () => {
it(`should meet maximum individual css bundle size limits`, async () => {
expect((await testBundleSize('@cds/core/global.min.css')).kb).toBeLessThan(9.0);
expect((await testBundleSize('@cds/core/styles/theme.dark.min.css')).kb).toBeLessThan(0.846);
expect((await testBundleSize('@cds/core/styles/theme.dark.min.css')).kb).toBeLessThan(0.882);
expect((await testBundleSize('@cds/core/list/list.min.css')).kb).toBeLessThan(0.5);

// contained in @cds/core/global.min.css
Expand Down
7 changes: 4 additions & 3 deletions projects/core/src/styles/theme.dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
--cds-alias-typography-link-color-visited-hover: #{$cds-global-color-lavender-200};

--cds-alias-object-app-background: #{$cds-global-color-construction-1000};
--cds-alias-object-container-backdrop-background: hsla(0, 0%, 0%, 0.6);
--cds-alias-object-container-background: #{$cds-global-color-construction-900};
--cds-alias-object-container-background-tint: #{$cds-global-color-construction-1000};
--cds-alias-object-container-background-shade: #{$cds-global-color-construction-800};
Expand All @@ -57,9 +58,9 @@
--cds-alias-object-interaction-color-selected: #{$cds-global-color-construction-200};
--cds-alias-object-interaction-color-disabled: #{$cds-global-color-construction-600};
--cds-alias-object-interaction-background: #{$cds-global-color-construction-1000};
--cds-alias-object-interaction-background-hover: #{$cds-global-color-construction-600};
--cds-alias-object-interaction-background-active: #{$cds-global-color-construction-800};
--cds-alias-object-interaction-background-selected: #{$cds-global-color-construction-700};
--cds-alias-object-interaction-background-hover: #{$cds-global-color-construction-800};
--cds-alias-object-interaction-background-active: #{$cds-global-color-construction-600};
--cds-alias-object-interaction-background-selected: #{$cds-global-color-blue-900};
--cds-alias-object-interaction-background-disabled: #{$cds-global-color-construction-700};
--cds-alias-object-interaction-background-highlight: #{$cds-global-color-blue-400};
--cds-alias-object-interaction-border-color: #{$cds-global-color-construction-300};
Expand Down

0 comments on commit 1ae4e02

Please sign in to comment.