forked from chakra-ui/vue-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtext-styles.ts
127 lines (121 loc) · 2.5 KB
/
text-styles.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import { SystemStyleObject } from '@chakra-ui/vue-system'
const sidebarLink: SystemStyleObject = {
display: 'inline-block',
paddingY: '1',
transition: 'color 0.2s ease-in-out',
_activeLink: {
'&:after': {
content: "''",
position: 'absolute',
width: '100%',
height: '1px',
transform: 'scaleX(1)',
top: '85%',
left: '0px',
right: '0px',
backgroundColor: 'currentColor'
},
fontWeight: 'bold'
}
}
const display: Record<string, SystemStyleObject> = {
'2xl': {
fontSize: { base: '4xl', sm: '5xl', md: '7xl' },
fontWeight: 'bold',
lineHeight: 'shorter',
letterSpacing: 'tight'
},
xl: {
fontSize: { base: '4xl', md: '6xl' },
fontWeight: 'bold',
lineHeight: 'shorter',
letterSpacing: 'tight'
},
lg: {
fontSize: { base: '3xl', md: '4xl' },
fontWeight: 'bold',
letterSpacing: 'tight',
lineHeight: '1.2'
},
md: {
fontSize: { base: 'xl', md: '2xl' },
fontWeight: 'bold',
lineHeight: '1.4',
letterSpacing: 'tight'
},
sm: {
fontSize: 'xl',
fontWeight: 'semibold',
lineHeight: '1.5'
},
xs: {
fontWeight: 'semibold',
lineHeight: '1.5'
}
}
const text: Record<string, SystemStyleObject> = {
'2xl': {
fontSize: { base: 'xl', md: '2xl' },
lineHeight: 'tall'
},
xl: {
fontSize: { base: 'lg', md: 'xl' },
lineHeight: 'tall'
},
lg: {
fontSize: 'lg',
lineHeight: 'tall'
},
md: {
fontSize: '16px',
lineHeight: '24px'
},
sm: {
fontSize: '14px',
lineHeight: '20px'
},
xs: {
fontSize: '12px',
lineHeight: '18px'
}
}
const link: SystemStyleObject = {
color: 'textLink',
cursor: 'pointer',
fontWeight: 'medium',
textDecoration: 'underline',
textDecorationColor: 'cyan.default',
textDecorationThickness: '1px',
textUnderlineOffset: '2px',
_hover: {
textDecorationThickness: '2px'
}
}
export const textStyles: Record<string, SystemStyleObject> = {
heading: {
fontFamily: 'heading',
textAlign: 'center',
fontWeight: 'bold',
letterSpacing: '-0.015em',
lineHeight: '1.24',
fontSize: { base: '2rem', md: '3.5rem' }
},
'heading-2': {
fontFamily: 'heading',
textAlign: 'center',
fontWeight: 'bold',
letterSpacing: '-0.015em',
lineHeight: '1.24',
fontSize: { base: '1.75rem', md: '2.75rem' }
},
caps: {
textTransform: 'uppercase',
fontSize: 'sm',
letterSpacing: 'widest',
fontWeight: 'bold'
},
sidebarLink,
link,
display,
text
}