Skip to content

Commit ce4d1a0

Browse files
siddharthkpCompuIves
authored andcommitted
Refactor CodeSandbox Black to use object + color tokens (codesandbox#3075)
* refactor theme to object instead of dot notation * use our design language tokens for theme * move color tokens to a folder of its own * round off editor whitespace to closest token
1 parent 2230824 commit ce4d1a0

File tree

6 files changed

+1834
-3
lines changed

6 files changed

+1834
-3
lines changed

packages/app/src/embed/theme/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import dot from 'dot-object';
22
import applicationTheme from '@codesandbox/common/lib/theme';
3-
import codesandboxBlack from '@codesandbox/common/lib/themes/codesandbox-black.json';
3+
import codesandboxBlack from '@codesandbox/common/lib/themes/codesandbox-black';
44
import codesandboxLight from '@codesandbox/common/lib/themes/codesandbox-light.json';
55
import tokens from './tokens';
66

packages/common/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"codesandbox-api": "^0.0.22",
5252
"color": "0.11.4",
5353
"date-fns": "^2.0.0",
54+
"dot-object": "1.9.0",
5455
"error-polyfill": "^0.1.1",
5556
"humps": "CompuIves/humps",
5657
"image-extensions": "^1.1.0",
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
export const colors = {
2+
white: '#fff',
3+
grays: {
4+
100: '#fff9f9',
5+
200: '#e6e6e6',
6+
300: '#999999',
7+
400: '#757575',
8+
500: '#242424',
9+
600: '#343434',
10+
700: '#151515',
11+
800: '#040404',
12+
},
13+
blues: {
14+
300: '#6CC7F6', // Teal
15+
600: '#0971f1', // Blue
16+
700: '#535BCF', // Indigo
17+
},
18+
reds: {
19+
200: '#EB455A', // Pink
20+
300: '#FF453A', // Heart
21+
500: '#E1270E', // Red
22+
},
23+
green: '#5BC266',
24+
purple: '#BF5AF2',
25+
yellow: '#FBCC43',
26+
};

0 commit comments

Comments
 (0)