@gjsify/adwaita-web 0.31.0 → 0.33.0

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.
Files changed (183) hide show
  1. package/dist/adwaita-web.css +835 -299
  2. package/dist/adwaita-web.css.map +1 -1
  3. package/lib/types/adw-about-dialog.spec.d.ts +1 -0
  4. package/lib/types/adw-action-rows.spec.d.ts +1 -0
  5. package/lib/types/adw-avatar.spec.d.ts +1 -0
  6. package/lib/types/adw-banner.spec.d.ts +1 -0
  7. package/lib/types/adw-button-content.spec.d.ts +1 -0
  8. package/lib/types/adw-carousel.spec.d.ts +1 -0
  9. package/lib/types/adw-checks.spec.d.ts +1 -0
  10. package/lib/types/adw-header-bar.spec.d.ts +1 -0
  11. package/lib/types/adw-icon.spec.d.ts +1 -0
  12. package/lib/types/adw-progress-bar.spec.d.ts +1 -0
  13. package/lib/types/adw-sidebar.spec.d.ts +1 -0
  14. package/lib/types/adw-switch.spec.d.ts +1 -0
  15. package/lib/types/adw-wrap-box.spec.d.ts +1 -0
  16. package/lib/types/bottom-sheet.spec.d.ts +1 -0
  17. package/lib/types/breakpoints.d.ts +22 -0
  18. package/lib/types/breakpoints.spec.d.ts +1 -0
  19. package/lib/types/chrome.spec.d.ts +1 -0
  20. package/lib/types/elements/adw-about-dialog.d.ts +47 -8
  21. package/lib/types/elements/adw-action-row.d.ts +35 -0
  22. package/lib/types/elements/adw-avatar.d.ts +11 -0
  23. package/lib/types/elements/adw-bottom-sheet.d.ts +33 -4
  24. package/lib/types/elements/adw-button-content.d.ts +12 -0
  25. package/lib/types/elements/adw-button-row.d.ts +10 -1
  26. package/lib/types/elements/adw-carousel.d.ts +111 -8
  27. package/lib/types/elements/adw-checks.d.ts +57 -0
  28. package/lib/types/elements/adw-clamp.d.ts +4 -1
  29. package/lib/types/elements/adw-combo-row.d.ts +10 -0
  30. package/lib/types/elements/adw-data-grid.d.ts +11 -31
  31. package/lib/types/elements/adw-drop-down.d.ts +17 -20
  32. package/lib/types/elements/adw-entry-row.d.ts +93 -3
  33. package/lib/types/elements/adw-expander-row.d.ts +7 -1
  34. package/lib/types/elements/adw-header-bar.d.ts +15 -0
  35. package/lib/types/elements/adw-icon.d.ts +25 -0
  36. package/lib/types/elements/adw-inline-view-switcher.d.ts +73 -11
  37. package/lib/types/elements/adw-menu-button.d.ts +6 -6
  38. package/lib/types/elements/adw-navigation-split-view.d.ts +48 -0
  39. package/lib/types/elements/adw-navigation-view.d.ts +63 -20
  40. package/lib/types/elements/adw-overlay-split-view.d.ts +94 -0
  41. package/lib/types/elements/adw-password-entry-row.d.ts +19 -10
  42. package/lib/types/elements/adw-popover.d.ts +58 -0
  43. package/lib/types/elements/adw-preferences-dialog.d.ts +57 -2
  44. package/lib/types/elements/adw-preferences-group.d.ts +31 -0
  45. package/lib/types/elements/adw-progress-bar.d.ts +38 -0
  46. package/lib/types/elements/adw-sidebar.d.ts +37 -5
  47. package/lib/types/elements/adw-spinner.d.ts +23 -0
  48. package/lib/types/elements/adw-split-button.d.ts +53 -7
  49. package/lib/types/elements/adw-switch-row.d.ts +11 -2
  50. package/lib/types/elements/adw-switch.d.ts +15 -0
  51. package/lib/types/elements/adw-tab-view.d.ts +129 -12
  52. package/lib/types/elements/adw-toolbar-view.d.ts +5 -0
  53. package/lib/types/elements/adw-view-stack.d.ts +39 -19
  54. package/lib/types/elements/adw-view-switcher-bar.d.ts +25 -7
  55. package/lib/types/elements/adw-view-switcher.d.ts +76 -13
  56. package/lib/types/elements/adw-window-title.d.ts +3 -1
  57. package/lib/types/elements/adw-wrap-box.d.ts +58 -3
  58. package/lib/types/elements/view-switcher-dom.d.ts +44 -0
  59. package/lib/types/entry-rows.spec.d.ts +1 -0
  60. package/lib/types/index.d.ts +7 -0
  61. package/lib/types/navigation-view.spec.d.ts +1 -0
  62. package/lib/types/preferences-search.d.ts +20 -0
  63. package/lib/types/preferences.spec.d.ts +1 -0
  64. package/lib/types/split-button.spec.d.ts +1 -0
  65. package/lib/types/split-views.spec.d.ts +1 -0
  66. package/lib/types/styles.generated.d.ts +1 -1
  67. package/lib/types/tab-view.spec.d.ts +1 -0
  68. package/lib/types/view-stack.spec.d.ts +1 -0
  69. package/lib/types/view-switcher.spec.d.ts +1 -0
  70. package/package.json +6 -6
  71. package/scss/_banner.scss +13 -0
  72. package/scss/_bottom_sheet.scss +5 -6
  73. package/scss/_button.scss +3 -26
  74. package/scss/_button_content.scss +28 -0
  75. package/scss/_checks.scss +228 -0
  76. package/scss/_clamp.scss +9 -3
  77. package/scss/_combo_row.scss +19 -0
  78. package/scss/_data_grid.scss +15 -7
  79. package/scss/_drop_down.scss +12 -55
  80. package/scss/_expander_row.scss +5 -50
  81. package/scss/_icon.scss +51 -0
  82. package/scss/_icons.generated.scss +6 -0
  83. package/scss/_inline_view_switcher.scss +34 -0
  84. package/scss/_labels.scss +135 -0
  85. package/scss/_menu_button.scss +10 -70
  86. package/scss/_navigation_split_view.scss +47 -8
  87. package/scss/_overlay_split_view.scss +117 -32
  88. package/scss/_popover.scss +186 -0
  89. package/scss/_preferences.scss +29 -0
  90. package/scss/_preferences_dialog.scss +17 -0
  91. package/scss/_progress_bar.scss +161 -0
  92. package/scss/_reset.scss +18 -7
  93. package/scss/_spinner.scss +37 -19
  94. package/scss/_split_button.scss +6 -50
  95. package/scss/_switch.scss +90 -0
  96. package/scss/_switch_row.scss +6 -52
  97. package/scss/_tab_view.scss +63 -0
  98. package/scss/_theme.scss +10 -0
  99. package/scss/_toolbar_view.scss +74 -0
  100. package/scss/_variables.scss +34 -0
  101. package/scss/_view_switcher.scss +40 -0
  102. package/scss/_view_switcher_bar.scss +37 -0
  103. package/scss/_wrap_box.scss +65 -6
  104. package/scss/adwaita-skin.scss +23 -0
  105. package/src/adw-about-dialog.spec.ts +350 -0
  106. package/src/adw-action-rows.spec.ts +342 -0
  107. package/src/adw-avatar.spec.ts +176 -0
  108. package/src/adw-banner.spec.ts +152 -0
  109. package/src/adw-button-content.spec.ts +207 -0
  110. package/src/adw-button-row.spec.ts +12 -6
  111. package/src/adw-carousel.spec.ts +389 -0
  112. package/src/adw-checks.spec.ts +368 -0
  113. package/src/adw-drop-down.spec.ts +123 -0
  114. package/src/adw-header-bar.spec.ts +83 -0
  115. package/src/adw-icon.spec.ts +167 -0
  116. package/src/adw-progress-bar.spec.ts +173 -0
  117. package/src/adw-row-state.spec.ts +49 -0
  118. package/src/adw-sidebar.spec.ts +332 -0
  119. package/src/adw-switch.spec.ts +242 -0
  120. package/src/adw-tab-view.spec.ts +12 -3
  121. package/src/adw-view-switcher-bar.spec.ts +61 -13
  122. package/src/adw-wrap-box.spec.ts +341 -0
  123. package/src/bottom-sheet.spec.ts +325 -0
  124. package/src/breakpoints.spec.ts +147 -0
  125. package/src/breakpoints.ts +67 -0
  126. package/src/chrome.spec.ts +400 -0
  127. package/src/elements/adw-about-dialog.ts +223 -163
  128. package/src/elements/adw-action-row.ts +131 -11
  129. package/src/elements/adw-avatar.ts +48 -54
  130. package/src/elements/adw-banner.ts +46 -10
  131. package/src/elements/adw-bottom-sheet.ts +145 -60
  132. package/src/elements/adw-button-content.ts +107 -33
  133. package/src/elements/adw-button-row.ts +61 -37
  134. package/src/elements/adw-button.ts +5 -7
  135. package/src/elements/adw-carousel.ts +467 -105
  136. package/src/elements/adw-checks.ts +299 -0
  137. package/src/elements/adw-clamp.ts +80 -10
  138. package/src/elements/adw-combo-row.ts +32 -7
  139. package/src/elements/adw-data-grid.ts +43 -91
  140. package/src/elements/adw-drop-down.ts +117 -128
  141. package/src/elements/adw-entry-row.ts +404 -36
  142. package/src/elements/adw-expander-row.ts +61 -29
  143. package/src/elements/adw-header-bar.ts +31 -6
  144. package/src/elements/adw-icon.ts +148 -0
  145. package/src/elements/adw-inline-view-switcher.ts +325 -131
  146. package/src/elements/adw-menu-button.ts +93 -70
  147. package/src/elements/adw-navigation-split-view.ts +220 -14
  148. package/src/elements/adw-navigation-view.ts +286 -148
  149. package/src/elements/adw-overlay-split-view.ts +536 -28
  150. package/src/elements/adw-password-entry-row.ts +111 -89
  151. package/src/elements/adw-popover.ts +283 -0
  152. package/src/elements/adw-preferences-dialog.ts +120 -21
  153. package/src/elements/adw-preferences-group.ts +128 -22
  154. package/src/elements/adw-progress-bar.ts +189 -0
  155. package/src/elements/adw-sidebar.ts +301 -142
  156. package/src/elements/adw-spin-row.ts +11 -5
  157. package/src/elements/adw-spinner.ts +168 -9
  158. package/src/elements/adw-split-button.ts +371 -92
  159. package/src/elements/adw-status-page.ts +9 -9
  160. package/src/elements/adw-switch-row.ts +100 -30
  161. package/src/elements/adw-switch.ts +129 -0
  162. package/src/elements/adw-tab-view.ts +700 -129
  163. package/src/elements/adw-toggle-group.ts +5 -7
  164. package/src/elements/adw-toolbar-view.ts +84 -21
  165. package/src/elements/adw-view-stack.ts +183 -85
  166. package/src/elements/adw-view-switcher-bar.ts +171 -81
  167. package/src/elements/adw-view-switcher.ts +328 -117
  168. package/src/elements/adw-window-title.ts +44 -11
  169. package/src/elements/adw-wrap-box.ts +329 -78
  170. package/src/elements/view-switcher-dom.ts +108 -0
  171. package/src/entry-rows.spec.ts +391 -0
  172. package/src/index.ts +23 -0
  173. package/src/navigation-view.spec.ts +435 -0
  174. package/src/preferences-search.ts +135 -0
  175. package/src/preferences.spec.ts +250 -0
  176. package/src/source-view/adw-source-view.ts +2 -5
  177. package/src/split-button.spec.ts +470 -0
  178. package/src/split-views.spec.ts +893 -0
  179. package/src/styles.generated.ts +1 -1
  180. package/src/tab-view.spec.ts +451 -0
  181. package/src/test.browser.mts +49 -0
  182. package/src/view-stack.spec.ts +272 -0
  183. package/src/view-switcher.spec.ts +665 -0
