-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstitches.config.ts
83 lines (71 loc) · 3.42 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
import { colors, colorsRgb } from '@/styles/colors'
import type * as Stitches from '@stitches/react'
import { createStitches } from '@stitches/react'
export const { styled, getCssText, globalCss, css, keyframes } = createStitches({
media: {
bp1: '(max-width: 374px)',
bp2: '(max-width: 639px)',
bp3: '(max-width: 767px)',
bp4: '(max-width: 1023px)',
bp5: '(max-width: 1279px)',
},
theme: {
colors: {
...colors,
...colorsRgb,
},
},
utils: {
size: (value: Stitches.PropertyValue<'width'>) => ({ width: value, height: value }),
w: (value: Stitches.PropertyValue<'width'>) => ({ width: value }),
h: (value: Stitches.PropertyValue<'height'>) => ({ height: value }),
p: (value: Stitches.PropertyValue<'padding'>) => ({ padding: value }),
pt: (value: Stitches.PropertyValue<'paddingTop'>) => ({ paddingTop: value }),
pr: (value: Stitches.PropertyValue<'paddingRight'>) => ({ paddingRight: value }),
pb: (value: Stitches.PropertyValue<'paddingBottom'>) => ({ paddingBottom: value }),
pl: (value: Stitches.PropertyValue<'paddingLeft'>) => ({ paddingLeft: value }),
px: (value: Stitches.PropertyValue<'paddingLeft'>) => ({
paddingLeft: value,
paddingRight: value,
}),
py: (value: Stitches.PropertyValue<'paddingTop'>) => ({
paddingTop: value,
paddingBottom: value,
}),
m: (value: Stitches.PropertyValue<'margin'>) => ({ margin: value }),
mt: (value: Stitches.PropertyValue<'marginTop'>) => ({ marginTop: value }),
mr: (value: Stitches.PropertyValue<'marginRight'>) => ({ marginRight: value }),
mb: (value: Stitches.PropertyValue<'marginBottom'>) => ({ marginBottom: value }),
ml: (value: Stitches.PropertyValue<'marginLeft'>) => ({ marginLeft: value }),
mx: (value: Stitches.PropertyValue<'marginLeft'>) => ({
marginLeft: value,
marginRight: value,
}),
my: (value: Stitches.PropertyValue<'marginTop'>) => ({
marginTop: value,
marginBottom: value,
}),
ta: (value: Stitches.PropertyValue<'textAlign'>) => ({ textAlign: value }),
fd: (value: Stitches.PropertyValue<'flexDirection'>) => ({ flexDirection: value }),
fw: (value: Stitches.PropertyValue<'flexWrap'>) => ({ flexWrap: value }),
fg: (value: Stitches.PropertyValue<'flexGrow'>) => ({ flexGrow: value }),
fs: (value: Stitches.PropertyValue<'flexShrink'>) => ({ flexShrink: value }),
fb: (value: Stitches.PropertyValue<'flexBasis'>) => ({ flexBasis: value }),
ai: (value: Stitches.PropertyValue<'alignItems'>) => ({ alignItems: value }),
ac: (value: Stitches.PropertyValue<'alignContent'>) => ({ alignContent: value }),
as: (value: Stitches.PropertyValue<'alignSelf'>) => ({ alignSelf: value }),
jc: (value: Stitches.PropertyValue<'justifyContent'>) => ({ justifyContent: value }),
bg: (value: Stitches.PropertyValue<'background'>) => ({ background: value }),
br: (value: Stitches.PropertyValue<'borderRadius'>) => ({
borderRadius: value,
}),
bs: (value: Stitches.PropertyValue<'boxShadow'>) => ({ boxShadow: value }),
lh: (value: Stitches.PropertyValue<'lineHeight'>) => ({ lineHeight: value }),
pe: (value: Stitches.PropertyValue<'pointerEvents'>) => ({ pointerEvents: value }),
us: (value: Stitches.PropertyValue<'userSelect'>) => ({
WebkitUserSelect: value,
userSelect: value,
}),
pos: (value: Stitches.PropertyValue<'position'>) => ({ position: value }),
},
})