| 1 | @import "tailwindcss"; |
| 2 | @config "../tailwind.config.js"; |
| 3 | |
| 4 | @custom-variant dark (&:where(.theme-dark, .theme-dark *)); |
| 5 | |
| 6 | @theme inline { |
| 7 | --font-*: initial; |
| 8 | --font-sans: var(--font-family), sans-serif; |
| 9 | --font-serif: var(--font-family-display), serif; |
| 10 | --font-display: var(--font-family-display), serif; |
| 11 | --font-mono: var(--font-family-mono), monospace; |
| 12 | |
| 13 | --color-primary: var(--primary-color); |
| 14 | --color-success: var(--success-color); |
| 15 | --color-error: var(--error-color); |
| 16 | --color-warning: var(--warning-color); |
| 17 | --color-info: var(--info-color); |
| 18 | --color-border: var(--border-color); |
| 19 | --color-hover: var(--hover-color); |
| 20 | |
| 21 | --color-extra-1: var(--extra1-color); |
| 22 | --color-extra-2: var(--extra2-color); |
| 23 | --color-extra-3: var(--extra3-color); |
| 24 | --color-extra-4: var(--extra4-color); |
| 25 | |
| 26 | --border-color-default: var(--border-color); |
| 27 | |
| 28 | --background-color-default: var(--bg-default-color); |
| 29 | --background-color-secondary: var(--bg-secondary-color); |
| 30 | --background-color-body: var(--bg-body-color); |
| 31 | --background-color-sidebar: var(--bg-sidebar-color); |
| 32 | |
| 33 | --text-color-default: var(--fg-default-color); |
| 34 | --text-color-secondary: var(--fg-secondary-color); |
| 35 | --text-color-tertiary: var(--fg-tertiary-color); |
| 36 | |
| 37 | --text-xxs: 10px; |
| 38 | |
| 39 | --breakpoint-xs: 460px; |
| 40 | --breakpoint-desktop: 701px; |
| 41 | |
| 42 | --animate-fade: fade 0.3s forwards; |
| 43 | |
| 44 | @keyframes fade { |
| 45 | from { |
| 46 | opacity: 0; |
| 47 | } |
| 48 | to { |
| 49 | opacity: 1; |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | --animate-fade-up: fade-up 0.3s forwards; |
| 54 | |
| 55 | @keyframes fade-up { |
| 56 | from { |
| 57 | opacity: 0; |
| 58 | transform: translateY(50%); |
| 59 | } |
| 60 | to { |
| 61 | opacity: 1; |
| 62 | transform: translateY(0); |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | @utility delay-* { |
| 68 | animation-delay: calc(var(--value) * 1ms); |
| 69 | } |
| 70 | |
| 71 | @utility page { |
| 72 | padding-bottom: var(--view-padding); |
| 73 | } |
| 74 | |
| 75 | @utility page-wrapped { |
| 76 | padding-bottom: 0; |
| 77 | height: calc(100svh - var(--toolbar-height) - var(--view-padding) - var(--header-bar-height) - 20px); |
| 78 | } |
| 79 | |
| 80 | @utility page-min-wrapped { |
| 81 | padding-bottom: 0; |
| 82 | min-height: calc(100svh - var(--toolbar-height) - var(--view-padding) - var(--header-bar-height)); |
| 83 | } |
| 84 | |
| 85 | @layer base { |
| 86 | /* |
| 87 | The default border color has changed to `currentColor` in Tailwind CSS v4, |
| 88 | so we've added these compatibility styles to make sure everything still |
| 89 | looks the same as it did with Tailwind CSS v3. |
| 90 | |
| 91 | If we ever want to remove these styles, we need to add an explicit border |
| 92 | color utility to any element that depends on these defaults. |
| 93 | */ |
| 94 | *, |
| 95 | ::after, |
| 96 | ::before, |
| 97 | ::backdrop, |
| 98 | ::file-selector-button { |
| 99 | border-color: var(--color-gray-200, currentColor); |
| 100 | } |
| 101 | |
| 102 | html, |
| 103 | body { |
| 104 | text-size-adjust: 100%; |
| 105 | -webkit-tap-highlight-color: transparent; |
| 106 | -webkit-touch-callout: none; |
| 107 | -webkit-font-smoothing: antialiased; |
| 108 | -moz-osx-font-smoothing: grayscale; |
| 109 | text-rendering: optimizeLegibility; |
| 110 | line-height: var(--line-height); |
| 111 | font-size: var(--font-size); |
| 112 | text-wrap: pretty; |
| 113 | |
| 114 | margin: 0; |
| 115 | padding: 0; |
| 116 | box-sizing: border-box; |
| 117 | |
| 118 | width: 100vw; |
| 119 | height: 100vh; |
| 120 | height: 100svh; |
| 121 | overflow: hidden; |
| 122 | |
| 123 | &:focus { |
| 124 | outline: none; |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | [v-cloak] { |
| 129 | display: none !important; |
| 130 | } |
| 131 | |
| 132 | ::view-transition-old(root), |
| 133 | ::view-transition-new(root) { |
| 134 | animation: none; |
| 135 | mix-blend-mode: normal; |
| 136 | } |
| 137 | ::view-transition-old(root) { |
| 138 | z-index: 1; |
| 139 | } |
| 140 | ::view-transition-new(root) { |
| 141 | z-index: 99999; |
| 142 | } |
| 143 | |
| 144 | ::selection { |
| 145 | background-color: rgba(var(--primary-color-rgb) / 0.2); |
| 146 | } |
| 147 | |
| 148 | #app { |
| 149 | width: 100vw; |
| 150 | height: 100vh; |
| 151 | height: 100svh; |
| 152 | overflow: auto; |
| 153 | } |
| 154 | |
| 155 | svg { |
| 156 | touch-action: initial !important; |
| 157 | } |
| 158 | |
| 159 | input { |
| 160 | accent-color: var(--primary-color); |
| 161 | } |
| 162 | |
| 163 | p { |
| 164 | color: var(--fg-secondary-color); |
| 165 | } |
| 166 | |
| 167 | code, |
| 168 | kbd, |
| 169 | samp, |
| 170 | pre { |
| 171 | font-family: var(--font-family-mono); |
| 172 | } |
| 173 | |
| 174 | code { |
| 175 | padding: 1px 6px; |
| 176 | border-radius: var(--border-radius-small); |
| 177 | background-color: rgba(var(--hover-color-rgb) / 0.4); |
| 178 | font-size: 13px; |
| 179 | } |
| 180 | pre { |
| 181 | border-radius: var(--border-radius-small); |
| 182 | |
| 183 | code { |
| 184 | padding: 12px; |
| 185 | display: block; |
| 186 | overflow-x: auto; |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | a { |
| 191 | text-decoration: underline; |
| 192 | text-decoration-color: var(--primary-color); |
| 193 | color: var(--primary-color); |
| 194 | } |
| 195 | |
| 196 | blockquote { |
| 197 | display: block; |
| 198 | padding-left: 1em; |
| 199 | border-left: 4px solid var(--border-color); |
| 200 | } |
| 201 | |
| 202 | dl { |
| 203 | dt { |
| 204 | font-weight: bold; |
| 205 | margin-bottom: 2px; |
| 206 | } |
| 207 | |
| 208 | & > dd:not(:last-child) { |
| 209 | margin-bottom: 10px; |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | ul { |
| 214 | display: block; |
| 215 | list-style-type: disc; |
| 216 | padding-left: 20px; |
| 217 | line-height: 1.6; |
| 218 | |
| 219 | ul { |
| 220 | list-style-type: circle; |
| 221 | margin-top: 3px; |
| 222 | margin-bottom: 6px; |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | ol { |
| 227 | display: block; |
| 228 | list-style-type: decimal; |
| 229 | padding-left: 20px; |
| 230 | line-height: 1.6; |
| 231 | |
| 232 | ol { |
| 233 | list-style-type: decimal; |
| 234 | margin-top: 3px; |
| 235 | margin-bottom: 6px; |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | mark { |
| 240 | padding: 2px 0px; |
| 241 | border-radius: var(--border-radius-small); |
| 242 | background-color: rgba(var(--primary-color-rgb) / 0.3); |
| 243 | color: var(--fg-default-color); |
| 244 | } |
| 245 | |
| 246 | @media print { |
| 247 | html, |
| 248 | body { |
| 249 | overflow: initial; |
| 250 | } |
| 251 | body { |
| 252 | #app { |
| 253 | height: initial; |
| 254 | background-color: white; |
| 255 | |
| 256 | & > .n-config-provider { |
| 257 | & > .layout { |
| 258 | display: block; |
| 259 | height: initial; |
| 260 | background-color: white; |
| 261 | |
| 262 | & > .header-bar { |
| 263 | display: none; |
| 264 | } |
| 265 | & > .main { |
| 266 | background-color: white; |
| 267 | overflow: initial; |
| 268 | height: initial; |
| 269 | |
| 270 | header.toolbar { |
| 271 | display: none; |
| 272 | } |
| 273 | footer.footer { |
| 274 | display: none; |
| 275 | } |
| 276 | |
| 277 | & > .n-scrollbar { |
| 278 | overflow: initial; |
| 279 | height: initial; |
| 280 | |
| 281 | & > .n-scrollbar-container { |
| 282 | overflow: initial; |
| 283 | height: initial; |
| 284 | } |
| 285 | } |
| 286 | } |
| 287 | } |
| 288 | } |
| 289 | } |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | html.theme-dark .shiki, |
| 294 | html.theme-dark .shiki span { |
| 295 | color: var(--shiki-dark) !important; |
| 296 | /*background-color: var(--shiki-dark-bg) !important;*/ |
| 297 | /* Optional, if you also want font styles */ |
| 298 | font-style: var(--shiki-dark-font-style) !important; |
| 299 | font-weight: var(--shiki-dark-font-weight) !important; |
| 300 | text-decoration: var(--shiki-dark-text-decoration) !important; |
| 301 | } |
| 302 | html.theme-dark, |
| 303 | html.theme-light { |
| 304 | .shiki { |
| 305 | overflow: hidden; |
| 306 | background-color: transparent !important; |
| 307 | |
| 308 | span { |
| 309 | background-color: transparent !important; |
| 310 | } |
| 311 | } |
| 312 | } |
| 313 | } |