@@ -0,0 +1,51 @@
1
+ // _icon.scss — the symbolic icon box behind <adw-icon>.
2
+ //
3
+ // A symbolic icon is rendered as a CSS mask rather than an <img> or inline SVG,
4
+ // so `currentColor` drives the fill and the glyph re-themes with whatever
5
+ // contains it. The per-name `.adw-icon--<name>` mask classes are GENERATED into
6
+ // scss/_icons.generated.scss by scripts/build-scss.mjs (one entry per icon in
7
+ // its ICONS map), so adding an icon is a single map edit.
8
+ //
9
+ // This block lived in `_button.scss` for as long as the button was the only
10
+ // widget that drew one. It is emitted BEFORE the widget partials so a context
11
+ // that sizes its own icons (`.adw-about-dialog-icon` at 96px, the split button's
12
+ // 14px arrows, the view switcher's 16px) still wins on ordinary specificity.
13
+ //
14
+ // Reference: refs/libadwaita/src/stylesheet/_common.scss:34-41 — `.normal-icons`
15
+ // / `.large-icons` set `-gtk-icon-size`. libadwaita has NO `_icon.scss`: there
16
+ // the icon is a GtkImage and its size is a widget property, not a rule.
17
+ // Reference: refs/adwaita-web/adwaita-web/scss/_icon.scss — the vendored web
18
+ // port's `.adw-icon` is an inline-flex holder around a real <svg>; this
19
+ // package masks instead, which is what keeps it colourable via currentColor.
20
+ // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
21
+ // Copyright (c) 2025 csm (adwaita-web). MIT License.
22
+ // Modifications: Adapted for @gjsify/adwaita-web Web Components (mask-based).
23
+
24
+ .adw-icon {
25
+ display: inline-block;
26
+ width: 16px;
27
+ height: 16px;
28
+ flex-shrink: 0;
29
+ background-color: currentColor;
30
+ mask-size: 16px;
31
+ mask-repeat: no-repeat;
32
+ mask-position: center;
33
+ -webkit-mask-size: 16px;
34
+ -webkit-mask-repeat: no-repeat;
35
+ -webkit-mask-position: center;
36
+
37
+ // `currentColor` IS the icon: the mask is painted with the inherited colour,
38
+ // so a suggested-action button's `--accent-fg-color` has to reach it. Since
39
+ // <adw-icon> is a custom element it is also in `$adw-components`, and the
40
+ // ADR-0010 boundary reset re-roots `color` on every entry there — which would
41
+ // otherwise repaint every icon in `--window-fg-color` regardless of its host.
42
+ // Class beats type selector, so this restores inheritance.
43
+ color: inherit;
44
+
45
+ // `display: inline-block` (author CSS) otherwise beats the UA `[hidden]`
46
+ // rule, so a hidden icon (e.g. an avatar's fallback icon while initials
47
+ // show) would still render as a solid maskless square. Honor `hidden`.
48
+ &[hidden] {
49
+ display: none;
50
+ }
51
+ }
@@ -38,6 +38,7 @@
38
38
  --icon-emblem-system: url("data:image/svg+xml,%3Csvg%20height%3D'16px'%20viewBox%3D'0%200%2016%2016'%20width%3D'16px'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%20%3Cpath%20d%3D'm%208%200%20c%20-0.550781%200%20-1%200.449219%20-1%201%20v%200.238281%20c%200%200.464844%20-0.378906%200.902344%20-0.820312%201.046875%20c%20-0.023438%200.007813%20-0.042969%200.011719%20-0.0625%200.019532%20c%20-0.445313%200.148437%20-1.007813%200.015624%20-1.28125%20-0.359376%20l%20-0.140626%20-0.195312%20c%20-0.15625%20-0.214844%20-0.390624%20-0.359375%20-0.652343%20-0.398438%20c%20-0.261719%20-0.042968%20-0.53125%200.019532%20-0.742188%200.175782%20c%20-0.449219%200.324218%20-0.550781%200.949218%20-0.222656%201.398437%20l%200.140625%200.199219%20c%200.277344%200.375%200.226562%200.953125%20-0.050781%201.328125%20c%20-0.011719%200.015625%20-0.023438%200.035156%20-0.035157%200.050781%20c%20-0.273437%200.378906%20-0.804687%200.601563%20-1.25%200.457032%20l%20-0.230468%20-0.074219%20c%20-0.523438%20-0.171875%20-1.089844%200.117187%20-1.257813%200.640625%20c%20-0.171875%200.527344%200.113281%201.089844%200.640625%201.261718%20l%200.222656%200.074219%20c%200.445313%200.144531%200.738282%200.636719%200.75%201.101563%20v%200.070312%20c%200.015626%200.464844%20-0.304687%200.960938%20-0.746093%201.105469%20l%20-0.226563%200.070313%20c%20-0.527344%200.171874%20-0.8125%200.738281%20-0.640625%201.261718%20c%200.167969%200.523438%200.734375%200.8125%201.257813%200.640625%20l%200.230468%20-0.074219%20c%200.445313%20-0.144531%200.976563%200.078126%201.25%200.457032%20c%200.011719%200.015625%200.027344%200.035156%200.039063%200.050781%20c%200.277344%200.375%200.324219%200.953125%200.050781%201.328125%20l%20-0.144531%200.203125%20c%20-0.324219%200.445313%20-0.226563%201.070313%200.222656%201.394531%20c%200.445313%200.324219%201.070313%200.226563%201.394531%20-0.21875%20l%200.144532%20-0.199218%20c%200.273437%20-0.378907%200.835937%20-0.507813%201.277344%20-0.359376%20c%200.019531%200.007813%200.042968%200.011719%200.0625%200.019532%20c%200.445312%200.140625%200.820312%200.578125%200.820312%201.046875%20v%200.238281%20c%200%200.550781%200.449219%201%201%201%20s%201%20-0.449219%201%20-1%20v%20-0.238281%20c%200%20-0.46875%200.378906%20-0.90625%200.820312%20-1.046875%20c%200.023438%20-0.007813%200.042969%20-0.015625%200.066407%20-0.023438%20c%200.441406%20-0.144531%201.003906%20-0.015625%201.277343%200.363282%20l%200.144532%200.199218%20c%200.324218%200.445313%200.949218%200.542969%201.394531%200.21875%20c%200.445313%20-0.324218%200.546875%20-0.949218%200.222656%20-1.394531%20l%20-0.148437%20-0.203125%20c%20-0.273438%20-0.375%20-0.226563%20-0.953125%200.050781%20-1.328125%20c%200.015625%20-0.015625%200.027344%20-0.035156%200.039063%20-0.050781%20c%200.273437%20-0.378906%200.804687%20-0.601563%201.25%20-0.457032%20l%200.234374%200.078126%20c%200.523438%200.167968%201.085938%20-0.121094%201.257813%20-0.644532%20c%200.171875%20-0.523437%20-0.117187%20-1.089844%20-0.640625%20-1.257812%20l%20-0.230469%20-0.074219%20c%20-0.445312%20-0.144531%20-0.734375%20-0.640625%20-0.746093%20-1.105469%20c%200%20-0.023437%200%20-0.046875%200%20-0.070312%20c%20-0.015626%20-0.464844%200.300781%20-0.957032%200.746093%20-1.101563%20l%200.230469%20-0.074219%20c%200.523438%20-0.171874%200.8125%20-0.734374%200.640625%20-1.261718%20c%20-0.171875%20-0.523438%20-0.734375%20-0.8125%20-1.257813%20-0.640625%20l%20-0.230468%200.074219%20c%20-0.445313%200.144531%20-0.980469%20-0.078126%20-1.253906%20-0.457032%20c%20-0.011719%20-0.015625%20-0.023438%20-0.035156%20-0.035157%20-0.050781%20c%20-0.277343%20-0.375%20-0.324219%20-0.953125%20-0.050781%20-1.328125%20l%200.144531%20-0.199219%20c%200.324219%20-0.445312%200.226563%20-1.074219%20-0.222656%20-1.398437%20c%20-0.214844%20-0.15625%20-0.480469%20-0.21875%20-0.742187%20-0.179688%20c%20-0.265626%200.042969%20-0.5%200.1875%20-0.652344%200.402344%20l%20-0.144532%200.195312%20c%20-0.273437%200.378907%20-0.835937%200.507813%20-1.28125%200.363282%20c%20-0.019531%20-0.007813%20-0.039062%20-0.015625%20-0.0625%20-0.023438%20c%20-0.441406%20-0.140625%20-0.820312%20-0.578125%20-0.820312%20-1.046875%20v%20-0.238281%20c%200%20-0.550781%20-0.449219%20-1%20-1%20-1%20z%20m%200%204%20c%200.871094%200%201.675781%200.273438%202.332031%200.742188%20c%200.003907%200.007812%200.011719%200.015624%200.019531%200.023437%20c%200.011719%200.003906%200.019532%200.007813%200.03125%200.015625%20c%200.660157%200.484375%201.160157%201.171875%201.421876%201.976562%20v%200.007813%20s%200.003906%200.003906%200.003906%200.007813%20c%200.292968%200.851562%200.15625%201.65625%200%202.457031%20c%200%200%20-0.003906%200.003906%20-0.003906%200.007812%20v%200.003907%20c%20-0.261719%200.800781%20-0.757813%201.488281%20-1.414063%201.976562%20c%20-0.015625%200.003906%20-0.027344%200.011719%20-0.039063%200.019531%20c%20-0.007812%200.003907%20-0.015624%200.011719%20-0.019531%200.019531%20c%20-0.65625%200.46875%20-1.460937%200.742188%20-2.332031%200.742188%20c%20-0.855469%200%20-1.644531%20-0.265625%20-2.289062%20-0.714844%20c%20-0.019532%20-0.015625%20-0.042969%20-0.035156%20-0.0625%20-0.046875%20c%20-0.011719%20-0.007812%20-0.023438%20-0.015625%20-0.035157%20-0.019531%20c%20-0.652343%20-0.484375%20-1.148437%20-1.160156%20-1.40625%20-1.945312%20c%20-0.003906%20-0.015626%20-0.007812%20-0.023438%20-0.011719%20-0.035157%20c%20-0.003906%20-0.007812%20-0.007812%20-0.015625%20-0.011718%20-0.019531%20c%20-0.285156%20-0.847656%20-0.148438%20-1.644531%200%20-2.4375%20c%200.003906%20-0.007812%200.007812%20-0.011719%200.011718%20-0.019531%20c%200.003907%20-0.011719%200.007813%20-0.023438%200.011719%20-0.039063%20c%200.261719%20-0.785156%200.757813%20-1.460937%201.414063%20-1.945312%20c%200.007812%20-0.003906%200.019531%20-0.007813%200.027344%20-0.015625%20c%200.019531%20-0.011719%200.042968%20-0.03125%200.058593%20-0.046875%20c%200.648438%20-0.449219%201.4375%20-0.714844%202.292969%20-0.714844%20z%20m%200%200'%20fill%3D'currentColor'%2F%3E%20%3C%2Fsvg%3E");
