src/styles/global.css 4.4 K raw
1
@font-face {
2
	font-family: "Commit Mono";
3
	src: url("/CommitMono-400-Regular.otf") format("opentype");
4
	font-weight: 400;
5
	font-style: normal;
6
	font-display: swap;
7
}
8
@font-face {
9
	font-family: "Commit Mono";
10
	src: url("/CommitMono-700-Regular.otf") format("opentype");
11
	font-weight: 700;
12
	font-style: normal;
13
	font-display: swap;
14
}
15
16
@import "tailwindcss";
17
@plugin "@tailwindcss/typography";
18
19
@custom-variant dark (&:where(.dark, .dark *));
20
21
@theme {
22
	--color-bgColor: var(--theme-bg);
23
	--color-textColor: var(--theme-text);
24
	--color-link: var(--theme-link);
25
	--color-accent: var(--theme-accent);
26
	--color-accent-2: var(--theme-accent-2);
27
28
	--font-sans:
29
		"Commit Mono", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
30
		"Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
31
32
	--animate-fade-in: fadeIn 1s ease-in forwards;
33
34
	@keyframes fadeIn {
35
		from {
36
			opacity: 0;
37
		}
38
		to {
39
			opacity: 1;
40
		}
41
	}
42
}
43
44
@layer base {
45
	:root {
46
		color-scheme: light;
47
		--theme-bg: #121113;
48
		--theme-link: #ffffff;
49
		--theme-text: #ffffff;
50
		--theme-accent: #ffffff;
51
		--theme-accent-2: #ffffff;
52
		--theme-quote: #ffffff;
53
		--theme-menu-bg: rgb(0, 0, 0 / 0.85);
54
	}
55
56
	:root.dark {
57
		color-scheme: dark;
58
		--theme-bg: #121113;
59
		--theme-link: #ffffff;
60
		--theme-text: #ffffff;
61
		--theme-accent: #ffffff;
62
		--theme-accent-2: #ffffff;
63
		--theme-quote: #ffffff;
64
		--theme-menu-bg: rgb(0, 0, 0 / 0.85);
65
	}
66
67
	html {
68
		@apply h-full scroll-smooth border-t-2 border-textColor bg-[#121113];
69
	}
70
71
	html body {
72
		@apply mx-auto flex h-full max-w-3xl flex-col bg-[#121113] px-4 pt-16 font-sans text-sm font-normal text-textColor antialiased;
73
	}
74
75
	::-webkit-scrollbar {
76
		width: 10px;
77
	}
78
79
	::-webkit-scrollbar-track {
80
		background: #121113;
81
	}
82
83
	::-webkit-scrollbar-thumb {
84
		background: #121113;
85
		border-radius: 10px;
86
	}
87
}
88
89
@utility style-link {
90
	background-size: 100% 6px;
91
	background-position: bottom;
92
	background-repeat: repeat-x;
93
	background-image: linear-gradient(
94
		transparent,
95
		transparent 5px,
96
		var(--theme-text) 5px,
97
		var(--theme-text)
98
	);
99
	&:hover {
100
		background-image: linear-gradient(
101
			transparent,
102
			transparent 4px,
103
			var(--theme-link) 4px,
104
			var(--theme-link)
105
		);
106
	}
107
}
108
109
@utility title {
110
	@apply text-2xl font-semibold text-accent-2;
111
}
112
113
.prose :where(a):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
114
	background-size: 100% 6px;
115
	background-position: bottom;
116
	background-repeat: repeat-x;
117
	background-image: linear-gradient(
118
		transparent,
119
		transparent 5px,
120
		var(--theme-text) 5px,
121
		var(--theme-text)
122
	);
123
	text-decoration: none;
124
}
125
.prose
126
	:where(a):not(:where([class~="not-prose"], [class~="not-prose"] *)):hover {
127
	background-image: linear-gradient(
128
		transparent,
129
		transparent 4px,
130
		var(--theme-link) 4px,
131
		var(--theme-link)
132
	);
133
}
134
.prose
135
	:where(strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
136
	font-weight: 700;
137
}
138
.prose
139
	:where(code):not(
140
		:where(pre code, [class~="not-prose"], [class~="not-prose"] *)
141
	) {
142
	border: 1px dotted #666;
143
	border-radius: 2px;
144
}
145
.prose
146
	:where(blockquote):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
147
	border-left-width: 4px;
148
	border-left-color: var(--color-zinc-500);
149
}
150
.prose :where(hr):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
151
	border-top-style: dashed;
152
}
153
.prose :where(table):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
154
	border-collapse: collapse;
155
	border: 1px solid #666;
156
}
157
.prose :where(thead):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
158
	border-bottom: 1px solid #666;
159
}
160
.prose
161
	:where(thead th):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
162
	font-weight: 700;
163
	border: 1px solid #666;
164
	padding: 0.5em 0.75em;
165
}
166
.prose
167
	:where(tbody tr):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
168
	border-bottom: 1px solid #666;
169
}
170
.prose
171
	:where(tbody td):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
172
	border: 1px solid #666;
173
	padding: 0.5em 0.75em;
174
}
175
.prose :where(tfoot):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
176
	border-top: 1px solid #666;
177
}
178
.prose-sm
179
	:where(code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
180
	font-size: 0.875rem;
181
	font-weight: 400;
182
}
183
.prose-cactus {
184
	--tw-prose-body: var(--theme-text);
185
	--tw-prose-headings: var(--theme-accent-2);
186
	--tw-prose-links: var(--theme-text);
187
	--tw-prose-bold: var(--theme-text);
188
	--tw-prose-bullets: var(--theme-text);
189
	--tw-prose-quotes: var(--theme-quote);
190
	--tw-prose-code: var(--theme-text);
191
	--tw-prose-th-borders: #666;
192
}