-
Notifications
You must be signed in to change notification settings - Fork 0
/
stitches.config.ts
91 lines (82 loc) · 2.02 KB
/
stitches.config.ts
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import {
sky,
slate,
skyDark,
slateDark
} from "@radix-ui/colors";
// -- Create stitches
import { createStitches } from "@stitches/react";
import { spaceTokens, sizeTokes, mediaTokens, radiiTokens, shadowTokens, zIndicesTokens, fontSizesTokens, lineHeightsTokens } from "@/util/tokens";
import localFont from 'next/font/local';
// Local font Mona Sans (Github)
const MonaSans = localFont({
src: './src/util/fonts/MonaSans.woff2',
weight: '100 900'
});
// Local font Hubot Sans (Github)
const HubotSans = localFont({
src: './src/util/fonts/hubot-sans.woff2',
weight: '100 900'
});
const fontsTokens = {
MonaSans: `${MonaSans.style.fontFamily}`,
HubotSans: `${HubotSans.style.fontFamily}`
}
const colorsTokens = {
black: '#060a23',
white: '#fff',
// contrast colors
hiContrast: '$slate12',
lowContrast: '$slate1'
}
const colorsTokensLightTheme = {
dashboardColor: '$black',
dashboardBody: '$white'
}
const colorsTokensDarkTheme = {
dashboardColor: '$white',
dashboardBody: '$lowContrast'
}
export const { styled, createTheme, globalCss, getCssText, theme, keyframes } = createStitches({
theme: {
colors: {
...sky,
...slate,
...colorsTokens,
...colorsTokensLightTheme
},
space: { ...spaceTokens },
fontSizes: { ...fontSizesTokens },
fonts: { ...fontsTokens },
fontWeights: {},
lineHeights: { ...lineHeightsTokens },
letterSpacings: {},
sizes: { ...sizeTokes },
borderWidths: {},
borderStyles: {},
radii: { ...radiiTokens },
shadows: { ...shadowTokens },
zIndices: { ...zIndicesTokens },
transitions: {},
},
media: { ...mediaTokens }
});
export const darkTheme = createTheme('dark', {
colors: {
...skyDark,
...slateDark,
...colorsTokens,
...colorsTokensDarkTheme
}
})
globalCss({
body: {
fontFamily: '$MonaSans !important',
letterSpacing: '-0.01em',
backgroundColor: '$dashboardBody',
color: '$hiContrast',
},
[`h1, h2, h3, h4, h5, h6`]: {
fontFamily: '$MonaSans !important',
}
})();