@hanzo/ui 8.1.20 → 8.1.21

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/dist/gallery.html CHANGED
@@ -1,4 +1,4 @@
1
- <!doctype html><html lang="en" class="t_dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>@hanzo/ui 8.1.20</title><style>/* @hanzo/ui — generated by scripts/gen-css.mjs. Do not edit. */
1
+ <!doctype html><html lang="en" class="t_dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>@hanzo/ui 8.1.21</title><style>/* @hanzo/ui — generated by scripts/gen-css.mjs. Do not edit. */
2
2
  :root { --hanzo-ui-styles: 1; }
3
3
  /* Hanzo Design System — the entry point. Import THIS one file.
4
4
  *
@@ -1957,24 +1957,34 @@
1957
1957
  /* ─────────────────────────────────────────────────────────────────────────────
1958
1958
  Scrollbars, on the surfaces this package scrolls.
1959
1959
 
1960
- A scroll region is a component decision, so its scrollbar is one too. Left to
1961
- the platform it is not neutral: on Linux/GTK Chrome draws a wide track with
1962
- STEPPER ARROWS at both ends, and a dark product grows two grey buttons per
1963
- scroll region — visible in chat's thread, its source strip and the composer at
1964
- the same time. Windows draws a wide light track. macOS overlays a thin one and
1965
- hides it, which is the behaviour the other two should have had.
1966
-
1967
- So the package states it, and states it ONCE, for the five slots that actually
1968
- scroll (measured, not guessed: textarea, fill, thread, sources-strip,
1969
- composer-field). Scoping to our own slots is the point — a component library
1970
- restyling the HOST's page scrollbars is taking a decision that is not its own.
1971
-
1972
- `::-webkit-scrollbar-button { display: none }` is the line that removes the
1973
- steppers; without it the arrows survive every other rule here. The thumb sits
1974
- on the same alpha ladder as every other edge, so it lifts with its surface
1975
- instead of being a fixed grey that only suits one theme.
1960
+ Left to the platform this is not neutral: Linux/GTK Chrome draws a wide track
1961
+ with STEPPER ARROWS at both ends, so a dark product grows two grey buttons per
1962
+ scroll region. Windows draws a wide light track. macOS overlays a thin one,
1963
+ which is the behaviour the other two should have had.
1964
+
1965
+ THE TWO HALVES MUST NOT BE DECLARED TOGETHER, and that is the whole subtlety.
1966
+ Chromium supports both the standard properties and the `::-webkit-scrollbar`
1967
+ pseudo-elements — but the moment `scrollbar-width` or `scrollbar-color` is
1968
+ anything other than `auto`, it takes the standard path and DISCARDS the entire
1969
+ webkit block. Shipping both is how 8.1.19 removed nothing: measured headed on
1970
+ Linux, as-shipped gave a 10px gutter with arrows, while the authored webkit
1971
+ rule alone gives 8px with none. Isolated: webkit-only 8px no arrows;
1972
+ standard-only 10px arrows; both together 10px arrows.
1973
+
1974
+ Neither half is redundant, so neither can simply be deleted — Firefox
1975
+ implements ONLY the standard properties, Safari ONLY the webkit ones. They are
1976
+ separated by engine instead: the webkit block applies wherever the selector is
1977
+ understood, and the standard properties apply only where it is not.
1978
+
1979
+ And it is invisible headless. Chromium's headless shell paints OVERLAY
1980
+ scrollbars, so nothing is drawn, `offsetWidth - clientWidth` is 0 on a blank
1981
+ page, and `getComputedStyle(el, '::-webkit-scrollbar-button').display` happily
1982
+ reports `none` for a rule that never ran. This must be checked headed.
1976
1983
  ───────────────────────────────────────────────────────────────────────────── */