39
39
  --icon-preferences-system: url("data:image/svg+xml,%3Csvg%20height%3D'16px'%20viewBox%3D'0%200%2016%2016'%20width%3D'16px'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%20%3Cpath%20d%3D'm%2013.855469%200%20l%20-1.539063%201.4375%20c%20-0.453125%200.421875%20-0.53125%201.148438%20-0.269531%201.707031%20l%20-5.886719%205.996094%20c%20-0.011718%200%20-0.019531%200%20-0.03125%200%20c%20-0.257812%20-0.128906%20-0.550781%20-0.183594%20-0.839844%20-0.148437%20c%20-0.328124%200.046874%20-0.632812%200.199218%20-0.867187%200.441406%20l%20-3.945313%203.996094%20c%20-0.3906245%200.375%20-0.5468745%200.933593%20-0.4062495%201.457031%20c%200.1406255%200.523437%200.5546875%200.929687%201.0820315%201.058593%20c%200.527344%200.132813%201.082031%20-0.03125%201.453125%20-0.425781%20l%203.945312%20-3.996093%20c%200.472657%20-0.453126%200.59375%20-1.15625%200.296875%20-1.738282%20l%205.890625%20-5.964844%20c%200.558594%200.25%201.273438%200.148438%201.707031%20-0.289062%20l%201.414063%20-1.5625%20z%20m%20-10.308594%200.0898438%20c%20-0.398437%200%20-0.785156%200.0937502%20-1.140625%200.2187502%20l%201.882812%201.878906%20c%200.390626%200.382812%200.390626%201%200%201.386719%20l%20-0.710937%200.707031%20c%20-0.386719%200.386719%20-1%200.386719%20-1.390625%200%20l%20-1.882812%20-1.878906%20c%20-0.125%200.355468%20-0.2187505%200.742187%20-0.2187505%201.140625%20c%200%201.90625%201.5507815%203.453125%203.4609375%203.453125%20c%200.402344%200%200.789063%20-0.09375%201.144531%20-0.21875%20l%201.175782%201.171875%20h%200.058593%20l%202.070313%20-2.0625%20l%20-1.203125%20-1.203125%20c%200.125%20-0.359375%200.214843%20-0.742188%200.214843%20-1.140625%20c%200%20-1.90625%20-1.546874%20-3.4531252%20-3.460937%20-3.4531252%20z%20m%206.550781%207.8906252%20l%20-2.070312%202.066406%20c%200.011718%200.027344%200.023437%200.058594%200.03125%200.089844%20l%201.144531%201.140625%20c%20-0.125%200.355468%20-0.21875%200.742187%20-0.21875%201.140625%20c%200%201.902343%201.550781%203.449219%203.460937%203.449219%20c%200.433594%200%200.855469%20-0.101563%201.238282%20-0.246094%20l%20-2.007813%20-2%20c%20-0.386719%20-0.386719%20-0.386719%20-1.035156%200%20-1.417969%20l%200.679688%20-0.679687%20c%200.195312%20-0.191407%200.457031%20-0.308594%200.710937%20-0.308594%20s%200.515625%200.117187%200.710938%200.308594%20l%201.945312%201.941406%20c%200.105469%20-0.328125%200.183594%20-0.683594%200.183594%20-1.046875%20c%200%20-1.90625%20-1.546875%20-3.453125%20-3.460938%20-3.453125%20c%20-0.398437%200%20-0.785156%200.09375%20-1.140624%200.21875%20z%20m%200%200'%20fill%3D'currentColor'%2F%3E%20%3C%2Fsvg%3E");
