-
Notifications
You must be signed in to change notification settings - Fork 668
Expand file tree
/
Copy pathtailwind.css
More file actions
69 lines (61 loc) · 1.66 KB
/
tailwind.css
File metadata and controls
69 lines (61 loc) · 1.66 KB
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
/* Import CSS variables */
@import './variables.css';
/* Custom fonts if needed */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;700&display=swap');
/* Import component styles */
@import './components/base.css';
@import './components/pagination.css';
@import './components/toc.css';
@import './components/tables.css';
@import './components/icons.css';
@import './components/print.css';
@import './components/syntax-highlighting.css';
/* Tailwind layers */
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
/* Fixed: CJK fonts incorrectly applied to elements
with non-CJK lang attribute when page language is CJK */
html [lang]:not(.font-serif):not(.font-mono):not(.font-sans):not(code):not(pre):not(kbd):not(samp) {
@apply font-default;
}
body {
@apply bg-white text-stone-900 text-base leading-5 font-default;
@apply dark:bg-stone-900 dark:text-stone-50;
}
/* CJK fonts */
html:lang(ja),
body:lang(ja),
[lang="ja"],
html:lang(ko),
body:lang(ko),
[lang="ko"],
html:lang(zh-CN),
body:lang(zh-CN),
[lang="zh-CN"],
html:lang(zh-TW),
body:lang(zh-TW),
[lang="zh-TW"] {
font-family: var(--font-sans-cjk), sans-serif;
}
/* Ensure syntax highlighting colors are not overridden by body color */
.highlight code {
color: inherit;
}
.highlight pre {
color: var(--color-text-default);
}
}
@layer utilities {
.font-default:lang(ja),
.font-sans:lang(ja),
.font-default:lang(ko),
.font-sans:lang(ko),
.font-default:lang(zh-CN),
.font-sans:lang(zh-CN),
.font-default:lang(zh-TW),
.font-sans:lang(zh-TW) {
font-family: var(--font-sans-cjk), sans-serif;
}
}