1977
- :where(
1984
+
1985
+ /* Firefox and anything else with no webkit pseudo-elements. */
1986
+ @supports not selector(::-webkit-scrollbar) {
1987
+ :where(
1978
1988
  [data-slot='fill'],
1979
1989
  [data-slot='thread'],
1980
1990
  [data-slot='sources-strip'],
@@ -1983,12 +1993,44 @@
1983
1993
  [data-slot='textarea'],
1984
1994
  [data-slot='composer-field']
1985
1995
  ) {
1986
- /* Firefox — no pseudo-elements, two properties, same intent. */
1987
- scrollbar-width: thin;
1988
- scrollbar-color: rgb(255 255 255 / 0.18) transparent;
1989
- }
1996
+ scrollbar-width: thin;
1997
+ scrollbar-color: rgb(255 255 255 / 0.18) transparent;
1998
+ }
1999
+ .t_light :where(
2000
+ [data-slot='fill'],
2001
+ [data-slot='thread'],
2002
+ [data-slot='sources-strip'],
2003
+ [data-slot='sidebar-scroll'],
2004
+ [data-slot='scroll-area-viewport'],
2005
+ [data-slot='textarea'],
2006
+ [data-slot='composer-field']
2007
+ ) { scrollbar-color: rgb(0 0 0 / 0.20) transparent; }
2008
+ }
2009
+
2010
+ /* Chromium and Safari.
2011
+ The first rule is the load-bearing one and it is a RESET, not a style.
2012
+ @hanzo/design sets `scrollbar-color` and `scrollbar-width` on `:where(html)`
2013
+ (theme.css), and both INHERIT — so every element in the document already
2014
+ carries a non-`auto` value, Chromium takes the standard path, and the whole
2015
+ webkit block below is discarded before it is read. Nothing declared here can
2016
+ win until the inherited value is put back to `auto` on the element itself.
2017
+ That is why the arrows survived 8.1.19: the competing declaration was one
2018
+ level up and inherited, not a rule anyone would find in this file. */
2019
+ @supports selector(::-webkit-scrollbar) {
2020
+ :where(
2021
+ [data-slot='fill'],
2022
+ [data-slot='thread'],
2023
+ [data-slot='sources-strip'],
2024
+ [data-slot='sidebar-scroll'],
2025
+ [data-slot='scroll-area-viewport'],
2026
+ [data-slot='textarea'],
2027
+ [data-slot='composer-field']
2028
+ ) {
2029
+ scrollbar-width: auto;
2030
+ scrollbar-color: auto;
2031
+ }
1990
2032
 
1991
- :where(
2033
+ :where(
1992
2034
  [data-slot='fill'],
1993
2035
  [data-slot='thread'],
1994
2036
  [data-slot='sources-strip'],
@@ -1996,13 +2038,11 @@
1996
2038
  [data-slot='scroll-area-viewport'],
1997
2039
  [data-slot='textarea'],
1998
2040
  [data-slot='composer-field']
1999
- )::-webkit-scrollbar {
2000
- width: 8px;
2001
- height: 8px;
2002
- }
2041
+ )::-webkit-scrollbar { width: 8px; height: 8px; }
2003
2042
 
2004
- /* The steppers. This is the rule that removes the arrows. */
2005
- :where(
2043
+ /* The steppers. This is the rule that removes the arrows, and the reason the
2044
+ two halves had to be separated at all. */
2045
+ :where(
2006
2046
  [data-slot='fill'],
2007
2047
  [data-slot='thread'],
2008
2048
  [data-slot='sources-strip'],
@@ -2010,13 +2050,9 @@
2010
2050
  [data-slot='scroll-area-viewport'],
2011
2051
  [data-slot='textarea'],
2012
2052
  [data-slot='composer-field']
2013
- )::-webkit-scrollbar-button {
2014
- display: none;
2015
- width: 0;
2016
- height: 0;
2017
- }
2053
+ )::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
2018
2054
 
2019
- :where(
2055
+ :where(
2020
2056
  [data-slot='fill'],
2021
2057
  [data-slot='thread'],
2022
2058
  [data-slot='sources-strip'],
@@ -2024,11 +2060,9 @@
2024
2060
  [data-slot='scroll-area-viewport'],
2025
2061
  [data-slot='textarea'],
2026
2062
  [data-slot='composer-field']
2027
- )::-webkit-scrollbar-track {
2028
- background: transparent;
2029
- }
2063
+ )::-webkit-scrollbar-track { background: transparent; }
2030
2064
 
2031
- :where(
2065
+ :where(
2032
2066
  [data-slot='fill'],
2033
2067
  [data-slot='thread'],
2034
2068
  [data-slot='sources-strip'],
@@ -2037,16 +2071,15 @@
2037
2071
  [data-slot='textarea'],
2038
2072
  [data-slot='composer-field']
2039
2073
  )::-webkit-scrollbar-thumb {
2040
- background: rgb(255 255 255 / 0.18);
2041
- border-radius: 999px;
2042
- /* A transparent border with background-clip keeps the thumb off the very edge
2043
- without a track colour doing it, which is what makes it read as an overlay
2044
- rather than a channel. */
2045
- border: 2px solid transparent;
2046
- background-clip: content-box;
2047
- }
2048
-
2049
- :where(
2074
+ background: rgb(255 255 255 / 0.18);
2075
+ border-radius: 999px;
2076
+ /* A transparent border with background-clip keeps the thumb off the very
2077
+ edge without a track colour doing it, so it reads as an overlay rather
2078
+ than a channel. */
2079
+ border: 2px solid transparent;
2080
+ background-clip: content-box;
2081
+ }
2082
+ :where(
2050
2083
  [data-slot='fill'],
2051
2084
  [data-slot='thread'],
2052
2085
  [data-slot='sources-strip'],
@@ -2055,12 +2088,10 @@
2055
2088
  [data-slot='textarea'],
2056
2089
  [data-slot='composer-field']
2057
2090
  )::-webkit-scrollbar-thumb:hover {
2058
- background: rgb(255 255 255 / 0.30);
2059
- background-clip: content-box;
2060
- }
2061
-
2062
- /* The light theme reads the same ladder from the other side. */
2063
- .t_light :where(
2091
+ background: rgb(255 255 255 / 0.30);
2092
+ background-clip: content-box;
2093
+ }
2094
+ :where(
2064
2095
  [data-slot='fill'],
2065
2096
  [data-slot='thread'],
2066
2097
  [data-slot='sources-strip'],
@@ -2068,11 +2099,9 @@
2068
2099
  [data-slot='scroll-area-viewport'],
2069
2100
  [data-slot='textarea'],
2070
2101
  [data-slot='composer-field']
2071
- ) {
2072
- scrollbar-color: rgb(0 0 0 / 0.20) transparent;
2073
- }
2102
+ )::-webkit-scrollbar-corner { background: transparent; }
2074
2103
 
2075
- .t_light :where(
2104
+ .t_light :where(
2076
2105
  [data-slot='fill'],
2077
2106
  [data-slot='thread'],
2078
2107
  [data-slot='sources-strip'],
@@ -2081,17 +2110,15 @@
2081
2110
  [data-slot='textarea'],
2082
2111
  [data-slot='composer-field']
2083
2112
  )::-webkit-scrollbar-thumb {
2084
- background: rgb(0 0 0 / 0.20);
2085
- background-clip: content-box;
2113
+ background: rgb(0 0 0 / 0.20);
2114
+ background-clip: content-box;
2115
+ }
2086
2116
  }
2087
2117
 
2088
2118
  /* The textarea's resize grip is the other platform artefact in the same family:
2089
- a diagonal hatch in the corner of every Textarea and composer, drawn by the UA
2090
- and matching nothing. A composer that grows with its content does not need a
2091
- drag handle, and one that does not grow should not offer a broken one. */
2092
- :where([data-slot='textarea'], [data-slot='composer-field']) {
2093
- resize: none;
2094
- }
2119
+ a diagonal hatch drawn by the UA that matches nothing. A composer that grows
2120
+ with its content does not need one. */
2121
+ :where([data-slot='textarea'], [data-slot='composer-field']) { resize: none; }
2095
2122
 
2096
2123
  ._ovs-contain {overscroll-behavior:contain;}
2097
2124
  .t_unmounted .is_View, .t_unmounted .is_Text { transition: none !important; }
@@ -269,24 +269,34 @@
269
269
  /* ─────────────────────────────────────────────────────────────────────────────
270
270
  Scrollbars, on the surfaces this package scrolls.
271
271
 
272
- A scroll region is a component decision, so its scrollbar is one too. Left to
273
- the platform it is not neutral: on Linux/GTK Chrome draws a wide track with
274
- STEPPER ARROWS at both ends, and a dark product grows two grey buttons per
275
- scroll region — visible in chat's thread, its source strip and the composer at
276
- the same time. Windows draws a wide light track. macOS overlays a thin one and
277
- hides it, which is the behaviour the other two should have had.
278
-
279
- So the package states it, and states it ONCE, for the five slots that actually
280
- scroll (measured, not guessed: textarea, fill, thread, sources-strip,
281
- composer-field). Scoping to our own slots is the point — a component library
282
- restyling the HOST's page scrollbars is taking a decision that is not its own.
283
-
284
- `::-webkit-scrollbar-button { display: none }` is the line that removes the
285
- steppers; without it the arrows survive every other rule here. The thumb sits
286
- on the same alpha ladder as every other edge, so it lifts with its surface
287
- instead of being a fixed grey that only suits one theme.
272
+ Left to the platform this is not neutral: Linux/GTK Chrome draws a wide track
273
+ with STEPPER ARROWS at both ends, so a dark product grows two grey buttons per
274
+ scroll region. Windows draws a wide light track. macOS overlays a thin one,
275
+ which is the behaviour the other two should have had.
276
+
277
+ THE TWO HALVES MUST NOT BE DECLARED TOGETHER, and that is the whole subtlety.
278
+ Chromium supports both the standard properties and the `::-webkit-scrollbar`
279
+ pseudo-elements — but the moment `scrollbar-width` or `scrollbar-color` is
280
+ anything other than `auto`, it takes the standard path and DISCARDS the entire
281
+ webkit block. Shipping both is how 8.1.19 removed nothing: measured headed on
282
+ Linux, as-shipped gave a 10px gutter with arrows, while the authored webkit
283
+ rule alone gives 8px with none. Isolated: webkit-only 8px no arrows;
284
+ standard-only 10px arrows; both together 10px arrows.
285
+
286
+ Neither half is redundant, so neither can simply be deleted — Firefox
287
+ implements ONLY the standard properties, Safari ONLY the webkit ones. They are
288
+ separated by engine instead: the webkit block applies wherever the selector is
289
+ understood, and the standard properties apply only where it is not.
290
+
291
+ And it is invisible headless. Chromium's headless shell paints OVERLAY
292
+ scrollbars, so nothing is drawn, `offsetWidth - clientWidth` is 0 on a blank
293
+ page, and `getComputedStyle(el, '::-webkit-scrollbar-button').display` happily
294
+ reports `none` for a rule that never ran. This must be checked headed.
288
295
  ───────────────────────────────────────────────────────────────────────────── */
289
- :where(
296
+
297
+ /* Firefox and anything else with no webkit pseudo-elements. */
298
+ @supports not selector(::-webkit-scrollbar) {
299
+ :where(
290
300
  [data-slot='fill'],
291
301
  [data-slot='thread'],
292
302
  [data-slot='sources-strip'],
@@ -295,12 +305,44 @@
295
305
  [data-slot='textarea'],
296
306
  [data-slot='composer-field']
297
307
  ) {
298
- /* Firefox — no pseudo-elements, two properties, same intent. */
299
- scrollbar-width: thin;
300
- scrollbar-color: rgb(255 255 255 / 0.18) transparent;
301
- }
308
+ scrollbar-width: thin;
309
+ scrollbar-color: rgb(255 255 255 / 0.18) transparent;
310
+ }
311
+ .t_light :where(
312
+ [data-slot='fill'],
313
+ [data-slot='thread'],
314
+ [data-slot='sources-strip'],
315
+ [data-slot='sidebar-scroll'],
316
+ [data-slot='scroll-area-viewport'],
317
+ [data-slot='textarea'],
318
+ [data-slot='composer-field']
319
+ ) { scrollbar-color: rgb(0 0 0 / 0.20) transparent; }
320
+ }
321
+
322
+ /* Chromium and Safari.
323
+ The first rule is the load-bearing one and it is a RESET, not a style.
324
+ @hanzo/design sets `scrollbar-color` and `scrollbar-width` on `:where(html)`
325
+ (theme.css), and both INHERIT — so every element in the document already
326
+ carries a non-`auto` value, Chromium takes the standard path, and the whole
327
+ webkit block below is discarded before it is read. Nothing declared here can
328
+ win until the inherited value is put back to `auto` on the element itself.
329
+ That is why the arrows survived 8.1.19: the competing declaration was one
330
+ level up and inherited, not a rule anyone would find in this file. */
331
+ @supports selector(::-webkit-scrollbar) {
332
+ :where(
333
+ [data-slot='fill'],
334
+ [data-slot='thread'],
335
+ [data-slot='sources-strip'],
336
+ [data-slot='sidebar-scroll'],
337
+ [data-slot='scroll-area-viewport'],
338
+ [data-slot='textarea'],
339
+ [data-slot='composer-field']
340
+ ) {
341
+ scrollbar-width: auto;
342
+ scrollbar-color: auto;
343
+ }
302
344
 
303
- :where(
345
+ :where(
304
346
  [data-slot='fill'],
305
347
  [data-slot='thread'],
306
348
  [data-slot='sources-strip'],
@@ -308,13 +350,11 @@
308
350
  [data-slot='scroll-area-viewport'],
309
351
  [data-slot='textarea'],
310
352
  [data-slot='composer-field']
311
- )::-webkit-scrollbar {
312
- width: 8px;
313
- height: 8px;
314
- }
353
+ )::-webkit-scrollbar { width: 8px; height: 8px; }
315
354
 
316
- /* The steppers. This is the rule that removes the arrows. */
317
- :where(
355
+ /* The steppers. This is the rule that removes the arrows, and the reason the
356
+ two halves had to be separated at all. */
357
+ :where(
318
358
  [data-slot='fill'],
319
359
  [data-slot='thread'],
320
360
  [data-slot='sources-strip'],
@@ -322,13 +362,9 @@
322
362
  [data-slot='scroll-area-viewport'],
323
363
  [data-slot='textarea'],
324
364
  [data-slot='composer-field']
325
- )::-webkit-scrollbar-button {
326
- display: none;
327
- width: 0;
328
- height: 0;
329
- }
365
+ )::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
330
366
 
331
- :where(
367
+ :where(
332
368
  [data-slot='fill'],
333
369
  [data-slot='thread'],
334
370
  [data-slot='sources-strip'],
@@ -336,11 +372,9 @@
336
372
  [data-slot='scroll-area-viewport'],
337
373
  [data-slot='textarea'],
338
374
  [data-slot='composer-field']
339
- )::-webkit-scrollbar-track {
340
- background: transparent;
341
- }
375
+ )::-webkit-scrollbar-track { background: transparent; }
342
376
 
343
- :where(
377
+ :where(
344
378
  [data-slot='fill'],
345
379
  [data-slot='thread'],
346
380
  [data-slot='sources-strip'],
@@ -349,16 +383,15 @@
349
383
  [data-slot='textarea'],
350
384
  [data-slot='composer-field']
351
385
  )::-webkit-scrollbar-thumb {
352
- background: rgb(255 255 255 / 0.18);
353
- border-radius: 999px;
354
- /* A transparent border with background-clip keeps the thumb off the very edge
355
- without a track colour doing it, which is what makes it read as an overlay
356
- rather than a channel. */
357
- border: 2px solid transparent;
358
- background-clip: content-box;
359
- }
360
-
361
- :where(
386
+ background: rgb(255 255 255 / 0.18);
387
+ border-radius: 999px;
388
+ /* A transparent border with background-clip keeps the thumb off the very
389
+ edge without a track colour doing it, so it reads as an overlay rather
390
+ than a channel. */
391
+ border: 2px solid transparent;
392
+ background-clip: content-box;
393
+ }
394
+ :where(
362
395
  [data-slot='fill'],
363
396
  [data-slot='thread'],
364
397
  [data-slot='sources-strip'],
@@ -367,12 +400,10 @@
367
400
  [data-slot='textarea'],
368
401
  [data-slot='composer-field']
369
402
  )::-webkit-scrollbar-thumb:hover {
370
- background: rgb(255 255 255 / 0.30);
371
- background-clip: content-box;
372
- }
373
-
374
- /* The light theme reads the same ladder from the other side. */
375
- .t_light :where(
403
+ background: rgb(255 255 255 / 0.30);
404
+ background-clip: content-box;
405
+ }
406
+ :where(
376
407
  [data-slot='fill'],
377
408
  [data-slot='thread'],
378
409
  [data-slot='sources-strip'],
@@ -380,11 +411,9 @@
380
411
  [data-slot='scroll-area-viewport'],
381
412
  [data-slot='textarea'],
382
413
  [data-slot='composer-field']
383
- ) {
384
- scrollbar-color: rgb(0 0 0 / 0.20) transparent;
385
- }
414
+ )::-webkit-scrollbar-corner { background: transparent; }
386
415
 
387
- .t_light :where(
416
+ .t_light :where(
388
417
  [data-slot='fill'],
389
418
  [data-slot='thread'],
390
419
  [data-slot='sources-strip'],
@@ -393,14 +422,12 @@
393
422
  [data-slot='textarea'],
394
423
  [data-slot='composer-field']
395
424
  )::-webkit-scrollbar-thumb {
396
- background: rgb(0 0 0 / 0.20);
397
- background-clip: content-box;
425
+ background: rgb(0 0 0 / 0.20);
426
+ background-clip: content-box;
427
+ }
398
428
  }
399
429
 
400
430
  /* The textarea's resize grip is the other platform artefact in the same family:
401
- a diagonal hatch in the corner of every Textarea and composer, drawn by the UA
402
- and matching nothing. A composer that grows with its content does not need a
403
- drag handle, and one that does not grow should not offer a broken one. */
404
- :where([data-slot='textarea'], [data-slot='composer-field']) {
405
- resize: none;
406
- }
431
+ a diagonal hatch drawn by the UA that matches nothing. A composer that grows
432
+ with its content does not need one. */
433
+ :where([data-slot='textarea'], [data-slot='composer-field']) { resize: none; }
package/dist/styles.css CHANGED
@@ -1957,24 +1957,34 @@
1957
1957
  /* ─────────────────────────────────────────────────────────────────────────────
1958
1958
  Scrollbars, on the surfaces this package scrolls.
1959
1959
 
1960
- A scroll region is a component decision, so its scrollbar is one too. Left to
1961
- the platform it is not neutral: on Linux/GTK Chrome draws a wide track with
1962
- STEPPER ARROWS at both ends, and a dark product grows two grey buttons per
1963
- scroll region — visible in chat's thread, its source strip and the composer at
1964
- the same time. Windows draws a wide light track. macOS overlays a thin one and
1965
- hides it, which is the behaviour the other two should have had.
1966
-
1967
- So the package states it, and states it ONCE, for the five slots that actually
1968
- scroll (measured, not guessed: textarea, fill, thread, sources-strip,
1969
- composer-field). Scoping to our own slots is the point — a component library
1970
- restyling the HOST's page scrollbars is taking a decision that is not its own.
1971
-
1972
- `::-webkit-scrollbar-button { display: none }` is the line that removes the
1973
- steppers; without it the arrows survive every other rule here. The thumb sits
1974
- on the same alpha ladder as every other edge, so it lifts with its surface
1975
- instead of being a fixed grey that only suits one theme.
1960
+ Left to the platform this is not neutral: Linux/GTK Chrome draws a wide track
1961
+ with STEPPER ARROWS at both ends, so a dark product grows two grey buttons per
1962
+ scroll region. Windows draws a wide light track. macOS overlays a thin one,
1963
+ which is the behaviour the other two should have had.
1964
+
1965
+ THE TWO HALVES MUST NOT BE DECLARED TOGETHER, and that is the whole subtlety.
1966
+ Chromium supports both the standard properties and the `::-webkit-scrollbar`
1967
+ pseudo-elements — but the moment `scrollbar-width` or `scrollbar-color` is
1968
+ anything other than `auto`, it takes the standard path and DISCARDS the entire
1969
+ webkit block. Shipping both is how 8.1.19 removed nothing: measured headed on
1970
+ Linux, as-shipped gave a 10px gutter with arrows, while the authored webkit
1971
+ rule alone gives 8px with none. Isolated: webkit-only 8px no arrows;
1972
+ standard-only 10px arrows; both together 10px arrows.
1973
+
1974
+ Neither half is redundant, so neither can simply be deleted — Firefox
1975
+ implements ONLY the standard properties, Safari ONLY the webkit ones. They are
1976
+ separated by engine instead: the webkit block applies wherever the selector is
1977
+ understood, and the standard properties apply only where it is not.
1978
+
1979
+ And it is invisible headless. Chromium's headless shell paints OVERLAY
1980
+ scrollbars, so nothing is drawn, `offsetWidth - clientWidth` is 0 on a blank
1981
+ page, and `getComputedStyle(el, '::-webkit-scrollbar-button').display` happily
1982
+ reports `none` for a rule that never ran. This must be checked headed.
1976
1983
  ───────────────────────────────────────────────────────────────────────────── */
1977
- :where(
1984
+
1985
+ /* Firefox and anything else with no webkit pseudo-elements. */
1986
+ @supports not selector(::-webkit-scrollbar) {
1987
+ :where(
1978
1988
  [data-slot='fill'],
1979
1989
  [data-slot='thread'],
1980
1990
  [data-slot='sources-strip'],
@@ -1983,12 +1993,44 @@
1983
1993
  [data-slot='textarea'],
1984
1994
  [data-slot='composer-field']
1985
1995
  ) {
1986
- /* Firefox — no pseudo-elements, two properties, same intent. */
1987
- scrollbar-width: thin;
1988
- scrollbar-color: rgb(255 255 255 / 0.18) transparent;
1989
- }
1996
+ scrollbar-width: thin;
1997
+ scrollbar-color: rgb(255 255 255 / 0.18) transparent;
1998
+ }
1999
+ .t_light :where(
2000
+ [data-slot='fill'],
2001
+ [data-slot='thread'],
2002
+ [data-slot='sources-strip'],
2003
+ [data-slot='sidebar-scroll'],
2004
+ [data-slot='scroll-area-viewport'],
2005
+ [data-slot='textarea'],
2006
+ [data-slot='composer-field']
2007
+ ) { scrollbar-color: rgb(0 0 0 / 0.20) transparent; }
2008
+ }
2009
+
2010
+ /* Chromium and Safari.
2011
+ The first rule is the load-bearing one and it is a RESET, not a style.
2012
+ @hanzo/design sets `scrollbar-color` and `scrollbar-width` on `:where(html)`
2013
+ (theme.css), and both INHERIT — so every element in the document already
2014
+ carries a non-`auto` value, Chromium takes the standard path, and the whole
2015
+ webkit block below is discarded before it is read. Nothing declared here can
2016
+ win until the inherited value is put back to `auto` on the element itself.
2017
+ That is why the arrows survived 8.1.19: the competing declaration was one
2018
+ level up and inherited, not a rule anyone would find in this file. */
2019
+ @supports selector(::-webkit-scrollbar) {
2020
+ :where(
2021
+ [data-slot='fill'],
2022
+ [data-slot='thread'],
2023
+ [data-slot='sources-strip'],
2024
+ [data-slot='sidebar-scroll'],
2025
+ [data-slot='scroll-area-viewport'],
2026
+ [data-slot='textarea'],
2027
+ [data-slot='composer-field']
2028
+ ) {
2029
+ scrollbar-width: auto;
2030
+ scrollbar-color: auto;
2031
+ }
1990
2032
 
1991
- :where(
2033
+ :where(
1992
2034
  [data-slot='fill'],
1993
2035
  [data-slot='thread'],
1994
2036
  [data-slot='sources-strip'],
@@ -1996,13 +2038,11 @@
1996
2038
  [data-slot='scroll-area-viewport'],
1997
2039
  [data-slot='textarea'],
1998
2040
  [data-slot='composer-field']
1999
- )::-webkit-scrollbar {
2000
- width: 8px;
2001
- height: 8px;
2002
- }
2041
+ )::-webkit-scrollbar { width: 8px; height: 8px; }
2003
2042
 
2004
- /* The steppers. This is the rule that removes the arrows. */
2005
- :where(
2043
+ /* The steppers. This is the rule that removes the arrows, and the reason the
2044
+ two halves had to be separated at all. */
2045
+ :where(
2006
2046
  [data-slot='fill'],
2007
2047
  [data-slot='thread'],
2008
2048
  [data-slot='sources-strip'],
@@ -2010,13 +2050,9 @@
2010
2050
  [data-slot='scroll-area-viewport'],
2011
2051
  [data-slot='textarea'],
2012
2052
  [data-slot='composer-field']
2013
- )::-webkit-scrollbar-button {
2014
- display: none;
2015
- width: 0;
2016
- height: 0;
2017
- }
2053
+ )::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
2018
2054
 
2019
- :where(
2055
+ :where(
2020
2056
  [data-slot='fill'],
2021
2057
  [data-slot='thread'],
2022
2058
  [data-slot='sources-strip'],
@@ -2024,11 +2060,9 @@
2024
2060
  [data-slot='scroll-area-viewport'],
2025
2061
  [data-slot='textarea'],
2026
2062
  [data-slot='composer-field']
2027
- )::-webkit-scrollbar-track {
2028
- background: transparent;
2029
- }
2063
+ )::-webkit-scrollbar-track { background: transparent; }
2030
2064
 
2031
- :where(
2065
+ :where(
2032
2066
  [data-slot='fill'],
2033
2067
  [data-slot='thread'],
2034
2068
  [data-slot='sources-strip'],
@@ -2037,16 +2071,15 @@
2037
2071
  [data-slot='textarea'],
2038
2072
  [data-slot='composer-field']
2039
2073
  )::-webkit-scrollbar-thumb {
2040
- background: rgb(255 255 255 / 0.18);
2041
- border-radius: 999px;
2042
- /* A transparent border with background-clip keeps the thumb off the very edge
2043
- without a track colour doing it, which is what makes it read as an overlay
2044
- rather than a channel. */
2045
- border: 2px solid transparent;
2046
- background-clip: content-box;
2047
- }
2048
-
2049
- :where(
2074
+ background: rgb(255 255 255 / 0.18);
2075
+ border-radius: 999px;
2076
+ /* A transparent border with background-clip keeps the thumb off the very
2077
+ edge without a track colour doing it, so it reads as an overlay rather
2078
+ than a channel. */
2079
+ border: 2px solid transparent;
2080
+ background-clip: content-box;
2081
+ }
2082
+ :where(
2050
2083
  [data-slot='fill'],
2051
2084
  [data-slot='thread'],
2052
2085
  [data-slot='sources-strip'],
@@ -2055,12 +2088,10 @@
2055
2088
  [data-slot='textarea'],
2056
2089
  [data-slot='composer-field']
2057
2090
  )::-webkit-scrollbar-thumb:hover {
2058
- background: rgb(255 255 255 / 0.30);
2059
- background-clip: content-box;
2060
- }
2061
-
2062
- /* The light theme reads the same ladder from the other side. */
2063
- .t_light :where(
2091
+ background: rgb(255 255 255 / 0.30);
2092
+ background-clip: content-box;
2093
+ }
2094
+ :where(
2064
2095
  [data-slot='fill'],
2065
2096
  [data-slot='thread'],
2066
2097
  [data-slot='sources-strip'],
@@ -2068,11 +2099,9 @@
2068
2099
  [data-slot='scroll-area-viewport'],
2069
2100
  [data-slot='textarea'],
2070
2101
  [data-slot='composer-field']
2071
- ) {
2072
- scrollbar-color: rgb(0 0 0 / 0.20) transparent;
2073
- }
2102
+ )::-webkit-scrollbar-corner { background: transparent; }
2074
2103
 
2075
- .t_light :where(
2104
+ .t_light :where(
2076
2105
  [data-slot='fill'],
2077
2106
  [data-slot='thread'],
2078
2107
  [data-slot='sources-strip'],
@@ -2081,17 +2110,15 @@
2081
2110
  [data-slot='textarea'],
2082
2111
  [data-slot='composer-field']
2083
2112
  )::-webkit-scrollbar-thumb {
2084
- background: rgb(0 0 0 / 0.20);
2085
- background-clip: content-box;
2113
+ background: rgb(0 0 0 / 0.20);
2114
+ background-clip: content-box;
2115
+ }
2086
2116
  }
2087
2117
 
2088
2118
  /* The textarea's resize grip is the other platform artefact in the same family:
2089
- a diagonal hatch in the corner of every Textarea and composer, drawn by the UA
2090
- and matching nothing. A composer that grows with its content does not need a
2091
- drag handle, and one that does not grow should not offer a broken one. */
2092
- :where([data-slot='textarea'], [data-slot='composer-field']) {
2093
- resize: none;
2094
- }
2119
+ a diagonal hatch drawn by the UA that matches nothing. A composer that grows
2120
+ with its content does not need one. */
2121
+ :where([data-slot='textarea'], [data-slot='composer-field']) { resize: none; }
2095
2122
 
2096
2123
  ._ovs-contain {overscroll-behavior:contain;}
2097
2124
  .t_unmounted .is_View, .t_unmounted .is_Text { transition: none !important; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "8.1.20",
3
+ "version": "8.1.21",
4
4
  "type": "module",
5
5
  "description": "Hanzo UI — the one canonical Hanzo component library, on @hanzo/gui + @hanzo/design. ONE substrate: every component renders through @hanzo/gui primitives, so the same import works on web, native (expo) and desktop (Tauri). Self-contained (theme.css), presentational, host-agnostic, clean-room.",
6
6
  "exports": {