40
40
  --icon-application-x-executable: url("data:image/svg+xml,%3Csvg%20height%3D'16px'%20viewBox%3D'0%200%2016%2016'%20width%3D'16px'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%20%3Cpath%20d%3D'm%208.015625%200.015625%20c%20-0.769531%200%20-1.539063%200.292969%20-2.121094%200.875%20l%20-5.003906%205.003906%20c%20-1.164063%201.164063%20-1.164063%203.078125%200%204.242188%20l%205.003906%205.003906%20c%201.164063%201.164063%203.078125%201.164063%204.242188%200%20l%205.007812%20-5.003906%20c%201.164063%20-1.164063%201.164063%20-3.078125%200%20-4.242188%20l%20-5.007812%20-5.003906%20c%20-0.582031%20-0.582031%20-1.351563%20-0.875%20-2.121094%20-0.875%20z%20m%200.101563%201.988281%20c%200.210937%200.023438%200.414062%200.117188%200.585937%200.28125%20l%20-0.339844%200.113282%20c%20-0.074219%20-0.136719%20-0.15625%20-0.269532%20-0.246093%20-0.394532%20z%20m%20-1.570313%201.058594%20c%200.300781%200.421875%200.464844%200.929688%200.46875%201.453125%20c%200%201.378906%20-1.121094%202.5%20-2.5%202.5%20c%20-0.523437%20-0.003906%20-1.03125%20-0.171875%20-1.449219%20-0.472656%20z%20m%203.441406%200.503906%20l%203.742188%203.742188%20c%200.402343%200.402344%200.402343%201.011718%200%201.414062%20l%20-0.253907%200.25%20c%20-0.039062%20-0.046875%20-0.074218%20-0.09375%20-0.117187%20-0.140625%20l%200.621094%20-0.855469%20l%20-0.808594%20-0.585937%20l%20-0.621094%200.851563%20c%20-0.167969%20-0.078126%20-0.347656%20-0.136719%20-0.535156%20-0.175782%20v%20-1.050781%20h%20-1%20v%201.050781%20c%20-0.183594%200.039063%20-0.363281%200.097656%20-0.53125%200.175782%20l%20-0.621094%20-0.851563%20l%20-0.804687%200.585937%20l%200.617187%200.855469%20c%20-0.125%200.136719%20-0.238281%200.289063%20-0.332031%200.453125%20l%20-1%20-0.324218%20l%20-0.308594%200.949218%20l%201%200.324219%20c%20-0.011718%200.09375%20-0.019531%200.1875%20-0.019531%200.28125%20s%200.007813%200.1875%200.019531%200.28125%20l%20-1%200.324219%20l%200.308594%200.949218%20l%201%20-0.324218%20c%200.09375%200.164062%200.207031%200.316406%200.332031%200.453125%20l%20-0.617187%200.855469%20l%200.195312%200.140624%20l%20-0.53125%200.53125%20c%20-0.402344%200.40625%20-1.011718%200.40625%20-1.414062%200%20l%20-4.902344%20-4.902343%20l%200.027344%20-0.039063%20l%200.210937%20-0.289062%20c%200.328125%200.152344%200.679688%200.269531%201.046875%200.339844%20v%201.179687%20h%201.648438%20v%20-1.179687%20c%200.363281%20-0.070313%200.714844%20-0.1875%201.046875%20-0.339844%20l%200.207031%200.289062%20l%200.484375%200.667969%20l%201.335937%20-0.972656%20l%20-0.484374%20-0.667969%20l%20-0.210938%20-0.289062%20c%200.25%20-0.269532%200.46875%20-0.566407%200.648438%20-0.890626%20l%200.339843%200.113282%20l%200.785157%200.253906%20l%200.507812%20-1.566406%20l%20-0.785156%20-0.257813%20l%20-0.335938%20-0.109375%20c%200.019532%20-0.179687%200.035156%20-0.363281%200.035156%20-0.550781%20s%20-0.015624%20-0.371094%20-0.035156%20-0.550781%20l%200.335938%20-0.109375%20l%200.785156%20-0.257813%20z%20m%201.527344%205.449219%20c%200.527344%200%200.984375%200.265625%201.25%200.667969%20l%20-2.078125%202.082031%20c%20-0.40625%20-0.269531%20-0.671875%20-0.722656%20-0.671875%20-1.25%20c%200%20-0.835937%200.667969%20-1.5%201.5%20-1.5%20z%20m%200%200'%20fill%3D'currentColor'%2F%3E%20%3Cpath%20d%3D'm%204.039062%20-18.988281%20c%20-1.449218%200%20-2.679687%201.046875%20-2.964843%202.421875%20c%20-0.019531%200.097656%20-0.035157%200.199218%20-0.046875%200.300781%20c%20-0.007813%200.101563%20-0.015625%200.203125%20-0.015625%200.304687%20v%207.910157%20c%200%201.660156%201.367187%203.027343%203.027343%203.027343%20h%207.949219%20c%201.660157%200%203.027344%20-1.367187%203.027344%20-3.027343%20v%20-7.910157%20c%200%20-0.105468%20-0.003906%20-0.207031%20-0.015625%20-0.304687%20c%20-0.011719%20-0.101563%20-0.027344%20-0.203125%20-0.046875%20-0.300781%20c%20-0.285156%20-1.375%20-1.511719%20-2.421875%20-2.964844%20-2.421875%20z%20m%200%202.003906%20h%202.976563%20v%203%20h%20-2.976563%20c%20-0.585937%200%20-1.027343%20-0.441406%20-1.027343%20-1.027344%20v%20-0.949219%20c%200.003906%20-0.035156%200.003906%20-0.070312%200.007812%20-0.105468%20c%200.003907%20-0.035156%200.007813%20-0.070313%200.011719%20-0.105469%20c%200.007812%20-0.035156%200.019531%20-0.066406%200.027344%20-0.097656%20c%200.125%20-0.421875%200.503906%20-0.714844%200.980468%20-0.714844%20z%20m%204.976563%200%20h%202.972656%20c%200.585938%200%201.023438%200.4375%201.027344%201.023437%20v%200.949219%20c%200%200.585938%20-0.441406%201.027344%20-1.027344%201.027344%20h%20-2.972656%20z%20m%204%203.71875%20v%205.214844%20c%200%200.585937%20-0.441406%201.027343%20-1.027344%201.027343%20h%20-7.949219%20c%20-0.585937%200%20-1.027343%20-0.441406%20-1.027343%20-1.027343%20v%20-5.175781%20c%200.324219%200.148437%200.671875%200.246093%201.027343%200.246093%20h%202.976563%20v%203.035157%20l%202%200.992187%20v%20-4.027344%20h%202.972656%20c%200.34375%200%200.695313%20-0.113281%201.027344%20-0.285156%20z%20m%20-5%2033.28125%20c%20-0.851563%200%20-1.699219%200.328125%20-2.351563%200.976563%20l%20-4.671874%204.671874%20c%20-1.300782%201.300782%20-1.300782%203.402344%200%204.703126%20l%204.671874%204.671874%20c%201.300782%201.300782%203.402344%201.300782%204.699219%200%20l%204.675781%20-4.671874%20c%201.300782%20-1.300782%201.300782%20-3.402344%200%20-4.703126%20l%20-4.675781%20-4.671874%20c%20-0.648437%20-0.648438%20-1.496093%20-0.976563%20-2.347656%20-0.976563%20z%20m%200%201.984375%20c%200.335937%200%200.675781%200.132812%200.941406%200.402344%20l%203.03125%203.027344%20c%20-0.066406%200.039062%20-0.136719%200.070312%20-0.210937%200.09375%20c%20-0.019532%200.003906%20-0.039063%200.011718%20-0.0625%200.015624%20c%20-0.441406%200.148438%20-1.003906%200.019532%20-1.277344%20-0.359374%20l%20-0.140625%20-0.195313%20c%20-0.15625%20-0.210937%20-0.390625%20-0.355469%20-0.652344%20-0.398437%20c%20-0.066406%20-0.011719%20-0.132812%20-0.015626%20-0.199219%20-0.011719%20c%20-0.195312%200.007812%20-0.382812%200.074219%20-0.542968%200.191406%20c%20-0.449219%200.324219%20-0.550782%200.949219%20-0.226563%201.394531%20l%200.144531%200.199219%20c%200.273438%200.378906%200.226563%200.953125%20-0.050781%201.332031%20c%20-0.011719%200.015625%20-0.023437%200.03125%20-0.035156%200.050782%20c%20-0.273437%200.378906%20-0.808594%200.597656%20-1.253906%200.453124%20l%20-0.226563%20-0.074218%20c%20-0.523437%20-0.167969%20-1.089844%200.117187%20-1.257812%200.644531%20c%20-0.171875%200.523437%200.113281%201.089844%200.636718%201.261719%20l%200.226563%200.070312%20c%200.445313%200.144532%200.738281%200.640625%200.746094%201.105469%20c%200.003906%200.023437%200.003906%200.042969%200.003906%200.066406%20c%200.015625%200.464844%20-0.304687%200.960938%20-0.75%201.105469%20l%20-0.226563%200.074219%20c%20-0.179687%200.058593%20-0.332031%200.164062%20-0.445312%200.296875%20l%20-3.785156%20-3.785156%20c%20-0.535156%20-0.535157%20-0.535156%20-1.355469%200%20-1.890626%20l%204.667968%20-4.667968%20c%200.269532%20-0.269532%200.609376%20-0.402344%200.945313%20-0.402344%20z%20m%205.585937%205.234375%20c%200.058594%200%200.117188%200.003906%200.175782%200.007813%20c%200.382812%200.523437%200.335937%201.234374%20-0.144532%201.71875%20l%20-3.753906%203.75%20c%20-0.027344%20-0.066407%20-0.050781%20-0.136719%20-0.070312%20-0.203126%20c%20-0.003906%20-0.011718%20-0.007813%20-0.023437%20-0.011719%20-0.035156%20c%20-0.003906%20-0.007812%20-0.007813%20-0.011718%20-0.011719%20-0.019531%20c%20-0.285156%20-0.84375%20-0.152344%20-1.644531%200%20-2.4375%20c%200.003906%20-0.003906%200.007813%20-0.007813%200.011719%20-0.015625%20c%200.003906%20-0.011719%200.007813%20-0.027344%200.011719%20-0.039062%20c%200.261718%20-0.789063%200.757812%20-1.464844%201.410156%20-1.945313%20c%200.011719%20-0.003906%200.023438%20-0.011719%200.03125%20-0.015625%20c%200.019531%20-0.015625%200.042969%20-0.03125%200.058594%20-0.046875%20c%200.648437%20-0.453125%201.4375%20-0.71875%202.292968%20-0.71875%20z%20m%200%200'%20fill%3D'currentColor'%2F%3E%20%3C%2Fsvg%3E");
