|
1 | 1 | /* @import "prismjs/themes/prism"; */ |
2 | | -@import "prismjs/themes/prism-tomorrow"; |
3 | | -@import "@shikijs/twoslash/style-rich.css"; |
| 2 | +@import 'prismjs/themes/prism-tomorrow'; |
| 3 | +@import '@shikijs/twoslash/style-rich.css'; |
4 | 4 |
|
5 | 5 | .twoslash .twoslash-popup-container { |
6 | | - transform: translateY(2em); |
7 | | - white-space: pre-wrap; |
| 6 | + transform: translateY(2em); |
| 7 | + white-space: pre-wrap; |
| 8 | + margin-right: 32px; |
| 9 | +} |
| 10 | + |
| 11 | +.twoslash .twoslash-error > span:not(.twoslash-popup-container):not(:has(*)) { |
| 12 | + /* |
| 13 | + Since elements with no content have a width of zero and no wavy line is displayed, |
| 14 | + we specify a minimum width to display the wavy line. |
| 15 | + e.g. https://sveltejs.github.io/eslint-plugin-svelte/rules/html-closing-bracket-new-line/ |
| 16 | + */ |
| 17 | + min-width: 6px; |
| 18 | + display: inline-block; |
8 | 19 | } |
9 | 20 |
|
10 | 21 | /* theme */ |
11 | 22 | :root { |
12 | | - --primary-color: #ffffff; |
13 | | - --secondary-color: #676778; |
14 | | - --tertiary-color: #edf0f8; |
15 | | - --background-without-opacity: rgba(255, 255, 255, 0.95); |
| 23 | + --primary-color: #ffffff; |
| 24 | + --secondary-color: #676778; |
| 25 | + --tertiary-color: #edf0f8; |
| 26 | + --background-without-opacity: rgba(255, 255, 255, 0.95); |
16 | 27 | } |
17 | 28 |
|
18 | 29 | /*** markdown ***/ |
19 | 30 |
|
20 | 31 | :not(pre) > code { |
21 | | - padding: 0.1rem 0.4rem 0; |
22 | | - margin: 0 0.2rem; |
23 | | - background: #e5eef5; |
24 | | - position: relative; |
25 | | - border-radius: 0.3em; |
26 | | - white-space: nowrap; |
27 | | - color: #444; |
28 | | - -webkit-font-smoothing: initial; |
| 32 | + padding: 0.1rem 0.4rem 0; |
| 33 | + margin: 0 0.2rem; |
| 34 | + background: #e5eef5; |
| 35 | + position: relative; |
| 36 | + border-radius: 0.3em; |
| 37 | + white-space: nowrap; |
| 38 | + color: #444; |
| 39 | + -webkit-font-smoothing: initial; |
29 | 40 | } |
30 | 41 |
|
31 | 42 | blockquote { |
32 | | - padding: 1rem; |
33 | | - color: #09f; |
34 | | - border: 1px solid #40b3ff; |
35 | | - margin: 1.6rem 2.4rem 2.4rem; |
36 | | - padding: 0.5rem 2.4rem; |
37 | | - border-radius: 0.4rem; |
| 43 | + padding: 1rem; |
| 44 | + color: #09f; |
| 45 | + border: 1px solid #40b3ff; |
| 46 | + margin: 1.6rem 2.4rem 2.4rem; |
| 47 | + padding: 0.5rem 2.4rem; |
| 48 | + border-radius: 0.4rem; |
38 | 49 | } |
39 | 50 | blockquote p { |
40 | | - color: #09f; |
| 51 | + color: #09f; |
41 | 52 | } |
42 | 53 |
|
43 | 54 | table { |
44 | | - margin: 0 0 2em; |
45 | | - width: 100%; |
46 | | - font-size: var(--h5); |
| 55 | + margin: 0 0 2em; |
| 56 | + width: 100%; |
| 57 | + font-size: var(--h5); |
47 | 58 | } |
48 | 59 | td, |
49 | 60 | th { |
50 | | - text-align: left; |
51 | | - border-bottom: 1px solid rgba(0 0 0 / 0.1); |
52 | | - padding: 0.4rem 0.8rem 0.4rem 0; |
| 61 | + text-align: left; |
| 62 | + border-bottom: 1px solid rgba(0 0 0 / 0.1); |
| 63 | + padding: 0.4rem 0.8rem 0.4rem 0; |
53 | 64 | } |
54 | 65 |
|
55 | 66 | /* header */ |
|
58 | 69 | h4, |
59 | 70 | h5, |
60 | 71 | h6 { |
61 | | - font-weight: 400; |
62 | | - color: var(--heading-color); |
| 72 | + font-weight: 400; |
| 73 | + color: var(--heading-color); |
63 | 74 | } |
64 | 75 |
|
65 | 76 | h2 { |
66 | | - font-size: 1.2rem; |
| 77 | + font-size: 1.2rem; |
67 | 78 | } |
68 | 79 | h3, |
69 | 80 | h4, |
70 | 81 | h5, |
71 | 82 | h6 { |
72 | | - font-size: 1rem; |
| 83 | + font-size: 1rem; |
73 | 84 | } |
74 | 85 |
|
75 | 86 | /*** custom container ***/ |
76 | 87 |
|
77 | 88 | .custom-block .custom-block-title { |
78 | | - font-weight: 600; |
79 | | - margin-bottom: -0.4rem; |
| 89 | + font-weight: 600; |
| 90 | + margin-bottom: -0.4rem; |
80 | 91 | } |
81 | 92 |
|
82 | 93 | .custom-block.danger, |
83 | 94 | .custom-block.tip, |
84 | 95 | .custom-block.warning { |
85 | | - padding: 0.1rem 1.5rem; |
86 | | - border-left-width: 4px; |
87 | | - border-left-style: solid; |
88 | | - margin: 1rem 0; |
| 96 | + padding: 0.1rem 1.5rem; |
| 97 | + border-left-width: 4px; |
| 98 | + border-left-style: solid; |
| 99 | + margin: 1rem 0; |
89 | 100 | } |
90 | 101 |
|
91 | 102 | .custom-block.tip { |
92 | | - background-color: #f3f5f7; |
93 | | - border-color: #42b983; |
| 103 | + background-color: #f3f5f7; |
| 104 | + border-color: #42b983; |
94 | 105 | } |
95 | 106 |
|
96 | 107 | .custom-block.warning { |
97 | | - background-color: rgba(255, 229, 100, 0.3); |
98 | | - border-color: #e7c000; |
99 | | - color: #6b5900; |
| 108 | + background-color: rgba(255, 229, 100, 0.3); |
| 109 | + border-color: #e7c000; |
| 110 | + color: #6b5900; |
100 | 111 | } |
101 | 112 |
|
102 | 113 | .custom-block.warning .custom-block-title { |
103 | | - color: #b29400; |
| 114 | + color: #b29400; |
104 | 115 | } |
105 | 116 |
|
106 | 117 | .custom-block.warning a { |
107 | | - color: #2c3e50; |
| 118 | + color: #2c3e50; |
108 | 119 | } |
109 | 120 |
|
110 | 121 | .custom-block.danger { |
111 | | - background-color: #ffe6e6; |
112 | | - border-color: #c00; |
113 | | - color: #4d0000; |
| 122 | + background-color: #ffe6e6; |
| 123 | + border-color: #c00; |
| 124 | + color: #4d0000; |
114 | 125 | } |
115 | 126 |
|
116 | 127 | .custom-block.danger .custom-block-title { |
117 | | - color: #900; |
| 128 | + color: #900; |
118 | 129 | } |
119 | 130 |
|
120 | 131 | .custom-block.danger a { |
121 | | - color: #2c3e50; |
| 132 | + color: #2c3e50; |
122 | 133 | } |
123 | 134 |
|
124 | 135 | .custom-block.details { |
125 | | - display: block; |
126 | | - position: relative; |
127 | | - border-radius: 2px; |
128 | | - margin: 1.6em 0; |
129 | | - padding: 1.6em; |
130 | | - background-color: #eee; |
| 136 | + display: block; |
| 137 | + position: relative; |
| 138 | + border-radius: 2px; |
| 139 | + margin: 1.6em 0; |
| 140 | + padding: 1.6em; |
| 141 | + background-color: #eee; |
131 | 142 | } |
132 | 143 |
|
133 | 144 | .custom-block.details h4 { |
134 | | - margin-top: 0; |
| 145 | + margin-top: 0; |
135 | 146 | } |
136 | 147 |
|
137 | 148 | .custom-block.details figure:last-child, |
138 | 149 | .custom-block.details p:last-child { |
139 | | - margin-bottom: 0; |
140 | | - padding-bottom: 0; |
| 150 | + margin-bottom: 0; |
| 151 | + padding-bottom: 0; |
141 | 152 | } |
142 | 153 |
|
143 | 154 | .custom-block.details summary { |
144 | | - outline: none; |
145 | | - cursor: pointer; |
| 155 | + outline: none; |
| 156 | + cursor: pointer; |
146 | 157 | } |
0 commit comments