forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththeme.ts
More file actions
37 lines (29 loc) · 930 Bytes
/
theme.ts
File metadata and controls
37 lines (29 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// this theme follows the System UI Theme Specification
// Ref: https://system-ui.com/theme
import { colors } from './colors';
import { fonts, fontSizes, fontWeights } from './typography';
const theme = {
colors,
fonts,
fontSizes,
fontWeights,
// we use a 4 point grid
space: [0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40], // for margin + padding
sizes: [0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40], // for width + height
// transition speeds in ms
speeds: [0, '75ms', '100ms', '150ms', '200ms', '300ms', '500ms'],
radii: {
small: 2,
medium: 4,
large: 16,
round: '50%',
},
shadows: {
// this part is ugly, this can be improved.
// bonus: these are terrible names
active: `inset 0px -2px 0px ${colors.blues[300]}`,
underline: `inset 0px -2px 0px ${colors.grays[100] + '1a'}`,
fadeunder: `inset 0px 8px 8px 0px ${colors.grays[700] + 'cc'}`,
},
};
export default theme;