-
Notifications
You must be signed in to change notification settings - Fork 0
/
typography.css
154 lines (127 loc) · 3.96 KB
/
typography.css
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/* Adapted from https://github.com/unocss/unocss/tree/main/packages/preset-typography */
.prose {
--du-prose-code: var(--du-color-contrast-higher);
}
.prose > :where(*:not(:last-child)):not(:where(.not-prose, .not-prose *)) {
margin-bottom: calc(1rem * var(--du-prose-space-y, 1));
}
.prose :where(blockquote):not(:where(.not-prose, .not-prose *)) {
font-style: italic;
border-left: 0.25rem solid var(--du-prose-borders, currentColor);
padding-left: 1.25rem;
}
.prose :where(h1, h2, h3, h4, h5, h6):not(:where(.not-prose, .not-prose *)) {
font-weight: 600;
line-height: var(--du-line-height-heading);
}
.prose
:where(
h1:not(:first-child),
h2:not(:first-child),
h3:not(:first-child),
h4:not(:first-child),
h5:not(:first-child),
h6:not(:first-child)
):not(:where(.not-prose, .not-prose *)) {
margin-top: calc(2rem * var(--du-prose-space-y, 1));
}
.prose :where(h1):not(:where(.not-prose, .not-prose *)) {
font-size: var(--du-text-3xl);
}
.prose :where(h2):not(:where(.not-prose, .not-prose *)) {
font-size: var(--du-text-2xl);
}
.prose :where(h3):not(:where(.not-prose, .not-prose *)) {
font-size: var(--du-text-xl);
}
.prose :where(h4):not(:where(.not-prose, .not-prose *)) {
font-size: var(--du-text-lg);
}
.prose :where(figure):not(:where(.not-prose, .not-prose *)) {
text-align: center;
margin-right: 0;
margin-left: 0;
}
.prose :where(figcaption):not(:where(.not-prose, .not-prose *)) {
font-size: 0.875em;
margin-top: 0.5rem;
}
.prose :where(code):not(:where(.not-prose, .not-prose *)) {
color: var(--du-prose-code);
font-size: 0.875em;
font-weight: 600;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
Liberation-Mono, Courier-New, monospace;
}
.prose :where(:not(pre) > code):not(:where(.not-prose, .not-prose *))::before,
.prose :where(:not(pre) > code):not(:where(.not-prose, .not-prose *))::after {
content: "`";
}
.prose :where(pre):not(:where(.not-prose, .not-prose *)) {
padding: 1.25rem 1.5rem;
overflow-x: auto;
border-radius: 0.375rem;
}
.prose :where(pre, code):not(:where(.not-prose, .not-prose *)) {
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
-moz-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
hyphens: none;
background: transparent;
}
.prose :where(pre code):not(:where(.not-prose, .not-prose *)) {
font-weight: inherit;
}
.prose :where(ol, ul):not(:where(.not-prose, .not-prose *)) {
padding-left: 1.25rem;
}
.prose :where(ol):not(:where(.not-prose, .not-prose *)) {
list-style-type: decimal;
}
.prose :where(ul):not(:where(.not-prose, .not-prose *)) {
list-style-type: disc;
}
.prose :where(ol > li):not(:where(.not-prose, .not-prose *))::marker,
.prose :where(ul > li):not(:where(.not-prose, .not-prose *))::marker,
.prose :where(summary):not(:where(.not-prose, .not-prose *))::marker {
color: var(--du-prose-lists, currentColor);
}
.prose :where(hr):not(:where(.not-prose, .not-prose *)) {
margin: calc(2rem * var(--du-prose-space-y, 1)) auto;
border: 1px solid var(--du-prose-hr, currentColor);
}
.prose :where(table):not(:where(.not-prose, .not-prose *)) {
display: block;
border-collapse: collapse;
overflow-x: auto;
}
.prose :where(tr:nth-child(2n)):not(:where(.not-prose, .not-prose *)) {
background: var(--du-color-contrast-lowest);
}
.prose :where(td, th):not(:where(.not-prose, .not-prose *)) {
border: 1px solid var(--du-prose-borders, currentColor);
padding: 0.625rem 1rem;
}
.prose :where(abbr):not(:where(.not-prose, .not-prose *)) {
cursor: help;
}
.prose :where(kbd):not(:where(.not-prose, .not-prose *)) {
color: var(--du-prose-code);
border: 1px solid;
font-size: 0.875em;
padding: 0.25rem 0.5rem;
border-radius: 0.25rem;
}
.prose :where(details):not(:where(.not-prose, .not-prose *)) {
padding: 1.25rem 1.5rem;
background-color: var(--du-color-contrast-lowest);
}
.prose :where(summary):not(:where(.not-prose, .not-prose *)) {
cursor: pointer;
font-weight: 600;
}