41
+ --icon-image-missing: url("data:image/svg+xml,%3Csvg%20height%3D'16px'%20viewBox%3D'0%200%2016%2016'%20width%3D'16px'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%20%3Cpath%20d%3D'm%204.015625%201.03125%20c%20-1.644531%200%20-3%201.355469%20-3%203%20v%201%20h%201%20v%20-1%20c%200%20-1.109375%200.890625%20-2%202%20-2%20h%201%20v%20-1%20z%20m%202%200%20v%201%20h%204%20v%20-1%20z%20m%205%200%20v%201%20h%201%20c%201.109375%200%202%200.890625%202%202%20v%201%20h%201%20v%20-1%20c%200%20-1.644531%20-1.355469%20-3%20-3%20-3%20z%20m%20-5%204%20c%20-0.550781%200%20-1%200.449219%20-1%201%20s%200.449219%201%201%201%20s%201%20-0.449219%201%20-1%20s%20-0.449219%20-1%20-1%20-1%20z%20m%20-5%201%20v%204%20h%201%20v%20-4%20z%20m%2013%200%20v%204%20h%201%20v%20-4%20z%20m%20-4.5%202%20l%20-2%202%20l%20-1.5%20-1%20l%20-2%202%20v%200.5%20c%200%200.5%200.5%200.5%200.5%200.5%20h%207%20s%200.472656%20-0.035156%200.5%20-0.5%20v%20-1%20z%20m%20-8.5%203%20v%201%20c%200%201.644531%201.355469%203%203%203%20h%201%20v%20-1%20h%20-1%20c%20-1.109375%200%20-2%20-0.890625%20-2%20-2%20v%20-1%20z%20m%2013%200%20v%201%20c%200%201.109375%20-0.890625%202%20-2%202%20h%20-1%20v%201%20h%201%20c%201.644531%200%203%20-1.355469%203%20-3%20v%20-1%20z%20m%20-8%203%20v%201%20h%204%20v%20-1%20z%20m%200%200'%20fill%3D'currentColor'%20fill-opacity%3D'0.34902'%2F%3E%20%3C%2Fsvg%3E");
41
42
  }
42
43
 
43
44
  .adw-icon--edit-paste {
@@ -219,3 +220,8 @@
219
220
  mask-image: var(--icon-application-x-executable);
220
221
  -webkit-mask-image: var(--icon-application-x-executable);
221
222
  }
223
+
224
+ .adw-icon--image-missing {
225
+ mask-image: var(--icon-image-missing);
226
+ -webkit-mask-image: var(--icon-image-missing);
227
+ }
@@ -107,6 +107,40 @@ adw-inline-view-switcher {
107
107
  white-space: nowrap;
108
108
  }
109
109
 
