Skip to content

Commit

Permalink
feat(tokens): add new blue-75 token, update aliases per spec (#273)
Browse files Browse the repository at this point in the history
## PR Checklist

Please check if your PR fulfills the following requirements:

- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
- [ ] If applicable, have a visual design approval

## PR Type

What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->

- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] clarity.design website / infrastructure changes
- [ ] Other... Please describe:

## What is the current behavior?

<!-- Please describe the current behavior that you are modifying, or
link to a relevant issue. -->

Issue Number: CDE-1111

## What is the new behavior?
Adds a new blue-75 token, remaps a disabled and active token per the
spec.

## Does this PR introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this PR contains a breaking change, please describe the impact
and migration path for existing applications below. -->

## Other information
  • Loading branch information
williamernest committed Sep 21, 2023
1 parent 53716aa commit 534430c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions projects/core/build/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const color = {
},
blue: {
50: token([198, 100, 95]),
75: token([198, 100, 94]),
100: token([198, 100, 87]),
200: token([198, 100, 78]),
300: token([198, 100, 70]),
Expand Down Expand Up @@ -477,7 +478,7 @@ const generateTypographyTokens = () => {
value: token(color.construction[700]),
},
disabled: {
value: token(color.construction[400]),
value: token(color.construction[500]),
button: token(color.construction[500]),
},
};
Expand Down Expand Up @@ -550,7 +551,7 @@ const aliases = {
background: {
value: token(color.white),
hover: token(color.blue[50]),
active: token(color.blue[100]),
active: token(color.blue[75]),
selected: token(color.blue[50]),
disabled: token(color.white),
highlight: token(color.blue[700]),
Expand Down
4 changes: 2 additions & 2 deletions projects/core/src/index.performance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ 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(8.77);
expect((await testBundleSize('@cds/core/global.min.css')).kb).toBeLessThan(8.848);
expect((await testBundleSize('@cds/core/styles/theme.dark.min.css')).kb).toBeLessThan(0.846);
expect((await testBundleSize('@cds/core/list/list.min.css')).kb).toBeLessThan(0.5);

// contained in @cds/core/global.min.css
expect((await testBundleSize('@cds/core/styles/module.layout.min.css')).kb).toBeLessThan(4.6);
expect((await testBundleSize('@cds/core/styles/module.reset.min.css')).kb).toBeLessThan(0.5);
expect((await testBundleSize('@cds/core/styles/module.tokens.min.css')).kb).toBeLessThan(3.045);
expect((await testBundleSize('@cds/core/styles/module.tokens.min.css')).kb).toBeLessThan(3.067);
expect((await testBundleSize('@cds/core/styles/module.typography.min.css')).kb).toBeLessThan(1.616);
});

Expand Down

0 comments on commit 534430c

Please sign in to comment.