@wow-two-beta/fe 0.0.25 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/index.css +58 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,6 +40,13 @@ It registers the package's own utility classes, which Tailwind otherwise exclude
|
|
|
40
40
|
`themes.css` contains generated theme tokens and `themes.json` their manifest.
|
|
41
41
|
Load the theme stylesheet when using a generated theme class.
|
|
42
42
|
|
|
43
|
+
`styles.css` also themes every scrollbar on fine-pointer devices (mouse or trackpad; touch keeps its overlay bars).
|
|
44
|
+
Chromium and Safari draw a slim bar with a rounded, inset thumb that follows the theme tokens (`--color-border-strong`,
|
|
45
|
+
hover `--color-muted-foreground`) in light and dark; Firefox draws a thin bar in the same colours. Opt one element out
|
|
46
|
+
with `class="scrollbar-native"`, or tune a subtree with `--scrollbar-size`, `--scrollbar-inset`, `--scrollbar-track`,
|
|
47
|
+
`--scrollbar-thumb` and `--scrollbar-thumb-hover`. The rules sit in `@layer base`, so an application's own scrollbar
|
|
48
|
+
CSS wins. Setting `scrollbar-width` or `scrollbar-color` on an element makes Chromium ignore the rounded style there.
|
|
49
|
+
|
|
43
50
|
`platform` is the validated theme every wow-two platform app shares (Wheelhouse's chalk and forest palette).
|
|
44
51
|
A platform app imports `themes.css` after `styles.css` and sets `class="theme-platform"` on its root, plus `dark`
|
|
45
52
|
for dark mode and `surface-ambient` on the page for the backdrop; the `glass` variants of `Navbar`,
|
package/dist/index.css
CHANGED
|
@@ -286,6 +286,64 @@ body {
|
|
|
286
286
|
color: var(--color-foreground);
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
+
/* ---------------------------------------------------------------------------
|
|
290
|
+
* Scrollbars — a slim themed track and a pill-shaped thumb on every scroll container.
|
|
291
|
+
*
|
|
292
|
+
* Chromium and Safari take `::-webkit-scrollbar*`: the thumb is a fully rounded pill, inset from the track by a
|
|
293
|
+
* transparent border so both ends read as round. Firefox draws no scrollbar pseudo-elements, so it takes the
|
|
294
|
+
* standard properties — a thin bar in the same colours, with the system's own ends. Those are deliberately kept
|
|
295
|
+
* out of Chromium and Safari, which would stop drawing the `::-webkit-scrollbar*` styles on any element that sets
|
|
296
|
+
* them. Firefox also parses `::-webkit-scrollbar` (and never draws it), so the gate is a Firefox-only property
|
|
297
|
+
* rather than `selector(::-webkit-scrollbar)`.
|
|
298
|
+
*
|
|
299
|
+
* Scope and escape hatches:
|
|
300
|
+
* - Fine pointers only (`hover: hover` and `pointer: fine`): touch devices keep their overlay scrollbars.
|
|
301
|
+
* - `@layer base` plus `:where()` keep every rule below an app's own CSS and below utilities; a component's
|
|
302
|
+
* `scrollbar-width: none` or `[&::-webkit-scrollbar]:hidden` still hides its bar.
|
|
303
|
+
* - Opt out of one element with `class="scrollbar-native"` (it draws the platform's own scrollbar).
|
|
304
|
+
* - Tune any subtree by setting custom properties on it: `--scrollbar-size` (the bar's thickness, default
|
|
305
|
+
* 0.625rem), `--scrollbar-inset` (the thumb's inset on each side, default 2px), `--scrollbar-track`,
|
|
306
|
+
* `--scrollbar-thumb` and `--scrollbar-thumb-hover`. The default colours follow the theme tokens, so they
|
|
307
|
+
* flip with `.dark` and any generated theme.
|
|
308
|
+
* ------------------------------------------------------------------------- */
|
|
309
|
+
@layer base {
|
|
310
|
+
@media (hover: hover) and (pointer: fine) {
|
|
311
|
+
:where(*:not(.scrollbar-native))::-webkit-scrollbar {
|
|
312
|
+
width: var(--scrollbar-size, 0.625rem);
|
|
313
|
+
height: var(--scrollbar-size, 0.625rem);
|
|
314
|
+
background-color: var(--scrollbar-track, transparent);
|
|
315
|
+
}
|
|
316
|
+
:where(*:not(.scrollbar-native))::-webkit-scrollbar-track,
|
|
317
|
+
:where(*:not(.scrollbar-native))::-webkit-scrollbar-corner {
|
|
318
|
+
background-color: transparent;
|
|
319
|
+
}
|
|
320
|
+
:where(*:not(.scrollbar-native))::-webkit-scrollbar-button {
|
|
321
|
+
display: none;
|
|
322
|
+
}
|
|
323
|
+
:where(*:not(.scrollbar-native))::-webkit-scrollbar-thumb {
|
|
324
|
+
background-color: var(--scrollbar-thumb, var(--color-border-strong));
|
|
325
|
+
background-clip: padding-box;
|
|
326
|
+
border: var(--scrollbar-inset, 2px) solid transparent;
|
|
327
|
+
border-radius: 9999px;
|
|
328
|
+
}
|
|
329
|
+
:where(*:not(.scrollbar-native))::-webkit-scrollbar-thumb:hover,
|
|
330
|
+
:where(*:not(.scrollbar-native))::-webkit-scrollbar-thumb:active {
|
|
331
|
+
background-color: var(--scrollbar-thumb-hover, var(--color-muted-foreground));
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
@supports ((-moz-appearance: none) or (-moz-orient: vertical)) {
|
|
335
|
+
:where(*:not(.scrollbar-native)) {
|
|
336
|
+
scrollbar-width: thin;
|
|
337
|
+
scrollbar-color: var(--scrollbar-thumb, var(--color-border-strong)) var(--scrollbar-track, transparent);
|
|
338
|
+
}
|
|
339
|
+
/* `scrollbar-color` inherits, so an opted-out element must reset it rather than only skip the rule above. */
|
|
340
|
+
.scrollbar-native {
|
|
341
|
+
scrollbar-color: auto;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
289
347
|
/* Ambient surface treatments — opt-in via Card `ambient`. */
|
|
290
348
|
.surface-sheen {
|
|
291
349
|
background-image: linear-gradient(180deg, rgb(255 255 255 / 0.05), transparent 55%);
|
package/package.json
CHANGED