110
+ // AdwIndicatorBin's badge — the unread count, or a bare dot when only
111
+ // `needs-attention` is set.
112
+ // Reference: refs/libadwaita/src/adw-indicator-bin.c
113
+ .adw-inline-view-switcher-indicator {
114
+ display: inline-flex;
115
+ box-sizing: border-box;
116
+ align-items: center;
117
+ justify-content: center;
118
+ min-width: 16px;
119
+ height: 16px;
120
+ padding: 0 4px;
121
+ border-radius: 8px;
122
+ background-color: var(--accent-bg-color);
123
+ color: var(--accent-fg-color);
124
+ font-size: 0.625rem;
125
+ font-weight: 700;
126
+ line-height: 1;
127
+
128
+ // Author rule, not the UA one: the `display: inline-flex` above is also
129
+ // an author rule and would otherwise keep an empty badge on screen
130
+ // (cascade ORIGIN beats specificity — the same trap the bar hit).
131
+ &[hidden] {
132
+ display: none;
133
+ }
134
+
135
+ &.needs-attention {
136
+ min-width: 6px;
137
+ width: 6px;
138
+ height: 6px;
139
+ padding: 0;
140
+ border-radius: 3px;
141
+ }
142
+ }
143
+
110
144
  // The stacked content area below the bar — exactly one page is visible.
