|
1 | 1 | @tailwind base;
|
2 | 2 | @tailwind components;
|
3 | 3 | @tailwind utilities;
|
| 4 | + |
| 5 | +* { |
| 6 | + user-select: none; |
| 7 | + cursor: url('https://willin.wang/images/default.cur'), default; |
| 8 | +} |
| 9 | + |
| 10 | +pre[data-theme*=' '], |
| 11 | +pre[data-theme*=' '] span { |
| 12 | + color: var(--shiki-light); |
| 13 | + background-color: var(--shiki-light-bg); |
| 14 | +} |
| 15 | + |
| 16 | +[data-theme='dark'] pre[data-theme*=' '], |
| 17 | +[data-theme='dark'] pre[data-theme*=' '] span, |
| 18 | +[data-theme='synthwave'] pre[data-theme*=' '], |
| 19 | +[data-theme='synthwave'] pre[data-theme*=' '] span, |
| 20 | +[data-theme='halloween'] pre[data-theme*=' '], |
| 21 | +[data-theme='halloween'] pre[data-theme*=' '] span, |
| 22 | +[data-theme='forest'] pre[data-theme*=' '], |
| 23 | +[data-theme='forest'] pre[data-theme*=' '] span, |
| 24 | +[data-theme='black'] pre[data-theme*=' '], |
| 25 | +[data-theme='black'] pre[data-theme*=' '] span, |
| 26 | +[data-theme='luxury'] pre[data-theme*=' '], |
| 27 | +[data-theme='luxury'] pre[data-theme*=' '] span, |
| 28 | +[data-theme='dracula'] pre[data-theme*=' '], |
| 29 | +[data-theme='dracula'] pre[data-theme*=' '] span, |
| 30 | +[data-theme='business'] pre[data-theme*=' '], |
| 31 | +[data-theme='business'] pre[data-theme*=' '] span, |
| 32 | +[data-theme='night'] pre[data-theme*=' '], |
| 33 | +[data-theme='night'] pre[data-theme*=' '] span, |
| 34 | +[data-theme='coffee'] pre[data-theme*=' '], |
| 35 | +[data-theme='coffee'] pre[data-theme*=' '] span, |
| 36 | +[data-theme='dim'] pre[data-theme*=' '], |
| 37 | +[data-theme='dim'] pre[data-theme*=' '] span, |
| 38 | +[data-theme='sunset'] pre[data-theme*=' '], |
| 39 | +[data-theme='sunset'] pre[data-theme*=' '] span { |
| 40 | + color: var(--shiki-dark); |
| 41 | + background-color: var(--shiki-dark-bg); |
| 42 | +} |
| 43 | + |
| 44 | +a, |
| 45 | +a *, |
| 46 | +button, |
| 47 | +button *, |
| 48 | +.btn, |
| 49 | +.btn *, |
| 50 | +.prose .post-image, |
| 51 | +.cursor-pointer * { |
| 52 | + cursor: url('https://willin.wang/images/pointer.cur'), pointer; |
| 53 | +} |
| 54 | + |
| 55 | +html { |
| 56 | + /* transition: background-color 0.5s linear, color 0.25s linear; */ |
| 57 | + min-height: 100vh; |
| 58 | + user-select: none; |
| 59 | +} |
| 60 | + |
| 61 | +div, |
| 62 | +p { |
| 63 | + @apply break-all; |
| 64 | + user-select: none; |
| 65 | +} |
| 66 | + |
| 67 | +pre { |
| 68 | + -ms-overflow-style: none; /* IE and Edge */ |
| 69 | + scrollbar-width: none; /* Firefox */ |
| 70 | + user-select: none; |
| 71 | +} |
| 72 | + |
| 73 | +/* Remove Safari input shadow on mobile */ |
| 74 | +input[type='text'], |
| 75 | +input[type='email'] { |
| 76 | + -webkit-appearance: none; |
| 77 | + -moz-appearance: none; |
| 78 | + appearance: none; |
| 79 | +} |
| 80 | + |
| 81 | +.break-words, |
| 82 | +.break-words p { |
| 83 | + word-wrap: break-word; |
| 84 | + word-break: break-word; |
| 85 | +} |
| 86 | + |
| 87 | +table { |
| 88 | + display: block; |
| 89 | + max-width: fit-content; |
| 90 | + overflow-x: auto; |
| 91 | + white-space: nowrap; |
| 92 | +} |
| 93 | + |
| 94 | +/* .anchor:hover { |
| 95 | + @apply visible; |
| 96 | +} |
| 97 | +
|
| 98 | +.prose .anchor:after { |
| 99 | + content: '#'; |
| 100 | +} |
| 101 | +
|
| 102 | +.prose *:hover > .anchor { |
| 103 | + @apply visible; |
| 104 | +} |
| 105 | +
|
| 106 | +.prose .anchor { |
| 107 | + @apply absolute invisible no-underline text-secondary max-w-full; |
| 108 | + margin-left: -1.5rem; |
| 109 | + width: 100%; |
| 110 | + left: 0; |
| 111 | + top: 0; |
| 112 | + right: 0; |
| 113 | + bottom: 0; |
| 114 | + text-align: left; |
| 115 | + height: max-content; |
| 116 | +} */ |
| 117 | + |
| 118 | +.prose img { |
| 119 | + /* Don't apply styles to next/image */ |
| 120 | + @apply m-0; |
| 121 | +} |
| 122 | + |
| 123 | +.prose code { |
| 124 | + @apply text-accent rounded; |
| 125 | +} |
| 126 | + |
| 127 | +code[class*='language-'], |
| 128 | +pre[class*='language-'] { |
| 129 | + @apply text-neutral-50; |
| 130 | +} |
| 131 | + |
| 132 | +.prose { |
| 133 | + @apply min-w-full; |
| 134 | +} |
| 135 | +.prose > * { |
| 136 | + @apply min-w-[95%] w-full lg:w-[95%] mx-auto; |
| 137 | +} |
| 138 | +.prose h1 a, |
| 139 | +.prose h2 a { |
| 140 | + @apply block text-primary-content bg-primary border-primary mx-auto shadow-lg text-center w-full py-1 rounded; |
| 141 | +} |
| 142 | +.prose h1 a, |
| 143 | +.prose h2 a, |
| 144 | +.prose h3 a, |
| 145 | +.prose h4 a, |
| 146 | +.prose h5 a, |
| 147 | +.prose h6 a { |
| 148 | + @apply no-underline; |
| 149 | +} |
| 150 | +.prose h3, |
| 151 | +.prose h4, |
| 152 | +.prose h5, |
| 153 | +.prose h6 { |
| 154 | + @apply text-secondary-content relative; |
| 155 | +} |
| 156 | +.prose table { |
| 157 | + @apply min-w-[95%] w-full lg:w-[95%] table-zebra shadow mx-auto table-md; |
| 158 | + display: table; |
| 159 | +} |
| 160 | + |
| 161 | +.prose tr { |
| 162 | + @apply hover; |
| 163 | +} |
| 164 | +[data-rehype-pretty-code-fragment] { |
| 165 | + @apply relative min-w-[95%] w-full lg:w-[95%] mx-auto rounded shadow-lg; |
| 166 | +} |
| 167 | +[data-rehype-pretty-code-fragment] code { |
| 168 | + @apply grid break-words border-0 bg-transparent p-0 text-sm text-black; |
| 169 | + counter-reset: line; |
| 170 | + box-decoration-break: clone; |
| 171 | +} |
| 172 | +[data-rehype-pretty-code-fragment] pre { |
| 173 | + @apply mx-auto p-4; |
| 174 | +} |
| 175 | +[data-rehype-pretty-code-fragment] code * { |
| 176 | + user-select: text; |
| 177 | +} |
| 178 | +[data-rehype-pretty-code-fragment] .line { |
| 179 | + @apply py-1; |
| 180 | +} |
| 181 | +[data-rehype-pretty-code-fragment] [data-line-numbers] > .line::before { |
| 182 | + counter-increment: line; |
| 183 | + content: counter(line); |
| 184 | + display: inline-block; |
| 185 | + width: 1rem; |
| 186 | + margin-right: 1rem; |
| 187 | + text-align: right; |
| 188 | + color: gray; |
| 189 | +} |
| 190 | + |
| 191 | +[data-rehype-pretty-code-title] { |
| 192 | + @apply px-4 py-3 font-mono text-xs font-medium border rounded-t-lg text-secondary-content bg-secondary border-secondary; |
| 193 | +} |
| 194 | + |
| 195 | +[data-rehype-pretty-code-caption] { |
| 196 | + @apply !m-0 px-4 py-3 font-mono text-xs font-medium border rounded-b-lg text-accent-content bg-accent border-accent; |
| 197 | +} |
| 198 | + |
| 199 | +[data-rehype-pretty-code-title] ~ [data-language-icon] { |
| 200 | + @apply block; |
| 201 | +} |
| 202 | + |
| 203 | +[data-rehype-pretty-code-title] ~ pre { |
| 204 | + @apply mt-0 rounded-t-none border-t-0; |
| 205 | +} |
| 206 | + |
| 207 | +[data-rehype-pretty-code-fragment] .line--highlighted { |
| 208 | + @apply bg-secondary bg-opacity-10; |
| 209 | +} |
| 210 | +[data-rehype-pretty-code-fragment] .line-highlighted span { |
| 211 | + @apply relative; |
| 212 | +} |
| 213 | +[data-rehype-pretty-code-fragment] .word--highlighted { |
| 214 | + @apply rounded-md bg-secondary bg-opacity-10 p-1; |
| 215 | +} |
| 216 | + |
| 217 | +[data-highlighted-line] { |
| 218 | + @apply !bg-primary/30; |
| 219 | +} |
| 220 | +[data-highlighted-line] * { |
| 221 | + @apply !bg-transparent; |
| 222 | +} |
| 223 | + |
| 224 | +[data-highlighted-chars] { |
| 225 | + @apply p-1 bg-secondary/70 shadow shadow-secondary; |
| 226 | +} |
| 227 | +[data-highlighted-chars] span { |
| 228 | + @apply !bg-transparent !text-secondary-content; |
| 229 | +} |
| 230 | + |
| 231 | +[data-chars-id='v'] span { |
| 232 | + @apply !text-pink-300 bg-rose-800/50 border-b-pink-600 font-bold; |
| 233 | +} |
| 234 | + |
| 235 | +[data-chars-id='s'] span { |
| 236 | + @apply !text-yellow-300 bg-yellow-800/50 border-b-yellow-600 font-bold; |
| 237 | +} |
| 238 | + |
| 239 | +[data-chars-id='i'] span { |
| 240 | + @apply !text-purple-200 bg-purple-800/50 border-b-purple-600 font-bold; |
| 241 | +} |
| 242 | + |
| 243 | +code[data-line-numbers] { |
| 244 | + counter-reset: line; |
| 245 | +} |
| 246 | + |
| 247 | +code[data-line-numbers] > [data-line]::before { |
| 248 | + counter-increment: line; |
| 249 | + content: counter(line); |
| 250 | + @apply inline-block w-4 mr-4 text-right text-gray-500; |
| 251 | +} |
0 commit comments