@gjsify/adwaita-web 0.53.0 → 0.55.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.
- package/dist/adwaita-web.css +8070 -3037
- package/dist/adwaita-web.css.map +1 -1
- package/lib/types/adw-application-window.spec.d.ts +1 -0
- package/lib/types/adw-bin.spec.d.ts +1 -0
- package/lib/types/adw-breakpoint-bin.spec.d.ts +1 -0
- package/lib/types/adw-clamp-scrollable.spec.d.ts +1 -0
- package/lib/types/adw-multi-layout-view.spec.d.ts +1 -0
- package/lib/types/adw-preferences-row.spec.d.ts +1 -0
- package/lib/types/adw-shortcuts.spec.d.ts +1 -0
- package/lib/types/adw-tab-bar.spec.d.ts +1 -0
- package/lib/types/adw-tab-button.spec.d.ts +1 -0
- package/lib/types/adw-tab-overview.spec.d.ts +1 -0
- package/lib/types/adw-view-switcher-sidebar.spec.d.ts +1 -0
- package/lib/types/adw-window.spec.d.ts +1 -0
- package/lib/types/breakpoints.d.ts +14 -3
- package/lib/types/construct-vectors.spec.d.ts +1 -0
- package/lib/types/elements/adw-application-window.d.ts +27 -0
- package/lib/types/elements/adw-bin.d.ts +17 -0
- package/lib/types/elements/adw-breakpoint-bin.d.ts +67 -0
- package/lib/types/elements/adw-clamp-scrollable.d.ts +38 -0
- package/lib/types/elements/adw-dialog.d.ts +10 -0
- package/lib/types/elements/adw-layout-slot.d.ts +19 -0
- package/lib/types/elements/adw-multi-layout-view.d.ts +101 -0
- package/lib/types/elements/adw-preferences-row.d.ts +31 -0
- package/lib/types/elements/adw-shortcuts-dialog.d.ts +13 -0
- package/lib/types/elements/adw-shortcuts-item.d.ts +36 -0
- package/lib/types/elements/adw-shortcuts-section.d.ts +14 -0
- package/lib/types/elements/adw-sidebar.d.ts +5 -0
- package/lib/types/elements/adw-switch-row.d.ts +3 -0
- package/lib/types/elements/adw-tab-bar.d.ts +108 -0
- package/lib/types/elements/adw-tab-button.d.ts +32 -0
- package/lib/types/elements/adw-tab-overview.d.ts +199 -0
- package/lib/types/elements/adw-tab-view.d.ts +19 -23
- package/lib/types/elements/adw-view-switcher-sidebar.d.ts +84 -0
- package/lib/types/elements/adw-window.d.ts +40 -0
- package/lib/types/elements/gtk-about-dialog.d.ts +146 -0
- package/lib/types/elements/gtk-application-window.d.ts +34 -0
- package/lib/types/elements/gtk-aspect-frame.d.ts +27 -0
- package/lib/types/elements/gtk-button.d.ts +9 -0
- package/lib/types/elements/gtk-calendar.d.ts +159 -0
- package/lib/types/elements/gtk-center-box.d.ts +39 -0
- package/lib/types/elements/gtk-color-dialog-button.d.ts +69 -0
- package/lib/types/elements/gtk-column-view.d.ts +50 -0
- package/lib/types/elements/gtk-drag-icon.d.ts +78 -0
- package/lib/types/elements/gtk-drawing-area.d.ts +95 -0
- package/lib/types/elements/gtk-editable-label.d.ts +33 -0
- package/lib/types/elements/gtk-emoji-chooser.d.ts +84 -0
- package/lib/types/elements/gtk-entry.d.ts +20 -1
- package/lib/types/elements/gtk-expander.d.ts +49 -0
- package/lib/types/elements/gtk-fixed.d.ts +13 -0
- package/lib/types/elements/gtk-flow-box-child.d.ts +14 -0
- package/lib/types/elements/gtk-flow-box.d.ts +87 -0
- package/lib/types/elements/gtk-font-dialog-button.d.ts +83 -0
- package/lib/types/elements/gtk-frame.d.ts +24 -0
- package/lib/types/elements/gtk-gl-area.d.ts +136 -0
- package/lib/types/elements/gtk-graphics-offload.d.ts +24 -0
- package/lib/types/elements/gtk-grid-view.d.ts +39 -0
- package/lib/types/elements/gtk-grid.d.ts +27 -0
- package/lib/types/elements/gtk-header-bar.d.ts +60 -0
- package/lib/types/elements/gtk-inscription.d.ts +64 -0
- package/lib/types/elements/gtk-label.d.ts +3 -0
- package/lib/types/elements/gtk-level-bar.d.ts +59 -0
- package/lib/types/elements/gtk-link-button.d.ts +29 -0
- package/lib/types/elements/gtk-list-box-row.d.ts +54 -0
- package/lib/types/elements/gtk-list-box.d.ts +100 -0
- package/lib/types/elements/gtk-list-view.d.ts +73 -0
- package/lib/types/elements/gtk-media-controls.d.ts +142 -0
- package/lib/types/elements/gtk-notebook.d.ts +148 -0
- package/lib/types/elements/gtk-overlay.d.ts +22 -0
- package/lib/types/elements/gtk-page-setup-unix-dialog.d.ts +87 -0
- package/lib/types/elements/gtk-paned.d.ts +121 -0
- package/lib/types/elements/gtk-password-entry.d.ts +27 -0
- package/lib/types/elements/gtk-picture.d.ts +66 -0
- package/lib/types/elements/gtk-popover-bin.d.ts +82 -0
- package/lib/types/elements/gtk-popover-menu-bar.d.ts +66 -0
- package/lib/types/elements/gtk-popover-menu.d.ts +83 -0
- package/lib/types/elements/gtk-popover.d.ts +28 -3
- package/lib/types/elements/gtk-print-unix-dialog.d.ts +167 -0
- package/lib/types/elements/gtk-revealer.d.ts +55 -0
- package/lib/types/elements/gtk-scale-button.d.ts +59 -0
- package/lib/types/elements/gtk-scale.d.ts +98 -0
- package/lib/types/elements/gtk-scrollbar.d.ts +124 -0
- package/lib/types/elements/gtk-scrolled-window.d.ts +121 -0
- package/lib/types/elements/gtk-search-bar.d.ts +39 -0
- package/lib/types/elements/gtk-search-entry.d.ts +27 -0
- package/lib/types/elements/gtk-separator.d.ts +10 -0
- package/lib/types/elements/gtk-spin-button.d.ts +94 -0
- package/lib/types/elements/gtk-spinner.d.ts +14 -0
- package/lib/types/elements/gtk-stack-sidebar.d.ts +43 -0
- package/lib/types/elements/gtk-stack-switcher.d.ts +58 -0
- package/lib/types/elements/gtk-stack.d.ts +154 -0
- package/lib/types/elements/gtk-switch.d.ts +4 -1
- package/lib/types/elements/gtk-text-view.d.ts +62 -0
- package/lib/types/elements/gtk-text.d.ts +45 -0
- package/lib/types/elements/gtk-toggle-button.d.ts +45 -0
- package/lib/types/elements/gtk-tree-expander.d.ts +38 -0
- package/lib/types/elements/gtk-video.d.ts +97 -0
- package/lib/types/elements/gtk-viewport.d.ts +84 -0
- package/lib/types/elements/gtk-window-controls.d.ts +80 -0
- package/lib/types/elements/gtk-window-handle.d.ts +39 -0
- package/lib/types/elements/gtk-window.d.ts +97 -0
- package/lib/types/elements/justification.d.ts +2 -0
- package/lib/types/elements/popover-menu.d.ts +18 -0
- package/lib/types/elements/roving-focus.d.ts +29 -1
- package/lib/types/emoji-data.d.ts +38 -0
- package/lib/types/font-description.d.ts +96 -0
- package/lib/types/gtk-about-dialog.spec.d.ts +1 -0
- package/lib/types/gtk-action-bar.spec.d.ts +1 -0
- package/lib/types/gtk-application-window.spec.d.ts +1 -0
- package/lib/types/gtk-aspect-frame.spec.d.ts +1 -0
- package/lib/types/gtk-calendar.spec.d.ts +1 -0
- package/lib/types/gtk-center-box.spec.d.ts +1 -0
- package/lib/types/gtk-color-dialog-button.spec.d.ts +1 -0
- package/lib/types/gtk-column-view.spec.d.ts +1 -0
- package/lib/types/gtk-drag-icon.spec.d.ts +1 -0
- package/lib/types/gtk-drawing-area.spec.d.ts +1 -0
- package/lib/types/gtk-editable-label.spec.d.ts +1 -0
- package/lib/types/gtk-emoji-chooser.spec.d.ts +1 -0
- package/lib/types/gtk-expander.spec.d.ts +1 -0
- package/lib/types/gtk-fixed.spec.d.ts +1 -0
- package/lib/types/gtk-flow-box.spec.d.ts +1 -0
- package/lib/types/gtk-font-dialog-button.spec.d.ts +1 -0
- package/lib/types/gtk-frame.spec.d.ts +1 -0
- package/lib/types/gtk-gl-area.spec.d.ts +1 -0
- package/lib/types/gtk-graphics-offload.spec.d.ts +1 -0
- package/lib/types/gtk-grid-view.spec.d.ts +1 -0
- package/lib/types/gtk-grid.spec.d.ts +1 -0
- package/lib/types/gtk-header-bar.spec.d.ts +1 -0
- package/lib/types/gtk-inscription.spec.d.ts +1 -0
- package/lib/types/gtk-level-bar.spec.d.ts +1 -0
- package/lib/types/gtk-link-button.spec.d.ts +1 -0
- package/lib/types/gtk-list-box.spec.d.ts +1 -0
- package/lib/types/gtk-list-view.spec.d.ts +1 -0
- package/lib/types/gtk-media-controls.spec.d.ts +1 -0
- package/lib/types/gtk-notebook.spec.d.ts +1 -0
- package/lib/types/gtk-overlay.spec.d.ts +1 -0
- package/lib/types/gtk-paned.spec.d.ts +1 -0
- package/lib/types/gtk-password-entry.spec.d.ts +1 -0
- package/lib/types/gtk-picture.spec.d.ts +1 -0
- package/lib/types/gtk-popover-bin.spec.d.ts +1 -0
- package/lib/types/gtk-popover-menu-bar.spec.d.ts +1 -0
- package/lib/types/gtk-popover-menu.spec.d.ts +1 -0
- package/lib/types/gtk-popover-role.spec.d.ts +1 -0
- package/lib/types/gtk-popover.spec.d.ts +1 -0
- package/lib/types/gtk-print-dialogs.spec.d.ts +1 -0
- package/lib/types/gtk-revealer.spec.d.ts +1 -0
- package/lib/types/gtk-scale-button.spec.d.ts +1 -0
- package/lib/types/gtk-scale.spec.d.ts +1 -0
- package/lib/types/gtk-scrollbar.spec.d.ts +1 -0
- package/lib/types/gtk-scrolled-window.spec.d.ts +1 -0
- package/lib/types/gtk-search-bar.spec.d.ts +1 -0
- package/lib/types/gtk-search-entry.spec.d.ts +1 -0
- package/lib/types/gtk-separator.spec.d.ts +1 -0
- package/lib/types/gtk-spin-button.spec.d.ts +1 -0
- package/lib/types/gtk-spinner.spec.d.ts +1 -0
- package/lib/types/gtk-stack-sidebar.spec.d.ts +1 -0
- package/lib/types/gtk-stack-switcher.spec.d.ts +1 -0
- package/lib/types/gtk-stack.spec.d.ts +1 -0
- package/lib/types/gtk-text-view.spec.d.ts +1 -0
- package/lib/types/gtk-text.spec.d.ts +1 -0
- package/lib/types/gtk-toggle-button.spec.d.ts +1 -0
- package/lib/types/gtk-tree-expander.spec.d.ts +1 -0
- package/lib/types/gtk-video.spec.d.ts +1 -0
- package/lib/types/gtk-viewport.spec.d.ts +1 -0
- package/lib/types/gtk-window-controls.spec.d.ts +1 -0
- package/lib/types/gtk-window-handle.spec.d.ts +1 -0
- package/lib/types/gtk-window.spec.d.ts +1 -0
- package/lib/types/index.d.ts +4 -1
- package/lib/types/list-view-dom.d.ts +44 -0
- package/lib/types/namespace/adw.d.ts +12 -0
- package/lib/types/namespace/gtk.d.ts +61 -0
- package/lib/types/page-setup.d.ts +100 -0
- package/lib/types/scroll-shading.d.ts +15 -1
- package/lib/types/shared-tree-builder.d.ts +30 -2
- package/lib/types/signals.d.ts +4 -0
- package/lib/types/styles.generated.d.ts +1 -1
- package/lib/types/tab-chip.d.ts +73 -0
- package/lib/types/template-classes.d.ts +11 -0
- package/package.json +12 -8
- package/scss/_action_row.scss +2 -2
- package/scss/_application_window.scss +26 -0
- package/scss/_aspect_frame.scss +25 -0
- package/scss/_bin.scss +26 -0
- package/scss/_button.scss +45 -0
- package/scss/_calendar.scss +176 -0
- package/scss/_center_box.scss +25 -0
- package/scss/_checks.scss +6 -1
- package/scss/_clamp_scrollable.scss +28 -0
- package/scss/_color_button.scss +67 -0
- package/scss/_column_view.scss +126 -0
- package/scss/_drag_icon.scss +55 -0
- package/scss/_drawing.scss +85 -0
- package/scss/_emoji_chooser.scss +213 -0
- package/scss/_entry.scss +13 -5
- package/scss/_entry_row.scss +1 -1
- package/scss/_expander.scss +113 -0
- package/scss/_fixed.scss +29 -0
- package/scss/_flow_box.scss +94 -0
- package/scss/_font_button.scss +63 -0
- package/scss/_frame.scss +41 -0
- package/scss/_grid.scss +19 -0
- package/scss/_grid_view.scss +46 -0
- package/scss/_gtk_about_dialog.scss +186 -0
- package/scss/_headerbar.scss +132 -0
- package/scss/_icons.generated.scss +186 -0
- package/scss/_inscription.scss +125 -0
- package/scss/_level_bar.scss +190 -0
- package/scss/_link.scss +82 -0
- package/scss/_list_box.scss +88 -0
- package/scss/_list_view.scss +96 -0
- package/scss/_media_controls.scss +139 -0
- package/scss/_overlay.scss +68 -0
- package/scss/_paned.scss +130 -0
- package/scss/_password_entry.scss +83 -0
- package/scss/_picture.scss +80 -0
- package/scss/_popover_bin.scss +53 -0
- package/scss/_popover_menu_bar.scss +104 -0
- package/scss/_preferences_row.scss +51 -0
- package/scss/_print_dialogs.scss +328 -0
- package/scss/_reset.scss +21 -19
- package/scss/_revealer.scss +37 -0
- package/scss/_row.scss +20 -5
- package/scss/_scale.scss +298 -0
- package/scss/_scale_button.scss +167 -0
- package/scss/_scrollbar.scss +230 -0
- package/scss/_scrolled_window.scss +131 -0
- package/scss/_search_bar.scss +118 -0
- package/scss/_search_entry.scss +86 -0
- package/scss/_separator.scss +44 -0
- package/scss/_shortcuts_dialog.scss +100 -0
- package/scss/_spin_button.scss +172 -0
- package/scss/_spin_row.scss +56 -8
- package/scss/_spinner.scss +85 -4
- package/scss/_stack.scss +729 -0
- package/scss/_switch.scss +13 -5
- package/scss/_switch_row.scss +10 -0
- package/scss/_tab_bar.scss +317 -0
- package/scss/_tab_button.scss +98 -0
- package/scss/_tab_overview.scss +483 -0
- package/scss/_text.scss +182 -0
- package/scss/_theme.scss +1 -1
- package/scss/_tree_expander.scss +62 -0
- package/scss/_variables.scss +43 -21
- package/scss/_video.scss +146 -0
- package/scss/_view_switcher_sidebar.scss +112 -0
- package/scss/_viewport.scss +50 -0
- package/scss/_window.scss +118 -1
- package/scss/_window_handle.scss +20 -0
- package/scss/adwaita-skin.scss +109 -0
- package/src/adw-action-rows.spec.ts +76 -0
- package/src/adw-application-window.spec.ts +118 -0
- package/src/adw-bin.spec.ts +75 -0
- package/src/adw-breakpoint-bin.spec.ts +324 -0
- package/src/adw-clamp-scrollable.spec.ts +189 -0
- package/src/adw-multi-layout-view.spec.ts +243 -0
- package/src/adw-preferences-row.spec.ts +164 -0
- package/src/adw-row-state.spec.ts +142 -0
- package/src/adw-shortcuts.spec.ts +155 -0
- package/src/adw-tab-bar.spec.ts +287 -0
- package/src/adw-tab-button.spec.ts +101 -0
- package/src/adw-tab-overview.spec.ts +443 -0
- package/src/adw-view-switcher-sidebar.spec.ts +281 -0
- package/src/adw-window.spec.ts +129 -0
- package/src/breakpoints.ts +25 -8
- package/src/capabilities.d.mts +3 -0
- package/src/capabilities.mjs +18 -0
- package/src/connect-lifecycle.spec.ts +12 -0
- package/src/construct-vectors.spec.ts +175 -0
- package/src/elements/adw-application-window.ts +154 -0
- package/src/elements/adw-bin.ts +101 -0
- package/src/elements/adw-breakpoint-bin.ts +287 -0
- package/src/elements/adw-clamp-scrollable.ts +207 -0
- package/src/elements/adw-dialog.ts +19 -0
- package/src/elements/adw-layout-slot.ts +95 -0
- package/src/elements/adw-multi-layout-view.ts +326 -0
- package/src/elements/adw-preferences-row.ts +150 -0
- package/src/elements/adw-shortcuts-dialog.ts +52 -0
- package/src/elements/adw-shortcuts-item.ts +171 -0
- package/src/elements/adw-shortcuts-section.ts +86 -0
- package/src/elements/adw-sidebar.ts +42 -3
- package/src/elements/adw-switch-row.ts +28 -1
- package/src/elements/adw-tab-bar.ts +529 -0
- package/src/elements/adw-tab-button.ts +194 -0
- package/src/elements/adw-tab-overview.ts +1011 -0
- package/src/elements/adw-tab-view.ts +66 -145
- package/src/elements/adw-toggle-group.ts +20 -5
- package/src/elements/adw-view-stack.ts +18 -0
- package/src/elements/adw-view-switcher-sidebar.ts +332 -0
- package/src/elements/adw-window.ts +185 -11
- package/src/elements/checks.ts +35 -8
- package/src/elements/gtk-about-dialog.ts +811 -0
- package/src/elements/gtk-application-window.ts +108 -0
- package/src/elements/gtk-aspect-frame.ts +160 -0
- package/src/elements/gtk-button.ts +12 -0
- package/src/elements/gtk-calendar.ts +757 -0
- package/src/elements/gtk-center-box.ts +184 -0
- package/src/elements/gtk-color-dialog-button.ts +278 -0
- package/src/elements/gtk-column-view.ts +320 -0
- package/src/elements/gtk-drag-icon.ts +257 -0
- package/src/elements/gtk-drawing-area.ts +303 -0
- package/src/elements/gtk-editable-label.ts +204 -0
- package/src/elements/gtk-emoji-chooser.ts +542 -0
- package/src/elements/gtk-entry.ts +39 -5
- package/src/elements/gtk-expander.ts +301 -0
- package/src/elements/gtk-fixed.ts +99 -0
- package/src/elements/gtk-flow-box-child.ts +68 -0
- package/src/elements/gtk-flow-box.ts +480 -0
- package/src/elements/gtk-font-dialog-button.ts +432 -0
- package/src/elements/gtk-frame.ts +174 -0
- package/src/elements/gtk-gl-area.ts +476 -0
- package/src/elements/gtk-graphics-offload.ts +130 -0
- package/src/elements/gtk-grid-view.ts +168 -0
- package/src/elements/gtk-grid.ts +127 -0
- package/src/elements/gtk-header-bar.ts +273 -0
- package/src/elements/gtk-inscription.ts +387 -0
- package/src/elements/gtk-label.ts +19 -11
- package/src/elements/gtk-level-bar.ts +323 -0
- package/src/elements/gtk-link-button.ts +138 -0
- package/src/elements/gtk-list-box-row.ts +195 -0
- package/src/elements/gtk-list-box.ts +413 -0
- package/src/elements/gtk-list-view.ts +370 -0
- package/src/elements/gtk-media-controls.ts +509 -0
- package/src/elements/gtk-notebook.ts +664 -0
- package/src/elements/gtk-overlay.ts +149 -0
- package/src/elements/gtk-page-setup-unix-dialog.ts +420 -0
- package/src/elements/gtk-paned.ts +597 -0
- package/src/elements/gtk-password-entry.ts +170 -0
- package/src/elements/gtk-picture.ts +254 -0
- package/src/elements/gtk-popover-bin.ts +332 -0
- package/src/elements/gtk-popover-menu-bar.ts +355 -0
- package/src/elements/gtk-popover-menu.ts +339 -0
- package/src/elements/gtk-popover.ts +92 -10
- package/src/elements/gtk-print-unix-dialog.ts +989 -0
- package/src/elements/gtk-progress-bar.ts +24 -11
- package/src/elements/gtk-revealer.ts +406 -0
- package/src/elements/gtk-scale-button.ts +358 -0
- package/src/elements/gtk-scale.ts +492 -0
- package/src/elements/gtk-scrollbar.ts +528 -0
- package/src/elements/gtk-scrolled-window.ts +642 -0
- package/src/elements/gtk-search-bar.ts +200 -0
- package/src/elements/gtk-search-entry.ts +172 -0
- package/src/elements/gtk-separator.ts +52 -0
- package/src/elements/gtk-spin-button.ts +475 -0
- package/src/elements/gtk-spinner.ts +126 -0
- package/src/elements/gtk-stack-sidebar.ts +212 -0
- package/src/elements/gtk-stack-switcher.ts +279 -0
- package/src/elements/gtk-stack.ts +748 -0
- package/src/elements/gtk-switch.ts +52 -19
- package/src/elements/gtk-text-view.ts +290 -0
- package/src/elements/gtk-text.ts +219 -0
- package/src/elements/gtk-toggle-button.ts +239 -0
- package/src/elements/gtk-tree-expander.ts +243 -0
- package/src/elements/gtk-video.ts +423 -0
- package/src/elements/gtk-viewport.ts +277 -0
- package/src/elements/gtk-window-controls.ts +341 -0
- package/src/elements/gtk-window-handle.ts +221 -0
- package/src/elements/gtk-window.ts +366 -0
- package/src/elements/justification.ts +24 -0
- package/src/elements/popover-menu.ts +24 -0
- package/src/elements/roving-focus.ts +53 -21
- package/src/emoji-data.ts +577 -0
- package/src/entry-rows.spec.ts +31 -0
- package/src/font-description.ts +238 -0
- package/src/gtk-about-dialog.spec.ts +250 -0
- package/src/gtk-action-bar.spec.ts +89 -0
- package/src/gtk-application-window.spec.ts +107 -0
- package/src/gtk-aspect-frame.spec.ts +114 -0
- package/src/gtk-calendar.spec.ts +589 -0
- package/src/gtk-center-box.spec.ts +125 -0
- package/src/gtk-color-dialog-button.spec.ts +141 -0
- package/src/gtk-column-view.spec.ts +154 -0
- package/src/gtk-drag-icon.spec.ts +190 -0
- package/src/gtk-drawing-area.spec.ts +211 -0
- package/src/gtk-editable-label.spec.ts +190 -0
- package/src/gtk-emoji-chooser.spec.ts +173 -0
- package/src/gtk-entry.spec.ts +23 -0
- package/src/gtk-expander.spec.ts +170 -0
- package/src/gtk-fixed.spec.ts +97 -0
- package/src/gtk-flow-box.spec.ts +289 -0
- package/src/gtk-font-dialog-button.spec.ts +166 -0
- package/src/gtk-frame.spec.ts +119 -0
- package/src/gtk-gl-area.spec.ts +361 -0
- package/src/gtk-graphics-offload.spec.ts +119 -0
- package/src/gtk-grid-view.spec.ts +106 -0
- package/src/gtk-grid.spec.ts +122 -0
- package/src/gtk-header-bar.spec.ts +202 -0
- package/src/gtk-inscription.spec.ts +235 -0
- package/src/gtk-level-bar.spec.ts +199 -0
- package/src/gtk-link-button.spec.ts +117 -0
- package/src/gtk-list-box.spec.ts +422 -0
- package/src/gtk-list-view.spec.ts +203 -0
- package/src/gtk-media-controls.spec.ts +295 -0
- package/src/gtk-notebook.spec.ts +546 -0
- package/src/gtk-overlay.spec.ts +141 -0
- package/src/gtk-paned.spec.ts +267 -0
- package/src/gtk-password-entry.spec.ts +150 -0
- package/src/gtk-picture.spec.ts +172 -0
- package/src/gtk-popover-bin.spec.ts +229 -0
- package/src/gtk-popover-menu-bar.spec.ts +296 -0
- package/src/gtk-popover-menu.spec.ts +261 -0
- package/src/gtk-popover-role.spec.ts +138 -0
- package/src/gtk-popover.spec.ts +264 -0
- package/src/gtk-print-dialogs.spec.ts +251 -0
- package/src/gtk-revealer.spec.ts +164 -0
- package/src/gtk-scale-button.spec.ts +218 -0
- package/src/gtk-scale.spec.ts +213 -0
- package/src/gtk-scrollbar.spec.ts +244 -0
- package/src/gtk-scrolled-window.spec.ts +262 -0
- package/src/gtk-search-bar.spec.ts +179 -0
- package/src/gtk-search-entry.spec.ts +142 -0
- package/src/gtk-separator.spec.ts +74 -0
- package/src/gtk-spin-button.spec.ts +186 -0
- package/src/gtk-spinner.spec.ts +130 -0
- package/src/gtk-stack-sidebar.spec.ts +217 -0
- package/src/gtk-stack-switcher.spec.ts +249 -0
- package/src/gtk-stack.spec.ts +432 -0
- package/src/gtk-text-view.spec.ts +189 -0
- package/src/gtk-text.spec.ts +163 -0
- package/src/gtk-toggle-button.spec.ts +186 -0
- package/src/gtk-tree-expander.spec.ts +201 -0
- package/src/gtk-video.spec.ts +240 -0
- package/src/gtk-viewport.spec.ts +140 -0
- package/src/gtk-window-controls.spec.ts +232 -0
- package/src/gtk-window-handle.spec.ts +158 -0
- package/src/gtk-window.spec.ts +190 -0
- package/src/index.ts +9 -1
- package/src/keyboard-operable.spec.ts +33 -1
- package/src/list-view-dom.ts +121 -0
- package/src/namespace/adw.ts +12 -0
- package/src/namespace/gtk.ts +61 -0
- package/src/page-setup.ts +222 -0
- package/src/scroll-shading.ts +18 -1
- package/src/shared-tree-builder.ts +263 -21
- package/src/signals.ts +15 -0
- package/src/source-view/theme.ts +11 -5
- package/src/style-classes.spec.ts +9 -8
- package/src/styles.generated.ts +1 -1
- package/src/tab-chip.ts +200 -0
- package/src/template-classes.ts +45 -0
- package/src/test.browser.mts +152 -0
package/scss/_scale.scss
ADDED
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
// _scale.scss — <gtk-scale>: the trough, its highlighted part, the fill level's second
|
|
2
|
+
// bar, the knob and the value text.
|
|
3
|
+
//
|
|
4
|
+
// WHAT CAME FROM WHERE, and the one thing that did not come from anywhere:
|
|
5
|
+
//
|
|
6
|
+
// The trough and highlight are libadwaita's `%scale_trough` / `%scale_highlight`
|
|
7
|
+
// (_scale.scss:1-17) with GTK's own `GTK_CSS` colour values inlined —
|
|
8
|
+
// `_colors.scss:280-289` gives `$trough_color` 15% of `currentColor`,
|
|
9
|
+
// `$trough_color_hc` 30%, `$trough_hover_color` 20%, `$trough_hover_color_hc` 40%, and
|
|
10
|
+
// `$slider_color` as `color-mix (white 80%, var (--view-bg-color))`, the same two the
|
|
11
|
+
// package's `_progress_bar.scss` already inlines for the same reason.
|
|
12
|
+
//
|
|
13
|
+
// The ONE NUMBER WITH NO CITABLE LINE is the trough's 4px thickness: `%scale_trough`
|
|
14
|
+
// sets only the radius and the colour, because in GTK that thickness comes from the
|
|
15
|
+
// TOOLKIT's Adwaita theme — `gtk-adwaita-theme`, a repository beside `refs/gtk`, not
|
|
16
|
+
// inside it. It is a thickness; nothing else in this partial or in the element's
|
|
17
|
+
// behaviour depends on it.
|
|
18
|
+
//
|
|
19
|
+
// The VALUE'S PLACE comes from GTK's own `gtk_scale_allocate` (gtkscale.c:373-421),
|
|
20
|
+
// which is not a stylesheet at all: the four `value-pos` cases pick an edge of the
|
|
21
|
+
// widget for the value, and `gtk_scale_get_range_border` (:1239-1272) keeps the trough
|
|
22
|
+
// out of it. The container axis below is that switch.
|
|
23
|
+
//
|
|
24
|
+
// NOT PORTED, each because nothing here can select it — the same reasoning
|
|
25
|
+
// `_progress_bar.scss` records for `progressbar.vertical`:
|
|
26
|
+
// · the value's placement ON THE KNOB. `gtk_scale_allocate_value` (gtkscale.c:388-425)
|
|
27
|
+
// centres it on the slider for `top`/`bottom` and on the trough for `left`/`right`, which
|
|
28
|
+
// a flow layout cannot reach for either — `align-self: center` is the cross-axis centre,
|
|
29
|
+
// the one half that needs no knowledge of the value's own width. It shows only once the
|
|
30
|
+
// value is off the middle of its range.
|
|
31
|
+
// · the `> marks` blocks and `.marks-before` / `.marks-after` (:98-111, :114-124,
|
|
32
|
+
// :152-170, :212-226). Those style classes are added ONLY by `gtk_scale_add_mark()` /
|
|
33
|
+
// `clear_marks()` (gtkscale.c:1638, :1696-1721), which have been deprecated since
|
|
34
|
+
// GTK 4.10; a scale without marks has no marks node and no class.
|
|
35
|
+
// · the `.fine-tune` blocks (:137-150, :197-210). `.fine-tune` is a `GtkRange` style
|
|
36
|
+
// class it adds for the duration of a Shift-held drag (gtkrange.c:1799-1801), and
|
|
37
|
+
// `<gtk-scale>`'s pointer handling does not run that zoom state.
|
|
38
|
+
// · the `.color` variant (:229-250), which `Gtk.ScaleButton` adds to ITSELF; the
|
|
39
|
+
// standalone `Gtk.Scale` node never carries it.
|
|
40
|
+
//
|
|
41
|
+
// Reference: refs/libadwaita/src/stylesheet/widgets/_scale.scss:1-251
|
|
42
|
+
// Reference: refs/libadwaita/src/stylesheet/_colors.scss:280-289
|
|
43
|
+
// Reference: refs/gtk/gtk/gtkscale.c (gtk_scale_allocate_value, update_value_position,
|
|
44
|
+
// gtk_scale_get_range_border), refs/gtk/gtk/gtkrange.c (clamp_dimensions)
|
|
45
|
+
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
46
|
+
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
47
|
+
|
|
48
|
+
// `> value` @extends `.dimmed` and `.numeric` exactly as the scale's value node does.
|
|
49
|
+
@use 'labels';
|
|
50
|
+
|
|
51
|
+
gtk-scale {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex: 1;
|
|
54
|
+
min-width: 10px;
|
|
55
|
+
min-height: 10px;
|
|
56
|
+
padding: 12px;
|
|
57
|
+
|
|
58
|
+
// THE CONTAINER AXIS FOLLOWS `value-pos`, NOT THE ORIENTATION. GTK's
|
|
59
|
+
// `gtk_scale_allocate` (gtkscale.c:373-421) puts the value BESIDE the trough for
|
|
60
|
+
// `left`/`right` and ABOVE or BELOW it for `top`/`bottom` — for BOTH orientations,
|
|
61
|
+
// because those four are the cross-axis ends of a horizontal scale and the main-axis
|
|
62
|
+
// ends of a vertical one. Measured, not read off the switch: a 628px horizontal scale
|
|
63
|
+
// with `draw-value` and `value-pos: top` allocates the value at `y=0` above a trough
|
|
64
|
+
// that starts at `y=29` (`gtk_scale_get_range_border`, gtkscale.c:1239-1272), and the
|
|
65
|
+
// same scale with `left` allocates the value at `x=0`, `y=0`, ON THE TROUGH'S LINE.
|
|
66
|
+
//
|
|
67
|
+
// The value node is the scale's FIRST child upstream — `gtk_scale_set_draw_value`
|
|
68
|
+
// (gtkscale.c:1097-1101) does `gtk_widget_insert_after (…, GTK_WIDGET (scale), NULL)`,
|
|
69
|
+
// ahead of the trough `gtk_range_init` appended — and `update_value_position`
|
|
70
|
+
// (gtkscale.c:1042-1073) only ever puts a position class on it. Here the DOM runs
|
|
71
|
+
// trough-then-value, so the two positions that mean "ahead of the trough in the flow"
|
|
72
|
+
// upstream — `top` and `left` — are the ones that need the axis REVERSED. The four HOST
|
|
73
|
+
// classes carry the same four names, so one `value-pos` attribute decides the axis as well
|
|
74
|
+
// as the value node's own margins.
|
|
75
|
+
&.value-top,
|
|
76
|
+
&.value-bottom {
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
align-items: stretch;
|
|
79
|
+
|
|
80
|
+
// GTK centres the value on the KNOB for these two
|
|
81
|
+
// (`value_alloc.x = slider_center_x - value_alloc.width / 2`, gtkscale.c:391, :397),
|
|
82
|
+
// which the flow layout cannot reach — the cross-axis centre is what is left, and it
|
|
83
|
+
// is the one half that does not need the value's width.
|
|
84
|
+
.adw-scale-value {
|
|
85
|
+
align-self: center;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&.value-top {
|
|
90
|
+
flex-direction: column-reverse;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&.value-left,
|
|
94
|
+
&.value-right {
|
|
95
|
+
flex-direction: row;
|
|
96
|
+
// GTK centres the value on the trough (`value_alloc.y = trough_center_y -
|
|
97
|
+
// value_alloc.height / 2`, gtkscale.c:376, :382), which for one line of children is
|
|
98
|
+
// `align-items: center`.
|
|
99
|
+
align-items: center;
|
|
100
|
+
|
|
101
|
+
.adw-scale-value {
|
|
102
|
+
flex: 0 0 auto;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&.value-left {
|
|
107
|
+
flex-direction: row-reverse;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// WHERE THE VALUE SITS BESIDE THE TROUGH, the value takes its width off the track and the
|
|
111
|
+
// trough takes what is left — `gtk_scale_get_range_border` (gtkscale.c:1239-1272) shrinks
|
|
112
|
+
// the trough's allocation by the value's, never the other way round. The axis there is the
|
|
113
|
+
// scale's OWN, which is why `flex: 1` has to be asked for by orientation: the trough is an
|
|
114
|
+
// empty bar whose only size is what the layout gives it.
|
|
115
|
+
&.horizontal.value-left,
|
|
116
|
+
&.horizontal.value-right,
|
|
117
|
+
&.vertical.value-top,
|
|
118
|
+
&.vertical.value-bottom {
|
|
119
|
+
.adw-scale-trough {
|
|
120
|
+
flex: 1 1 auto;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// The other two pairs leave the trough across the cross axis, where `stretch` reaches it on
|
|
125
|
+
// its own — except for a vertical one under `align-items: center` above.
|
|
126
|
+
&.vertical.value-left,
|
|
127
|
+
&.vertical.value-right {
|
|
128
|
+
.adw-scale-trough {
|
|
129
|
+
align-self: stretch;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.adw-scale-trough {
|
|
134
|
+
// %scale_trough (_scale.scss:1-10)
|
|
135
|
+
position: relative;
|
|
136
|
+
display: flex;
|
|
137
|
+
border-radius: 99px;
|
|
138
|
+
background-color: color-mix(in srgb, currentColor 15%, transparent);
|
|
139
|
+
transition:
|
|
140
|
+
background 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
|
|
141
|
+
box-shadow 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
142
|
+
|
|
143
|
+
@media (prefers-contrast: more) {
|
|
144
|
+
background-color: color-mix(in srgb, currentColor 30%, transparent);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// %scale_highlight (_scale.scss:12-17) — the coloured part of the backing bit.
|
|
149
|
+
.adw-scale-highlight {
|
|
150
|
+
position: absolute;
|
|
151
|
+
border-radius: 99px;
|
|
152
|
+
background-color: var(--accent-bg-color);
|
|
153
|
+
color: var(--accent-fg-color);
|
|
154
|
+
transition:
|
|
155
|
+
background 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
|
|
156
|
+
box-shadow 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// `> fill` (:43-47): a SECOND trough-styled bar for a media player's buffered range,
|
|
160
|
+
// which is why it is not the highlight the `has-origin` block owns.
|
|
161
|
+
.adw-scale-fill {
|
|
162
|
+
position: absolute;
|
|
163
|
+
border-radius: 99px;
|
|
164
|
+
background-color: color-mix(in srgb, currentColor 15%, transparent);
|
|
165
|
+
|
|
166
|
+
@media (prefers-contrast: more) {
|
|
167
|
+
background-color: color-mix(in srgb, currentColor 30%, transparent);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// `> slider` (:49-59). The negative margin is upstream's own comment: "the slider is
|
|
172
|
+
// inside the trough, so to make it bigger there's a negative margin".
|
|
173
|
+
.adw-scale-slider {
|
|
174
|
+
position: absolute;
|
|
175
|
+
min-width: 20px;
|
|
176
|
+
min-height: 20px;
|
|
177
|
+
margin: -8px;
|
|
178
|
+
border-radius: 100%;
|
|
179
|
+
background-color: color-mix(in srgb, white 80%, var(--view-bg-color));
|
|
180
|
+
box-shadow:
|
|
181
|
+
0 0 0 1px rgb(0 0 6 / 10%),
|
|
182
|
+
0 2px 4px rgb(0 0 6 / 20%);
|
|
183
|
+
transition: background 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// The element positions the knob by its CENTRE (`gtk_scale_init` fixes the slider size,
|
|
187
|
+
// so `coord_to_value` divides the trough alone by it), hence the translate on both axes
|
|
188
|
+
// and the fact that only ONE of `left` / `bottom` is ever written.
|
|
189
|
+
&.horizontal {
|
|
190
|
+
.adw-scale-trough {
|
|
191
|
+
height: 4px;
|
|
192
|
+
min-height: 4px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.adw-scale-highlight,
|
|
196
|
+
.adw-scale-fill {
|
|
197
|
+
top: 0;
|
|
198
|
+
bottom: 0;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.adw-scale-slider {
|
|
202
|
+
top: 50%;
|
|
203
|
+
transform: translate(-50%, -50%);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&.vertical {
|
|
208
|
+
.adw-scale-trough {
|
|
209
|
+
width: 4px;
|
|
210
|
+
min-width: 4px;
|
|
211
|
+
// The trough is a fixed-width BAR and the axis above is the cross axis, so it must
|
|
212
|
+
// not stretch: `align-items: stretch` on a column would give it the full width.
|
|
213
|
+
align-self: center;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.adw-scale-highlight,
|
|
217
|
+
.adw-scale-fill {
|
|
218
|
+
right: 0;
|
|
219
|
+
left: 0;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.adw-scale-slider {
|
|
223
|
+
left: 50%;
|
|
224
|
+
transform: translate(-50%, 50%);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// `&:hover, &:active { > trough { … } }` (:62-78). `currentColor` on the highlight is
|
|
229
|
+
// the accent FOREGROUND, which is why upstream's 10% wash lands as a light film.
|
|
230
|
+
&:hover,
|
|
231
|
+
&:active {
|
|
232
|
+
.adw-scale-trough {
|
|
233
|
+
background-color: color-mix(in srgb, currentColor 20%, transparent);
|
|
234
|
+
|
|
235
|
+
@media (prefers-contrast: more) {
|
|
236
|
+
background-color: color-mix(in srgb, currentColor 40%, transparent);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.adw-scale-highlight {
|
|
241
|
+
background-image: image(color-mix(in srgb, currentColor 10%, transparent));
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.adw-scale-slider {
|
|
245
|
+
background-color: white;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// `&:disabled { filter: Opacity(var(--disabled-opacity)) }` (:80-91)
|
|
250
|
+
&[disabled] {
|
|
251
|
+
opacity: var(--disabled-opacity);
|
|
252
|
+
|
|
253
|
+
.adw-scale-slider {
|
|
254
|
+
box-shadow:
|
|
255
|
+
0 0 0 1px rgb(0 0 6 / 10%),
|
|
256
|
+
0 2px 4px transparent;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// `> value { @extend .dimmed; @extend .numeric; }` (:93-96) — literally upstream's two
|
|
261
|
+
// lines, now that `.dimmed` and `.numeric` exist here as the same utility classes.
|
|
262
|
+
.adw-scale-value {
|
|
263
|
+
@extend .dimmed;
|
|
264
|
+
@extend .numeric;
|
|
265
|
+
|
|
266
|
+
// `> value.top { margin-bottom: $_marks_size }` / `.bottom { margin-top: … }` /
|
|
267
|
+
// `.left { margin-right: 9px }` / `.right { margin-left: 9px }` (:126-135). The marks
|
|
268
|
+
// they were sized against are not ported; the offsets themselves still decide where the
|
|
269
|
+
// value sits beside the trough.
|
|
270
|
+
&.top {
|
|
271
|
+
margin-bottom: 12px;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
&.bottom {
|
|
275
|
+
margin-top: 12px;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
&.left {
|
|
279
|
+
margin-right: 9px;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
&.right {
|
|
283
|
+
margin-left: 9px;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// A keyboard-focused scale draws the ring on the KNOB, as `@include focus-ring("> trough >
|
|
288
|
+
// slider", $offset: 0)` does upstream (:29). The host is the focusable node, so its
|
|
289
|
+
// `:focus-visible` is what stands in for the slider's.
|
|
290
|
+
&:focus-visible {
|
|
291
|
+
outline: none;
|
|
292
|
+
|
|
293
|
+
.adw-scale-slider {
|
|
294
|
+
outline: 2px solid var(--accent-color);
|
|
295
|
+
outline-offset: 0;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// _scale_button.scss — `<gtk-scale-button>`: the icon button, its `.scale-popup` dock and
|
|
2
|
+
// the range inside it.
|
|
3
|
+
//
|
|
4
|
+
// The node is `scalebutton.scale` holding `button.toggle`
|
|
5
|
+
// (gtkscalebutton.c:87-97), and the DOCK is a `GtkPopover` with the `scale-popup` style
|
|
6
|
+
// class holding a box of [minus, scale, plus] with 4px margins and 4px spacing
|
|
7
|
+
// (gtk/ui/gtkscalebutton.ui) — all three of those numbers restated here, because the box is the
|
|
8
|
+
// dock's whole layout and GTK sizes the scale to `SCALE_SIZE` (100px) along its axis.
|
|
9
|
+
//
|
|
10
|
+
// The RANGE ITSELF is libadwaita's `scale` node (_scale.scss:19-251): the 12px padding,
|
|
11
|
+
// the 99px trough, the accent-coloured `highlight`, the 20px round slider with a `-8px`
|
|
12
|
+
// negative margin and a two-part shadow. An `<input type="range">` is the element the
|
|
13
|
+
// NativeScript port already substitutes for `GtkScale`, and the trough/highlight/slider
|
|
14
|
+
// are drawn with `appearance: none` and the same numbers. The vertical case is the
|
|
15
|
+
// `writing-mode` + `direction` pair that makes a range grow UPWARD, which is
|
|
16
|
+
// `gtk_range_set_inverted (scale, TRUE)` for the vertical orientation (:883) — and
|
|
17
|
+
// `scale-button-box` reverses its column for the same reason `apply_orientation`
|
|
18
|
+
// reorders the children (:869-889).
|
|
19
|
+
//
|
|
20
|
+
// Reference: refs/gtk/gtk/gtkscalebutton.c:87-97 (the node), :869-889 (the orientation),
|
|
21
|
+
// :1099-1100 (the steppers' sensitivity)
|
|
22
|
+
// Reference: refs/gtk/gtk/ui/gtkscalebutton.ui:13-25 (the dock, its box, its margins)
|
|
23
|
+
// Reference: refs/libadwaita/src/stylesheet/widgets/_scale.scss:1-60 (trough, highlight, slider)
|
|
24
|
+
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
25
|
+
// Modifications: Adapted for @gjsify/adwaita-web — the scale is `<input type="range">`
|
|
26
|
+
// rather than a `scale` node, and the slider is drawn with `appearance: none`.
|
|
27
|
+
|
|
28
|
+
/** `SCALE_SIZE` (gtkscalebutton.c:88) — the scale's size request along its own axis. */
|
|
29
|
+
$scale-size: 100px;
|
|
30
|
+
|
|
31
|
+
// libadwaita's own values (`_colors.scss:280-288`), which are Sass variables over tokens
|
|
32
|
+
// this package already has rather than new ones: a trough is 15% of the current text
|
|
33
|
+
// colour and a slider is 80% white over the view background.
|
|
34
|
+
$trough-color: color-mix(in srgb, currentColor 15%, transparent);
|
|
35
|
+
$trough-hover-color: color-mix(in srgb, currentColor 20%, transparent);
|
|
36
|
+
$slider-color: color-mix(in srgb, white 80%, var(--view-bg-color));
|
|
37
|
+
$slider-border-color: rgb(0 0 6 / 10%);
|
|
38
|
+
|
|
39
|
+
gtk-scale-button {
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
position: relative;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.scale-button-icon {
|
|
45
|
+
min-width: 34px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// The dock's own box: 4px of margin on all four sides, 4px between the three children.
|
|
49
|
+
.scale-button-box {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
gap: 4px;
|
|
54
|
+
margin: 4px;
|
|
55
|
+
|
|
56
|
+
// `apply_orientation` moves plus ABOVE minus when the scale is vertical
|
|
57
|
+
// (gtkscalebutton.c:876-878). Reversing the column is the same arrangement without
|
|
58
|
+
// moving nodes, which would take focus off a stepper mid-click.
|
|
59
|
+
.vertical & {
|
|
60
|
+
flex-direction: column-reverse;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.scale-button-step {
|
|
65
|
+
min-width: 24px;
|
|
66
|
+
min-height: 24px;
|
|
67
|
+
padding: 2px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.scale-button-range {
|
|
71
|
+
appearance: none;
|
|
72
|
+
background: none;
|
|
73
|
+
margin: 0;
|
|
74
|
+
padding: 12px;
|
|
75
|
+
min-width: 10px;
|
|
76
|
+
min-height: 10px;
|
|
77
|
+
flex: 1;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
|
|
80
|
+
// libadwaita sizes the SLIDER at 20px and pulls it 8px back out of the trough
|
|
81
|
+
// (_scale.scss:49-58) — the negative margin is upstream's, not decoration.
|
|
82
|
+
&::-webkit-slider-runnable-track {
|
|
83
|
+
height: 4px;
|
|
84
|
+
border-radius: 99px;
|
|
85
|
+
background-color: $trough-color;
|
|
86
|
+
transition: background-color 0.2s ease;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&::-webkit-slider-thumb {
|
|
90
|
+
appearance: none;
|
|
91
|
+
width: 20px;
|
|
92
|
+
height: 20px;
|
|
93
|
+
margin: -8px;
|
|
94
|
+
border: none;
|
|
95
|
+
border-radius: 100%;
|
|
96
|
+
background-color: $slider-color;
|
|
97
|
+
box-shadow: 0 0 0 1px $slider-border-color, 0 2px 4px rgb(0 0 6 / 20%);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&::-moz-range-track {
|
|
101
|
+
height: 4px;
|
|
102
|
+
border-radius: 99px;
|
|
103
|
+
background-color: $trough-color;
|
|
104
|
+
transition: background-color 0.2s ease;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&::-moz-range-progress {
|
|
108
|
+
height: 4px;
|
|
109
|
+
border-radius: 99px;
|
|
110
|
+
background-color: var(--accent-bg-color);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&::-moz-range-thumb {
|
|
114
|
+
width: 20px;
|
|
115
|
+
height: 20px;
|
|
116
|
+
border: none;
|
|
117
|
+
border-radius: 100%;
|
|
118
|
+
background-color: $slider-color;
|
|
119
|
+
box-shadow: 0 0 0 1px $slider-border-color, 0 2px 4px rgb(0 0 6 / 20%);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&:hover::-webkit-slider-runnable-track,
|
|
123
|
+
&:active::-webkit-slider-runnable-track {
|
|
124
|
+
background-color: $trough-hover-color;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&:hover::-moz-range-track,
|
|
128
|
+
&:active::-moz-range-track {
|
|
129
|
+
background-color: $trough-hover-color;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&:disabled {
|
|
133
|
+
filter: opacity(var(--disabled-opacity));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// A VERTICAL scale: `writing-mode` gives the axis and `direction: rtl` makes the value
|
|
137
|
+
// grow upward, which is `gtk_range_set_inverted (scale, TRUE)` for the vertical
|
|
138
|
+
// orientation (gtkscalebutton.c:883) and the only reason a media volume button fills
|
|
139
|
+
// from the bottom.
|
|
140
|
+
.vertical & {
|
|
141
|
+
writing-mode: vertical-lr;
|
|
142
|
+
direction: rtl;
|
|
143
|
+
width: 24px;
|
|
144
|
+
height: $scale-size;
|
|
145
|
+
flex: none;
|
|
146
|
+
|
|
147
|
+
&::-webkit-slider-runnable-track {
|
|
148
|
+
width: 4px;
|
|
149
|
+
height: $scale-size;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&::-webkit-slider-thumb {
|
|
153
|
+
margin: -8px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&::-moz-range-track {
|
|
157
|
+
width: 4px;
|
|
158
|
+
height: $scale-size;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.horizontal & {
|
|
163
|
+
height: 24px;
|
|
164
|
+
width: $scale-size;
|
|
165
|
+
flex: none;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
// _scrollbar.scss — <gtk-scrollbar>: libadwaita's trough, slider and the two overlay
|
|
2
|
+
// variants, with GTK's `range` level collapsed.
|
|
3
|
+
//
|
|
4
|
+
// THE SELECTOR REWRITE, and why it is not a guess. libadwaita addresses
|
|
5
|
+
// `scrollbar > range > trough > slider` (`_scrolling.scss:6-8`) because `GtkScrollbar` builds
|
|
6
|
+
// a `GtkRange` and parents it to itself (gtkscrollbar.c:263-278). There is no `<gtk-range>`
|
|
7
|
+
// element in this package — `Gtk.Range` is the ancestor of `GtkScale` and `Gtk.Scrollbar` and
|
|
8
|
+
// is documented through them — so the trough-and-slider pair IS the node below the range and
|
|
9
|
+
// the two class names stand in for the two GTK nodes. Everything else is upstream's
|
|
10
|
+
// declaration in upstream's order: the trough's `margin: 9px` (and the 8px it gives back on
|
|
11
|
+
// the cross axis, `_scrolling.scss:38-48`), the slider's `$_slider_width: 8px`, its
|
|
12
|
+
// `border: 8px solid transparent` with `background-clip: padding-box` — which is how an 8px
|
|
13
|
+
// dot becomes a 24px pill — and the `$_slider_min_length: 40px` floor.
|
|
14
|
+
//
|
|
15
|
+
// THE BAR'S BOX IS THE TROUGH'S MARGINS, 24px on the cross axis, and the slider's negative
|
|
16
|
+
// margin is what centres it: the border box is 24px where the trough is 8px, so
|
|
17
|
+
// `top: 0; margin-top: -8px` puts the visible 8px exactly on the trough. `GtkScrollbar`
|
|
18
|
+
// measures its range to the trough's size and its own allocation is what is left, so the
|
|
19
|
+
// numbers here are the same ones GTK adds up.
|
|
20
|
+
//
|
|
21
|
+
// THE SLIDER'S LENGTH IS COMPUTED, not written here. `gtk_range_compute_slider_position`
|
|
22
|
+
// derives it from `page_size / (upper - lower)` and its position from
|
|
23
|
+
// `(value - lower) / (upper - lower - page_size)`, and the element writes both as
|
|
24
|
+
// `--adw-scrollbar-size` / `--adw-scrollbar-position` in px. That is why the slider is
|
|
25
|
+
// absolutely positioned rather than sized by a percentage: the two fractions have DIFFERENT
|
|
26
|
+
// denominators, and a percentage of the trough is the wrong unit for either.
|
|
27
|
+
//
|
|
28
|
+
// `--scrollbar-outline-color` is upstream's own token and this package does not define it,
|
|
29
|
+
// so every use falls back to the window foreground — the outline exists to keep an overlay
|
|
30
|
+
// indicator legible over whatever is beneath it, which is the job the foreground does.
|
|
31
|
+
|
|
32
|
+
$_slider_min_length: 40px;
|
|
33
|
+
$_slider_width: 8px;
|
|
34
|
+
$_scrollbar_transition: all 200ms linear;
|
|
35
|
+
|
|
36
|
+
gtk-scrollbar {
|
|
37
|
+
position: relative;
|
|
38
|
+
display: block;
|
|
39
|
+
flex: none;
|
|
40
|
+
color: var(--window-fg-color);
|
|
41
|
+
touch-action: none;
|
|
42
|
+
|
|
43
|
+
// The cross axis, which is the trough's own 8px plus the 8px margin on each side.
|
|
44
|
+
&.horizontal {
|
|
45
|
+
height: $_slider_width + 16px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.vertical {
|
|
49
|
+
width: $_slider_width + 16px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// `> range > trough` — the trough is the whole node and the slider rides inside it.
|
|
53
|
+
.adw-scrollbar-trough {
|
|
54
|
+
position: absolute;
|
|
55
|
+
margin: 9px;
|
|
56
|
+
border-radius: 99px;
|
|
57
|
+
transition: $_scrollbar_transition;
|
|
58
|
+
|
|
59
|
+
> .adw-scrollbar-slider {
|
|
60
|
+
position: absolute;
|
|
61
|
+
min-width: $_slider_width;
|
|
62
|
+
min-height: $_slider_width;
|
|
63
|
+
margin: -8px;
|
|
64
|
+
border: 8px solid transparent;
|
|
65
|
+
border-radius: 99px;
|
|
66
|
+
background-clip: padding-box;
|
|
67
|
+
transition: $_scrollbar_transition;
|
|
68
|
+
background-color: color-mix(in srgb, currentColor 20%, transparent);
|
|
69
|
+
|
|
70
|
+
&:hover {
|
|
71
|
+
background-color: color-mix(in srgb, currentColor 40%, transparent);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:active {
|
|
75
|
+
background-color: color-mix(in srgb, currentColor 60%, transparent);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@media (prefers-contrast: more) {
|
|
79
|
+
background-color: color-mix(in srgb, currentColor 40%, transparent);
|
|
80
|
+
|
|
81
|
+
&:hover {
|
|
82
|
+
background-color: color-mix(in srgb, currentColor 60%, transparent);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:active {
|
|
86
|
+
background-color: currentColor;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&.horizontal > .adw-scrollbar-trough {
|
|
93
|
+
top: 8px;
|
|
94
|
+
right: 9px;
|
|
95
|
+
bottom: 8px;
|
|
96
|
+
left: 9px;
|
|
97
|
+
|
|
98
|
+
// `&.horizontal > range > trough > slider { min-width: $_slider_min_length }`, as a floor
|
|
99
|
+
// on the computed length rather than a minimum: the element writes the WIDTH, and
|
|
100
|
+
// upstream's `MIN (width, trough_width)` with the slider's own floor in front of it is
|
|
101
|
+
// exactly `max()`.
|
|
102
|
+
> .adw-scrollbar-slider {
|
|
103
|
+
top: 0;
|
|
104
|
+
left: 0;
|
|
105
|
+
height: $_slider_width;
|
|
106
|
+
width: max(var(--adw-scrollbar-size, #{$_slider_min_length}), #{$_slider_min_length});
|
|
107
|
+
transform: translateX(var(--adw-scrollbar-position, 0));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&.vertical > .adw-scrollbar-trough {
|
|
112
|
+
top: 9px;
|
|
113
|
+
right: 8px;
|
|
114
|
+
bottom: 9px;
|
|
115
|
+
left: 8px;
|
|
116
|
+
|
|
117
|
+
// The vertical twin of the rule above — `min-height`, in libadwaita's own words.
|
|
118
|
+
> .adw-scrollbar-slider {
|
|
119
|
+
top: 0;
|
|
120
|
+
left: 0;
|
|
121
|
+
width: $_slider_width;
|
|
122
|
+
height: max(var(--adw-scrollbar-size, #{$_slider_min_length}), #{$_slider_min_length});
|
|
123
|
+
transform: translateY(var(--adw-scrollbar-position, 0));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// `&:disabled { opacity: 0 }` on the slider upstream, which is what an INOPERABLE bar
|
|
128
|
+
// looks like — `gtk_widget_set_sensitive (FALSE)` reaches the slider through the widget.
|
|
129
|
+
// Nothing in GTK makes a scrollbar insensitive on its own, so nothing here sets
|
|
130
|
+
// `disabled` either: the rule stands for an author that writes it, which is what the
|
|
131
|
+
// `[disabled]` selector (and not `:disabled`) is for — a custom element carrying
|
|
132
|
+
// `disabled` is not one the UA's `:disabled` matches.
|
|
133
|
+
&[disabled] {
|
|
134
|
+
pointer-events: none;
|
|
135
|
+
|
|
136
|
+
.adw-scrollbar-slider {
|
|
137
|
+
opacity: 0;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// `> range.fine-tune > trough > slider` — the accent, which upstream paints for a range that
|
|
142
|
+
// is being FINE-TUNED, which in GTK is what `update_zoom_state` turns on: while Shift is
|
|
143
|
+
// held (gtkrange.c:1793-1804).
|
|
144
|
+
&.fine-tune > .adw-scrollbar-trough > .adw-scrollbar-slider {
|
|
145
|
+
&,
|
|
146
|
+
&:hover,
|
|
147
|
+
&:active {
|
|
148
|
+
background-color: color-mix(in srgb, var(--accent-color) 60%, transparent);
|
|
149
|
+
|
|
150
|
+
@media (prefers-contrast: more) {
|
|
151
|
+
background-color: var(--accent-color);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// `.overlay-indicator` — `setup_indicator`'s class, which is what turns GTK's permanent
|
|
157
|
+
// scrollbar into the "narrow, auto-hiding indicator" (`_scrolling.scss:56-118`). It sits
|
|
158
|
+
// OVER the content, so the trough keeps no background and the slider carries an outline to
|
|
159
|
+
// stay legible against whatever is beneath it. The opacity is `indicator_start_fade`'s,
|
|
160
|
+
// driven by `--adw-indicator-opacity` and transitioned over the fade duration.
|
|
161
|
+
&.overlay-indicator {
|
|
162
|
+
z-index: 2;
|
|
163
|
+
background: none;
|
|
164
|
+
box-shadow: none;
|
|
165
|
+
padding: 0;
|
|
166
|
+
opacity: var(--adw-indicator-opacity, 1);
|
|
167
|
+
transition: opacity 1000ms linear;
|
|
168
|
+
|
|
169
|
+
> .adw-scrollbar-trough {
|
|
170
|
+
outline: 1px solid transparent;
|
|
171
|
+
|
|
172
|
+
> .adw-scrollbar-slider {
|
|
173
|
+
outline: 1px solid color-mix(in srgb, var(--scrollbar-outline-color, var(--window-fg-color)) 60%, transparent);
|
|
174
|
+
outline-offset: -8px;
|
|
175
|
+
|
|
176
|
+
@media (prefers-contrast: more) {
|
|
177
|
+
outline: 1px solid var(--scrollbar-outline-color, var(--window-fg-color));
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&:not(.hovering) > .adw-scrollbar-trough > .adw-scrollbar-slider {
|
|
183
|
+
min-width: 3px;
|
|
184
|
+
min-height: 3px;
|
|
185
|
+
outline-color: color-mix(in srgb, var(--scrollbar-outline-color, var(--window-fg-color)) 35%, transparent);
|
|
186
|
+
|
|
187
|
+
@media (prefers-contrast: more) {
|
|
188
|
+
outline-color: color-mix(in srgb, var(--scrollbar-outline-color, var(--window-fg-color)) 60%, transparent);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&.hovering > .adw-scrollbar-trough {
|
|
193
|
+
background-color: color-mix(in srgb, currentColor 10%, transparent);
|
|
194
|
+
|
|
195
|
+
@media (prefers-contrast: more) {
|
|
196
|
+
background-color: color-mix(in srgb, currentColor 25%, transparent);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
&.horizontal {
|
|
201
|
+
> .adw-scrollbar-trough > .adw-scrollbar-slider {
|
|
202
|
+
min-width: $_slider_min_length;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&.hovering > .adw-scrollbar-trough > .adw-scrollbar-slider {
|
|
206
|
+
min-height: $_slider_width;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&:not(.hovering) > .adw-scrollbar-trough {
|
|
210
|
+
margin-top: 4px;
|
|
211
|
+
margin-bottom: 4px;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&.vertical {
|
|
216
|
+
> .adw-scrollbar-trough > .adw-scrollbar-slider {
|
|
217
|
+
min-height: $_slider_min_length;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
&.hovering > .adw-scrollbar-trough > .adw-scrollbar-slider {
|
|
221
|
+
min-width: $_slider_width;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
&:not(.hovering) > .adw-scrollbar-trough {
|
|
225
|
+
margin-left: 4px;
|
|
226
|
+
margin-right: 4px;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|