Skip to content

Commit

Permalink
feat(design-tokens): add overlay background token, switch to rgb colors
Browse files Browse the repository at this point in the history
  • Loading branch information
SiTaggart committed Apr 7, 2020
1 parent 3cd7ae9 commit d9f783b
Show file tree
Hide file tree
Showing 7 changed files with 290 additions and 260 deletions.
519 changes: 261 additions & 258 deletions packages/paste-design-tokens/__tests__/__snapshots__/index.test.tsx.snap

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/paste-design-tokens/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import theo from 'theo';
import path from 'path';

beforeAll(() => {
theo.registerTransform('web', ['color/rgb', 'color/hex']);
theo.registerTransform('web', ['color/rgb']);
});

describe('Design Tokens', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/paste-design-tokens/gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ theo.registerFormat('common.d.ts', dTSTokenFormat);
theo.registerFormat('es6.d.ts', dTSTokenFormat);
theo.registerFormat('sketchpalette', sketchpaletteTokenFormat);
theo.registerFormat('gatsby.json', gatsbyJsonTokenFormat);
theo.registerTransform('web', ['color/rgb', 'color/hex']);
theo.registerTransform('web', ['color/rgb']);

gulp.task('clean', () => del([paths.dist]));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,8 @@ props:
color-background-destructive-lightest:
value: "{!palette-red-10}"
comment: Lightest background for destructive actions or highlights

# overlay backgrounds
color-background-overlay:
value: "{!palette-gray-100-transparent-50}"
comment: Default background for overlays
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,8 @@ props:
color-background-destructive-lightest:
value: "{!palette-red-10}"
comment: Lightest background for destructive actions or highlights

# overlay backgrounds
color-background-overlay:
value: "{!palette-gray-100-transparent-50}"
comment: Default background for overlays
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,18 @@ aliases:
palette-gray-90: "#1d2944"
palette-gray-100: "#08152c"

## Grays transparent based on darkest gray
palette-gray-100-transparent-10: "rgba(8, 21, 44, 0.1)"
palette-gray-100-transparent-20: "rgba(8, 21, 44, 0.2)"
palette-gray-100-transparent-30: "rgba(8, 21, 44, 0.3)"
palette-gray-100-transparent-40: "rgba(8, 21, 44, 0.4)"
palette-gray-100-transparent-50: "rgba(8, 21, 44, 0.5)"
palette-gray-100-transparent-60: "rgba(8, 21, 44, 0.6)"
palette-gray-100-transparent-70: "rgba(8, 21, 44, 0.7)"
palette-gray-100-transparent-80: "rgba(8, 21, 44, 0.8)"
palette-gray-100-transparent-90: "rgba(8, 21, 44, 0.9)"
palette-gray-100-transparent-100: "rgba(8, 21, 44, 1)"

## Gray-Blues
palette-gray-blue-10: "#f5f8fd"
palette-gray-blue-20: "#ebf2ff"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,8 @@ props:
color-background-destructive-lightest:
value: "{!palette-red-10}"
comment: Lightest background for destructive actions or highlights

# overlay backgrounds
color-background-overlay:
value: "{!palette-gray-100-transparent-50}"
comment: Default background for overlays

0 comments on commit d9f783b

Please sign in to comment.