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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
@reference './global.css';
@layer base {
::selection {
background: var(--color-primary);
color: var(--color-primary-foreground);
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
@apply wrap-break-word;
}
::marker {
@apply text-muted-foreground font-mono;
}
h1,
h2 {
word-spacing: -0.35rem;
}
h2::before {
content: '⡦ ';
/*margin-left: -2ch;*/
@apply text-primary relative bottom-[0.3ch] opacity-80;
}
h1,
h2,
h3,
h4,
h5,
h6 {
@apply text-balance;
@apply font-mono;
}
p {
@apply text-pretty;
}
}
@layer components {
.prose {
@apply text-foreground text-base leading-7;
:where(p):not(:where(.not-prose, .not-prose *)) {
@apply text-foreground/80 my-5;
}
:where(h1, h2, h3, h4, h5, h6):not(:where(.not-prose, .not-prose *)) {
@apply text-foreground scroll-mt-32 font-medium xl:scroll-mt-20;
}
:first-child:not(:where(.not-prose, .not-prose *)) {
@apply mt-0;
}
/* Don't use an <h1> in your posts, one is already generated in blog/[...id].astro */
:where(h1):not(:where(.not-prose, .not-prose *)) {
@apply mt-8 mb-6 text-4xl;
}
:where(h2):not(:where(.not-prose, .not-prose *)) {
@apply mt-8 mb-4 text-2xl;
}
:where(h3):not(:where(.not-prose, .not-prose *)) {
@apply mt-8 mb-4 text-xl;
}
:where(h4):not(:where(.not-prose, .not-prose *)) {
@apply mt-7 mb-3 text-lg;
}
:where(h5, h6):not(:where(.not-prose, .not-prose *)) {
@apply mt-5 mb-3;
}
:where(a):not(:where(.not-prose, .not-prose *)) {
@apply text-foreground decoration-primary hover:decoration-foreground font-medium break-words underline underline-offset-[3px] transition-colors;
}
:where(strong):not(:where(.not-prose, .not-prose *)) {
@apply text-foreground font-medium;
}
:where(ul):not(:where(.not-prose, .not-prose *)) {
@apply marker:text-foreground/30 my-5 ml-6 list-disc [&>li]:mt-2;
}
:where(ol):not(:where(.not-prose, .not-prose *)) {
@apply marker:text-foreground/30 my-5 ml-6 list-decimal [&>li]:mt-2;
@apply [&[type='A']]:list-[upper-alpha] [&[type='I']]:list-[upper-roman] [&[type='a']]:list-[lower-alpha] [&[type='i']]:list-[lower-roman];
}
:where(li):not(:where(.not-prose, .not-prose *)) {
@apply text-foreground/80 pl-2 [&>p]:my-0;
}
:where(ul ul, ol ol, ul ol, ol ul):not(:where(.not-prose, .not-prose *)) {
@apply marker:text-foreground/30 my-2 ml-6;
}
:where(code):not(:where(.not-prose, .not-prose *)) {
@apply bg-muted/50 text-foreground relative rounded-sm px-[0.3rem] py-[0.2rem] text-sm font-medium break-words;
}
:where(.shiki):not(:where(pre *, .not-prose, .not-prose *)) {
@apply bg-muted/50! text-foreground relative rounded-sm px-[0.3rem] py-[0.2rem] text-sm font-medium break-words;
}
:where(.shiki code):not(:where(.not-prose, .not-prose *)) {
@apply bg-transparent p-0;
}
:where(.shiki span):not(:where(pre *, .not-prose, .not-prose *)) {
@apply dark:text-(--shiki-dark)!;
}
:where(blockquote):not(:where(.not-prose, .not-prose *)) {
@apply [&_*]:text-muted-foreground small my-6 border-l-2 pl-6;
}
:where(hr):not(:where(.not-prose, .not-prose *)) {
@apply my-8 border-t;
}
:where(table):not(:where(.not-prose, .not-prose *)) {
@apply mx-auto my-6 block max-w-fit overflow-x-auto text-sm;
}
:where(thead):not(:where(.not-prose, .not-prose *)) {
@apply border-muted-foreground/30 border-b;
}
:where(th):not(:where(.not-prose, .not-prose *)) {
@apply px-4 py-2 font-medium;
@apply text-left [&[align=center]]:text-center [&[align=right]]:text-right;
}
:where(tr):not(:where(.not-prose, .not-prose *)) {
@apply border-muted-foreground/30 border-y first:border-t-0 last:border-b-0;
}
:where(td):not(:where(.not-prose, .not-prose *)) {
@apply text-foreground/80 small px-4 py-2 align-top break-words [&>*]:first:mt-0! [&>*]:last:mb-0!;
@apply text-left [&[align=center]]:text-center [&[align=right]]:text-right;
}
:where(img, video, figure, .expressive-code):not(
:where(.not-prose, .not-prose *)
) {
@apply mx-auto my-6;
}
:where(pre):not(:where(.not-prose, .not-prose *)) {
@apply max-h-[min(68vh,1000px)]! overflow-y-auto [&::-webkit-scrollbar-corner]:hidden;
}
:where(summary):not(:where(.not-prose, .not-prose *)) {
@apply [&~*]:small [&~*>*]:first:mt-0! [&~*>*]:last:mb-0!;
}
:where(kbd):not(:where(.not-prose, .not-prose *)) {
@apply text-foreground bg-muted rounded-md border px-2 py-1 text-xs font-medium;
}
:where(.katex-display):not(:where(.not-prose, .not-prose *)) {
@apply text-foreground/80 my-6 overflow-x-auto overflow-y-hidden py-2 tracking-normal;
}
}
}
@utility small {
@apply text-sm leading-6 [&_code]:text-xs [&_img,video,figure,details,blockquote,.katex-display,.expressive-code]:my-4! [&_li,ol]:mt-0 [&_p]:my-2! [&_ul]:my-0;
}
|