111
145
  .adw-inline-view-switcher-pages {
112
146
  width: 100%;
@@ -0,0 +1,135 @@
1
+ // _labels.scss — libadwaita's typography + semantic-colour UTILITY CLASSES.
2
+ //
3
+ // NO ELEMENT. `refs/libadwaita/src/stylesheet/widgets/_labels.scss` is a widget
4
+ // partial in name only: `label { … }` is four lines of GtkLabel plumbing
5
+ // (`caret-color`, `.separator`, `:disabled`) and everything else in it is a
6
+ // CLASS a consumer puts on whatever node it already has. There is deliberately
7
+ // no `<adw-label>` here to go with them — it would wrap a `<span>` and add
8
+ // nothing a class does not, which is exactly ADR 0004's "a widget with
9
+ // genuinely trivial behaviour does not need a core class" applied one level up,
10
+ // and ADR 0010 already makes the token/class surface the public contract. An
11
+ // element would only add a tag to `$adw-components` for no behaviour.
12
+ //
13
+ // This is also where the in-tree duplication ends: `_data_grid.scss` declared
14
+ // `font-variant-numeric: tabular-nums` twice and inlined a whole monospace font
15
+ // stack — i.e. `.numeric` and `.monospace` — and dimmed its header row with a
16
+ // raw `opacity: var(--dim-opacity)` where `.dimmed` is the upstream spelling. It
17
+ // composes these now.
18
+ //
19
+ // WHAT DIFFERS FROM UPSTREAM, AND WHY
20
+ //
21
+ // - `font-size` percentages are upstream's (181% / 136% / 118% / 82%), which
22
+ // are relative to the INHERITED size. That is what libadwaita means by them
23
+ // and it composes with `--font-size-base`, so they are kept verbatim rather
24
+ // than resolved to pt values.
25
+ // - `.document` / `.monospace` read `--document-font-*` / `--monospace-font-*`.
26
+ // In GTK those four are written into `:root` at runtime by AdwStyleManager
27
+ // from the desktop's font settings (adw-style-manager.c:169-218), defaulting
28
+ // to `Sans 10` / `Monospace 10` (:50-56). There is no style manager in a
29
+ // browser, so `_variables.scss` supplies them as ordinary tokens — same
30
+ // names, so a consumer re-themes through the documented contract.
31
+ // - `refs/adwaita-web/adwaita-web/scss/_utility_classes.scss` carries its own
32
+ // version of this block (it puts these in `_utility_classes.scss`, NOT in
33
+ // `_label.scss`) and it disagrees with libadwaita on two points: it adds a
34
+ // `line-height` to every title/heading, and it dims `.caption` and
35
+ // `.caption-heading` by folding `--dim-opacity` into them. Neither is in
36
+ // libadwaita — a caption is small, not dim, and dimming is `.dimmed`'s job,
37
+ // composable onto anything. libadwaita is followed here.
38
+ //
39
+ // Reference: refs/libadwaita/src/stylesheet/widgets/_labels.scss:13-88 (every class below)
40
+ // Reference: refs/libadwaita/src/adw-style-manager.c:50-56,169-218 (the four font tokens)
41
+ // Reference: refs/adwaita-web/adwaita-web/scss/_utility_classes.scss (the vendored port's variant, NOT followed — see above)
42
+ // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
43
+ // Copyright (c) 2025 csm (adwaita-web). MIT License.
44
+ // Modifications: Adapted for @gjsify/adwaita-web; the `label {}` element rules
45
+ // are GtkLabel plumbing with no DOM counterpart and are not ported.
46
+
47
+ // _labels.scss:13-15
48
+ .dimmed {
49
+ opacity: var(--dim-opacity);
50
+ }
51
+
52
+ // _labels.scss:17-19
53
+ .accent {
54
+ color: var(--accent-color);
55
+ }
56
+
57
+ // _labels.scss:21-29 — a semantic class does not just recolour the text, it
58
+ // REBINDS the three accent tokens, so a button or switch inside it turns the
59
+ // same colour without knowing which state it is in.
60
+ @each $e_type in error, warning, success {
61
+ .#{$e_type} {
62
+ color: var(--accent-color);
63
+
64
+ --accent-bg-color: var(--#{$e_type}-bg-color);
65
+ --accent-fg-color: var(--#{$e_type}-fg-color);
66
+ --accent-color: var(--#{$e_type}-color);
67
+ }
68
+ }
69
+
70
+ /**********************
71
+ * General Typography *
72
+ **********************/
73
+
74
+ // _labels.scss:35-53
75
+ .title-1 {
76
+ font-weight: 800;
77
+ font-size: 181%;
78
+ }
79
+
80
+ .title-2 {
81
+ font-weight: 800;
82
+ font-size: 136%;
83
+ }
84
+
85
+ .title-3 {
86
+ font-weight: 700;
87
+ font-size: 136%;
88
+ }
89
+
90
+ .title-4 {
91
+ font-weight: 700;
92
+ font-size: 118%;
93
+ }
94
+
95
+ // _labels.scss:55-57
96
+ .heading {
97
+ font-weight: 700;
98
+ }
99
+
100
+ // _labels.scss:59-62
101
+ .body {
102
+ font-weight: 400;
103
+ line-height: 140%;
104
+ }
105
+
106
+ // _labels.scss:64-67
107
+ .caption-heading {
108
+ font-weight: 700;
109
+ font-size: 82%;
110
+ }
111
+
112
+ // _labels.scss:69-73
113
+ .caption {
114
+ font-weight: 400;
115
+ font-size: 82%;
116
+ line-height: 140%;
117
+ }
118
+
119
+ // _labels.scss:75-79
120
+ .document {
121
+ font-family: var(--document-font-family);
122
+ font-size: var(--document-font-size);
123
+ line-height: 140%;
124
+ }
125
+
126
+ // _labels.scss:81-84
127
+ .monospace {
128
+ font-family: var(--monospace-font-family);
129
+ font-size: var(--monospace-font-size);
130
+ }
131
+
132
+ // _labels.scss:86-88
133
+ .numeric {
134
+ font-variant-numeric: tabular-nums;
135
+ }
@@ -77,75 +77,15 @@
77
77
  }
78
78
  }
79
79
 
80
- // --- Popover menu ---
81
- // The elevated menu surface below the button, right-aligned like a header-end
82
- // app menu. Reproduces libadwaita's popover.menu > contents.
83
- .adw-menu-button-popover {
84
- position: absolute;
85
- top: calc(100% + 6px);
86
- right: 0;
87
- z-index: 10;
88
- display: flex;
89
- flex-direction: column;
90
- min-width: 200px;
91
- padding: var(--spacing-xs);
92
- border-radius: var(--card-radius);
93
- background-color: var(--popover-bg-color, var(--window-bg-color, #fff));
94
- color: var(--popover-fg-color, var(--window-fg-color));
95
- box-shadow:
96
- 0 0 0 1px rgba(0, 0, 0, 0.05),
97
- 0 1px 5px 1px rgba(0, 0, 0, 0.09),
98
- 0 2px 14px 3px rgba(0, 0, 0, 0.05);
99
-
100
- &[hidden] {
101
- display: none;
102
- }
103
- }
104
-
105
- // Optional section heading atop the menu (libadwaita label.title).
106
- .adw-menu-button-title {
107
- padding: 4px var(--spacing-s) 6px;
108
- font-weight: 700;
109
- opacity: var(--dim-opacity);
110
- }
111
-
112
- // A menu item row — a flat rounded row that fills on hover/active.
113
- .adw-menu-button-item {
114
- box-sizing: border-box;
115
- display: flex;
116
- align-items: center;
117
- gap: var(--spacing-xs);
118
- width: 100%;
119
- min-height: 32px;
120
- margin: 0;
121
- padding: var(--spacing-xs) var(--spacing-s);
122
- border: none;
123
- border-radius: calc(var(--button-radius) - 2px);
124
- background-color: transparent;
125
- color: inherit;
126
- font-family: var(--font-family);
127
- font-size: var(--font-size-base);
128
- text-align: start;
129
- cursor: pointer;
130
- transition: background-color 0.1s ease;
131
-
132
- .adw-menu-button-item-icon {
133
- width: 16px;
134
- height: 16px;
135
- flex: none;
136
- }
137
-
138
- &:hover {
139
- background-color: var(--button-hover-color);
140
- }
141
-
142
- &:active {
143
- background-color: var(--button-active-color);
144
- }
145
-
146
- &:focus-visible {
147
- outline: 2px solid var(--accent-color);
148
- outline-offset: -2px;
149
- }
80
+ // The surface, the heading and the item row are `<adw-popover>`'s —
81
+ // `_popover.scss` (`adw-popover`, `.adw-popover-title`, `.adw-popover-item`).
82
+ // What used to be here was one of three hand-rolled copies: a
83
+ // `--card-radius` (12px) surface where libadwaita's is 15px, and a
84
+ // `calc(var(--button-radius) - 2px)` (7px) row where `modelbutton` is 9px.
85
+ // Only the icon slot is a menu-button fact.
86
+ .adw-menu-button-item-icon {
87
+ width: 16px;
88
+ height: 16px;
89
+ flex: none;
150
90
  }
151
91
  }
@@ -1,5 +1,16 @@
1
1
  // _navigation_split_view.scss — adw-navigation-split-view styling (docked sidebar).
2
+ //
3
+ // Visibility is `data-pane-visible`, written by the element from
4
+ // `update_navigation_stack` (adw-navigation-split-view.c:342-405), not from the
5
+ // two flags. Two of that table's rules are not expressible as
6
+ // `.collapsed.show-content`: a LONE child stays visible whatever `show-content`
7
+ // says (:389-401), and with `sidebar-position: end` the CONTENT is the root page
8
+ // so the sidebar is pushed ON TOP of it rather than replacing it. This file used
9
+ // to key off the flags and got both wrong — a collapsed view with only a sidebar
10
+ // rendered blank.
11
+ //
2
12
  // Reference: refs/adwaita-web/adwaita-web/docs/widgets/navigationsplitview.md
13
+ // Reference: refs/libadwaita/src/adw-navigation-split-view.c
3
14
  // Reference: refs/libadwaita/src/stylesheet/widgets/_sidebars.scss
4
15
  // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
5
16
  // Modifications: Adapted for @gjsify/adwaita-web Web Components.
@@ -16,33 +27,61 @@ adw-navigation-split-view {
16
27
  flex-direction: column;
17
28
  min-height: 0;
18
29
  flex-shrink: 0;
19
- border-right: 1px solid var(--separator-color);
20
30
  background-color: var(--sidebar-bg-color);
21
31
  }
22
32
 
33
+ // The container MINIMUM, as CSS spells it: `measure_uncollapsed`
34
+ // (adw-navigation-split-view.c:264-267) is `sidebar_min + content_min`, which
35
+ // a flex row reaches by itself once the content may claim its own minimum.
36
+ // `min-width: 0` — the flex idiom for "let this be crushed" — was here, which
37
+ // is how the content pane could be squeezed to nothing while the sidebar,
38
+ // being `flex-shrink: 0`, kept its whole width.
23
39
  .adw-nsv-content {
24
40
  display: flex;
25
41
  flex-direction: column;
26
- min-width: 0;
42
+ min-width: min-content;
27
43
  min-height: 0;
28
44
  flex: 1 1 auto;
29
45
  background-color: var(--window-bg-color);
30
46
  }
31
47
 
32
- // Collapsed (narrow): one pane at a time.
33
- &.collapsed.show-content .adw-nsv-sidebar {
34
- display: none;
48
+ // `sidebar-position: end` docks the sidebar past the content. flex `order`
49
+ // flips the visual order without changing the slotting DOM order.
50
+ &.sidebar-end {
51
+ .adw-nsv-content {
52
+ order: 1;
53
+ }
54
+
55
+ .adw-nsv-sidebar {
56
+ order: 2;
57
+ }
35
58
  }
36
59
 
37
- &.collapsed:not(.show-content) {
38
- .adw-nsv-content {
60
+ // THE DIVIDER FOLLOWS THE VISUAL SIDE. `_sidebars.scss:1293-1302` makes it
61
+ // `:dir()` × `.end`, which is the product `.sidebar-at-visual-start` carries:
62
+ // under RTL a `start` sidebar is drawn on the right and its divider belongs on
63
+ // its left edge. A fixed `border-right` drew it on the wrong side for half the
64
+ // four combinations.
65
+ &.sidebar-at-visual-start .adw-nsv-sidebar {
66
+ border-right: 1px solid var(--separator-color);
67
+ }
68
+
69
+ &:not(.sidebar-at-visual-start) .adw-nsv-sidebar {
70
+ border-left: 1px solid var(--separator-color);
71
+ }
72
+
73
+ // Collapsed: whichever pane the STACK puts on top fills the view, and the
74
+ // other is not rendered at all.
75
+ &.collapsed {
76
+ [data-pane-visible='false'] {
39
77
  display: none;
40
78
  }
41
79
 
42
- .adw-nsv-sidebar {
80
+ .adw-nsv-sidebar[data-pane-visible='true'] {
43
81
  flex: 1 1 auto;
44
82
  max-width: none;
45
83
  border-right: none;
84
+ border-left: none;
46
85
  }
47
86
  }
48
87
  }
@@ -1,5 +1,21 @@
1
1
  // _overlay_split_view.scss — adw-overlay-split-view styling.
2
+ //
3
+ // The GEOMETRY is no longer here. It used to be four `transform: translateX(±100%)`
4
+ // rules keyed on `.collapsed` / `.show-sidebar` / `.sidebar-end`, which can only
5
+ // express the two END STATES of a reveal — so `show-progress` was 0 or 1, the
6
+ // five `OVERLAY_SWIPE_*` conformance tables shipped unexercised, and the docked
7
+ // hide slid the wrong way for an `end` sidebar because the JS wrote `marginRight`
8
+ // whichever edge the pane was on.
9
+ //
10
+ // The element now writes the pane rect per frame from
11
+ // `layoutOverlaySplitView`, which is continuous and knows the edge (including
12
+ // under RTL, where a `start` sidebar is drawn on the RIGHT —
13
+ // `get_start_or_end`, adw-overlay-split-view.c:227-234). What is left here is
14
+ // what CSS genuinely owns: the box model, the stacking, and the transition that
15
+ // smooths a programmatic toggle.
16
+ //
2
17
  // Reference: refs/libadwaita/src/adw-overlay-split-view.c
18
+ // Reference: refs/libadwaita/src/stylesheet/widgets/_sidebars.scss
3
19
  // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
4
20
  // Modifications: Implemented as Web Component for @gjsify/adwaita-web.
5
21
 
@@ -15,34 +31,44 @@ adw-overlay-split-view {
15
31
  background-color: var(--sidebar-bg-color);
16
32
  overflow-y: auto;
17
33
  flex-shrink: 0;
18
- transition: transform 0.2s ease, opacity 0.2s ease, margin 0.2s ease;
19
34
  z-index: 10;
20
35
  align-self: stretch;
36
+ // Only `opacity` transitions. The offset is driven per frame, so animating
37
+ // it here would fight the swipe: a gesture would lag its own finger.
38
+ transition: opacity 0.2s ease;
21
39
  }
22
40
 
41
+ // THE CONTAINER MINIMUM, as CSS spells it. `measure_uncollapsed`
42
+ // (adw-overlay-split-view.c:558-563) is `trunc(sidebar_min * progress) +
43
+ // content_min`, and a flex row reaches exactly that on its own PROVIDED the
44
+ // content is allowed to claim its own minimum: the sidebar is `flex-shrink: 0`
45
+ // with a `min-width` of `sidebar_min`, so the sum is the container's floor.
46
+ //
47
+ // `min-width: 0` was here instead — the flex idiom for "let this be crushed so
48
+ // an ellipsis can happen" — which is precisely how the content pane could be
49
+ // squeezed to nothing while the sidebar kept its whole width. A child that
50
+ // needs to truncate can still ask for `min-width: 0` itself; the PANE may not.
51
+ //
52
+ // Not computed in JS: a measured number would need the content's min-content
53
+ // size, which the DOM does not expose without a reflow, and the first attempt
54
+ // used `scrollWidth` — the pane's CURRENT width — which pinned the view at
55
+ // whatever it happened to be and stopped it responding to its breakpoint.
23
56
  .adw-osv-content {
24
57
  flex: 1;
25
- min-width: 0;
58
+ min-width: min-content;
26
59
  min-height: 0;
27
60
  display: flex;
28
61
  flex-direction: column;
29
62
  align-self: stretch;
30
63
  }
31
64
 
32
- // Docked mode (not collapsed) — sidebar beside content
65
+ // Docked — the sidebar sits in the flex row and the hidden part is taken off
66
+ // its own edge by a negative margin the element computes.
33
67
  &:not(.collapsed) .adw-osv-sidebar {
34
68
  position: relative;
35
69
  }
36
70
 
37
- // Docked hide: slide left and collapse via opacity. Sidebar keeps its
38
- // intrinsic width so internal elements don't reflow.
39
- &:not(.collapsed):not(.show-sidebar) .adw-osv-sidebar {
40
- transform: translateX(-100%);
41
- opacity: 0;
42
- pointer-events: none;
43
- }
44
-
45
- // Docked + sidebar-end — dock the sidebar to the RIGHT of the content
71
+ // Docked + sidebar-end — dock the sidebar to the far side of the content
46
72
  // (the Adw.OverlaySplitView { sidebar-position: end } layout). flex `order`
47
73
  // flips the visual order without changing the slotting DOM order.
48
74
  &:not(.collapsed).sidebar-end {
@@ -52,49 +78,108 @@ adw-overlay-split-view {
52
78
 
53
79
  .adw-osv-sidebar {
54
80
  order: 2;
55
- border-inline-start: 1px solid var(--separator-color);
56
81
  }
57
82
  }
58
83
 
59
- // Docked hide when the sidebar is on the end edge: slide RIGHT, not left.
60
- &:not(.collapsed):not(.show-sidebar).sidebar-end .adw-osv-sidebar {
61
- transform: translateX(100%);
84
+ // THE DIVIDER FOLLOWS THE VISUAL SIDE, not the logical one. `_sidebars.scss`
85
+ // makes it `:dir()` × `.end` (:21-39), which is exactly the product
86
+ // `.sidebar-at-visual-start` already carries: under RTL a `start` sidebar is
87
+ // drawn on the right and its divider belongs on its left edge.
88
+ &:not(.collapsed) {
89
+ .adw-osv-sidebar {
90
+ border-inline-end: none;
91
+ border-inline-start: none;
92
+ }
93
+
94
+ &.sidebar-at-visual-start .adw-osv-sidebar {
95
+ border-right: 1px solid var(--separator-color);
96
+ }
97
+
98
+ &:not(.sidebar-at-visual-start) .adw-osv-sidebar {
99
+ border-left: 1px solid var(--separator-color);
100
+ }
62
101
  }
63
102
 
64
- // Overlay mode (collapsed) — sidebar on top of content
103
+ // Overlay (collapsed) — the sidebar floats above the content at the absolute
104
+ // offset the element writes into `left`, which is the only property that can
105
+ // carry a mid-swipe position.
65
106
  &.collapsed .adw-osv-sidebar {
66
107
  position: absolute;
67
108
  top: 0;
68
109
  bottom: 0;
69
- left: 0;
70
- transform: translateX(-100%);
71
- opacity: 0;
72
- pointer-events: none;
110
+ box-shadow: 0 0 12px rgb(0 0 0 / 25%);
73
111
  }
74
112
 
75
- &.collapsed.sidebar-end .adw-osv-sidebar {
76
- left: auto;
77
- right: 0;
78
- transform: translateX(100%);
113
+ // THE TWO RESTING STATES ARE CSS. Everything BETWEEN them is JS.
114
+ //
115
+ // Dropping these is what shipped the docs-site regression. The offset is
116
+ // driven per frame from `layoutOverlaySplitView` — but a view that has never
117
+ // been measured drives nothing, and an absolutely-positioned pane with no
118
+ // `left` resolves to `left: 0` at full opacity. So a HIDDEN sidebar was
119
+ // painted over the content at the wrong edge, on a page whose slideshow
120
+ // builds each slide inside `display: none` and moves it in, so the first
121
+ // measurement never arrived and this fallback was the whole rendering.
122
+ //
123
+ // Not a second copy of the arithmetic: 0% and 100% ARE the two ends the JS
124
+ // interpolates between, and neither of them needs a pixel to say. The element
125
+ // clears its inline placement whenever it has no measurement, which is what
126
+ // hands control back to these rules instead of stranding a stale offset.
127
+ &.collapsed {
128
+ // Revealed: flush against the edge the pane is drawn on.
129
+ &.sidebar-at-visual-start .adw-osv-sidebar {
130
+ left: 0;
131
+ right: auto;
132
+ }
133
+
134
+ &:not(.sidebar-at-visual-start) .adw-osv-sidebar {
135
+ left: auto;
136
+ right: 0;
137
+ }
138
+
139
+ // Hidden: entirely off that same edge, and untouchable while it is there.
140
+ &:not(.show-sidebar) {
141
+ .adw-osv-sidebar {
142
+ opacity: 0;
143
+ pointer-events: none;
144
+ }
145
+
146
+ &.sidebar-at-visual-start .adw-osv-sidebar {
147
+ left: auto;
148
+ right: 100%;
149
+ }
150
+
151
+ &:not(.sidebar-at-visual-start) .adw-osv-sidebar {
152
+ left: 100%;
153
+ right: auto;
154
+ }
155
+ }
79
156
  }
80
157
 
81
- &.collapsed.show-sidebar .adw-osv-sidebar {
82
- transform: translateX(0);
83
- opacity: 1;
84
- pointer-events: auto;
158
+ // Docked and hidden — the pane takes no room in the row. The JS expresses
159
+ // this as a negative margin so it can animate; unmeasured, the end state is
160
+ // simply a pane of no width.
161
+ &:not(.collapsed):not(.show-sidebar) .adw-osv-sidebar {
162
+ width: 0;
163
+ min-width: 0;
164
+ overflow: hidden;
165
+ opacity: 0;
166
+ pointer-events: none;
85
167
  }
86
168
 
87
- // Backdrop — visible only in overlay mode when sidebar is open
169
+ // Backdrop — the click-outside shield. `hidden` is the element's, off
170
+ // `shieldVisible`; the OPACITY is the shadow-helper progress, so it fades with
171
+ // the reveal instead of appearing whole.
88
172
  .adw-osv-backdrop {
89
173
  display: none;
90
174
  }
91
175
 
92
- &.collapsed.show-sidebar .adw-osv-backdrop {
176
+ &.collapsed .adw-osv-backdrop:not([hidden]) {
93
177
  display: block;
94
178
  position: absolute;
95
179
  inset: 0;
96
- background: rgba(0, 0, 0, 0.3);
180
+ background: rgb(0 0 0 / 30%);
97
181
  z-index: 9;
182
+ transition: opacity 0.2s ease;
98
183
  }
99
184
  }
100
185