spry-theme-dwarf.css 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. /*
  2. * Spry CSS theme: "dwarf" — a GNOME libadwaita / Adwaita clone
  3. * ---------------------------------------------------------------------
  4. * Ported from the ARC Adwaita reference (libadwaita's own stylesheet):
  5. * flat 9px buttons with 17px side padding, bold labels and 7%/16%
  6. * currentColor hovers; opaque accent primaries that brighten 10% on
  7. * hover; filled borderless entries (#e6e6e7 / #38383c) with a 2px
  8. * accent focus edge; boxed-row cards (12px radius, shade hairline, no
  9. * shadow); a hairline-outlined progress trough; 46x26 switches; dim
  10. * caption column headers; GTK tab bars (the checked tab is a
  11. * view-surface card bridging the strip's hairline into the panel);
  12. * flat headerbar dialogs with a centred bold title; a link/accent
  13. * split (#0461be / #81d0ff text over the same #3584e4 accent_bg in
  14. * both modes). Shadows appear only on popovers and dialogs. Light +
  15. * dark: the Adwaita dark palette repeats verbatim in the forced-dark
  16. * and auto-dark blocks below.
  17. */
  18. /* Light scope (Adwaita light). -------------------------------------------- */
  19. [data-theme="dwarf"],
  20. html:has(#spry-theme-dwarf:checked) {
  21. color-scheme: light;
  22. /* Palette — libadwaita named colours (adwaita.scss) */
  23. --spry-bg: #fafafb; /* window_bg_color */
  24. --spry-bg-alt: #ebebed; /* sidebar_bg_color band */
  25. --spry-bg-inset: #e6e6e7; /* entry_bg fill: wells, code, disabled */
  26. --spry-surface: #ffffff; /* card / boxed rows */
  27. --spry-surface-hover: #f4f4f5;
  28. --spry-headerbar-bg: #ffffff; /* headerbar_bg_color */
  29. --spry-view-bg: #ffffff; /* view_bg_color: active tab card */
  30. --spry-dialog-bg: #fafafb; /* dialog_bg_color (AdwDialog, not popover white) */
  31. --spry-popover-bg: #ffffff; /* popover_bg_color */
  32. --spry-popover-border: transparent;
  33. --spry-fg: #323237; /* window_fg (opaque equivalent) */
  34. --spry-fg-muted: #5e5c64; /* secondary */
  35. --spry-border: rgb(0 0 6 / 0.12); /* headerbar-shade hairline: visible on light */
  36. --spry-border-strong: transparent; /* filled entries have no edge */
  37. --spry-headerbar-shade: rgb(0 0 6 / 0.12);
  38. --spry-switch-knob: #ffffff; /* slider_color */
  39. --spry-accent: #3584e4; /* accent_bg_color */
  40. --spry-accent-hover: color-mix(in srgb, var(--spry-accent) 90%, #fff);
  41. --spry-accent-fg: #ffffff; /* accent_fg_color */
  42. --spry-accent-soft: color-mix(in srgb, var(--spry-accent) 25%, transparent);
  43. --spry-danger: #c30000; /* destructive_color (text) */
  44. --spry-danger-bg: #e01b24; /* destructive_bg_color */
  45. --spry-danger-fg: #ffffff; /* destructive_fg_color */
  46. --spry-success: #1b8553; /* success_color */
  47. --spry-warning: #9c6e03; /* warning_color */
  48. --spry-info: #2190a4;
  49. --spry-link: #0461be; /* accent_color (text) */
  50. --spry-link-hover: color-mix(in srgb, var(--spry-link) 85%, #000);
  51. --spry-backdrop: rgb(0 0 6 / 0.14); /* dimming 14% */
  52. /* Overlay scrollbars, as GNOME draws them */
  53. scrollbar-width: thin;
  54. scrollbar-color: color-mix(in srgb, var(--spry-fg) 20%, transparent) transparent;
  55. /* Typography — Cantarell / Adwaita Sans, compact GTK metrics */
  56. --spry-font: Cantarell, "Adwaita Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Liberation Sans", Arial, sans-serif;
  57. --spry-font-heading: var(--spry-font);
  58. --spry-font-mono: "Adwaita Mono", "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  59. --spry-font-size: 0.95rem;
  60. --spry-line-height: 1.55;
  61. --spry-heading-weight: 700;
  62. /* Shape, depth, motion — flat controls; radii 9/12/15 like libadwaita */
  63. --spry-radius: 12px;
  64. --spry-radius-sm: 9px;
  65. --spry-radius-lg: 15px;
  66. --spry-radius-pill: 999px;
  67. --spry-border-width: 1px;
  68. --spry-shadow: none;
  69. --spry-shadow-lg: 0 0 0 1px rgb(0 0 0 / 0.05), 0 1px 5px 1px rgb(0 0 0 / 0.09),
  70. 0 2px 14px 3px rgb(0 0 0 / 0.05);
  71. --spry-popover-shadow: var(--spry-shadow-lg);
  72. --spry-glass: none;
  73. --spry-transition: 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  74. /* Dialog motion: the AdwFloatingSheet spring (scale 0.8, damping 0.62 /
  75. stiffness 500, overshoot via linear()) for WINDOWS. Drawers and the
  76. modal backdrop opt out below — they settle without the bounce. */
  77. --spry-dialog-duration: 333ms;
  78. --spry-dialog-ease: linear(0, 0.0195, 0.0714, 0.1464, 0.2365, 0.3348, 0.4359, 0.5353, 0.6296, 0.7165, 0.7944, 0.8625, 0.9203, 0.968, 1.0062, 1.0355, 1.0568, 1.0712, 1.0797, 1.0833, 1.0829, 1.0795, 1.0739, 1.0668, 1.0588, 1.0504, 1.042, 1.0339, 1.0264, 1.0196, 1.0136, 1.0084, 1.0041, 1.0006, 0.9979, 0.9959, 1);
  79. --spry-dialog-close-duration: 128ms;
  80. --spry-dialog-close-ease: linear(0, 0.0148, 0.0549, 0.1141, 0.1868, 0.2684, 0.3547, 0.4422, 0.5284, 0.6108, 0.6881, 0.7588, 0.8225, 0.8785, 0.9268, 0.9677, 1);
  81. --spry-dialog-in: scale(0.8);
  82. /* Drawers slide home smoothly, no bounce */
  83. & :is(.drawer-left, .drawer-right) {
  84. --spry-dialog-duration: 200ms;
  85. --spry-dialog-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  86. --spry-dialog-close-duration: 150ms;
  87. --spry-dialog-close-ease: ease;
  88. }
  89. /* The modal backdrop fades on a plain ease, never the spring */
  90. & dialog::backdrop,
  91. & [popover]::backdrop {
  92. transition-duration: 200ms;
  93. transition-timing-function: ease;
  94. }
  95. & dialog[open]::backdrop,
  96. & :popover-open::backdrop {
  97. transition-duration: 200ms;
  98. transition-timing-function: ease;
  99. }
  100. /* Controls — filled, borderless entries (34px metrics) */
  101. --spry-control-bg: #e6e6e7;
  102. --spry-control-fg: var(--spry-fg);
  103. --spry-control-border: transparent;
  104. --spry-control-radius: var(--spry-radius-sm);
  105. --spry-control-padding-x: 0.55rem;
  106. --spry-control-padding-y: 0.4rem;
  107. --spry-focus-ring: inset 0 0 0 2px var(--spry-accent);
  108. /* Buttons — flat; hover/active are 7%/16% fills of the label colour */
  109. --spry-btn-bg: transparent;
  110. --spry-btn-fg: var(--spry-fg);
  111. --spry-btn-border: transparent;
  112. --spry-btn-bg-hover: color-mix(in srgb, var(--spry-fg) 7%, transparent);
  113. --spry-btn-bg-active: color-mix(in srgb, var(--spry-fg) 16%, transparent);
  114. /* Cards / tables / progress */
  115. --spry-card-bg: var(--spry-surface);
  116. --spry-card-border: rgb(0 0 6 / 0.07);
  117. --spry-card-padding: 0.75rem;
  118. --spry-card-shadow: none;
  119. --spry-table-header-bg: transparent;
  120. --spry-table-hover: color-mix(in srgb, var(--spry-fg) 4%, transparent);
  121. --spry-progress-bg: color-mix(in srgb, var(--spry-fg) 15%, transparent);
  122. --spry-progress-fg: var(--spry-accent);
  123. /* Text selection is a 25% accent wash, as in _colors.scss */
  124. & ::selection { background-color: color-mix(in srgb, var(--spry-accent) 25%, transparent); }
  125. /* Headings modest (title-1..4 scale); labels bold and compact */
  126. & :where(h1, .h1) { font-size: 1.5rem; font-weight: 800; }
  127. & :where(h2, .h2) { font-size: 1.3rem; font-weight: 800; }
  128. & :where(h3, .h3) { font-size: 1.15rem; }
  129. & :where(h4, .h4) { font-size: 1.05rem; }
  130. & :where(h5, .h5) { font-size: 0.95rem; }
  131. & :where(h6, .h6) { font-size: 0.82rem; text-transform: none; letter-spacing: normal; }
  132. & :is(.label, .field .label) { font-weight: 700; font-size: 0.9rem; }
  133. /* Buttons: 9px radius (core's --spry-control-radius) with libadwaita's
  134. 17px side padding and bold labels; :where keeps .btn-sm/.btn-lg (0,2,0)
  135. and the variant classes winning. .btn-lg alone is a pill, as in Adwaita. */
  136. & :where(.btn:not(.btn-link), input[type="submit"], input[type="reset"], input[type="button"]) {
  137. padding-inline: 1.06rem;
  138. font-weight: 700;
  139. }
  140. & :is(.btn, button, input[type="submit"], input[type="reset"], input[type="button"]).btn-lg {
  141. border-radius: var(--spry-radius-pill);
  142. }
  143. /* Opaque primaries darken 20% on press, as GTK's active overlay does */
  144. & .btn-primary:active {
  145. background: color-mix(in srgb, var(--spry-accent) 80%, #000);
  146. border-color: transparent;
  147. }
  148. /* Destructive is a flat destructive-bg fill (10% white hover, 20% black press);
  149. the outline action is a flat accent-coloured button */
  150. & .btn-danger {
  151. background: var(--spry-danger-bg);
  152. border-color: transparent;
  153. color: var(--spry-danger-fg);
  154. }
  155. & .btn-danger:hover {
  156. background: color-mix(in srgb, var(--spry-danger-bg) 90%, #fff);
  157. border-color: transparent;
  158. color: var(--spry-danger-fg);
  159. }
  160. & .btn-danger:active {
  161. background: color-mix(in srgb, var(--spry-danger-bg) 80%, #000);
  162. border-color: transparent;
  163. color: var(--spry-danger-fg);
  164. }
  165. & .btn-outline { background: transparent; border-color: transparent; color: var(--spry-link); }
  166. & .btn-outline:hover {
  167. background: color-mix(in srgb, var(--spry-accent) 10%, transparent);
  168. border-color: transparent;
  169. color: var(--spry-link);
  170. }
  171. & .btn-ghost:hover {
  172. background: color-mix(in srgb, var(--spry-fg) 7%, transparent);
  173. border-color: transparent;
  174. }
  175. /* Topbar as a headerbar: 47px banded bar, shade edge under it, flat bold
  176. nav; the brand reads as a window title (no accent on hover) */
  177. & .topbar {
  178. min-height: 2.938rem;
  179. background: var(--spry-headerbar-bg);
  180. border-bottom-color: var(--spry-headerbar-shade);
  181. }
  182. & .topbar-brand:hover { color: var(--spry-fg); }
  183. & .nav a { border-radius: var(--spry-radius-sm); font-weight: 700; color: var(--spry-fg); }
  184. & .nav a:hover { background: color-mix(in srgb, var(--spry-fg) 7%, transparent); color: var(--spry-fg); }
  185. & .nav a.active { background: color-mix(in srgb, var(--spry-fg) 10%, transparent); color: var(--spry-fg); }
  186. /* GtkDropDown selects are buttons: bold, with a raised hover fill */
  187. & select { font-weight: 700; }
  188. & select:hover { background: color-mix(in srgb, var(--spry-fg) 15%, var(--spry-control-bg)); }
  189. /* Sidebar rows: 36px, rounded, neutral 7% hover; the selected row is a
  190. neutral 10% fill (navigation-sidebars select with a shade, not accent) */
  191. & .menu a { min-height: 2.25rem; padding: 0.4rem 0.75rem; }
  192. & .menu a:hover { background: color-mix(in srgb, var(--spry-fg) 7%, transparent); color: var(--spry-fg); }
  193. & .menu a.active {
  194. background: color-mix(in srgb, var(--spry-fg) 10%, transparent);
  195. color: var(--spry-fg);
  196. border-radius: var(--spry-radius-sm);
  197. }
  198. /* Submenu and popover-menu items keep the neutral 10% menu hover; rows are
  199. 6px and the sheets carry the reference's 6px popover inset */
  200. & :where(.submenu, .popover-menu) { padding: 0.375rem; }
  201. & .submenu a:hover { background: color-mix(in srgb, var(--spry-fg) 10%, transparent); color: var(--spry-fg); }
  202. & .popover-menu a, & .popover-menu button { border-radius: 6px; }
  203. & .popover-menu a:hover, & .popover-menu button:hover {
  204. background: color-mix(in srgb, var(--spry-fg) 10%, transparent);
  205. color: var(--spry-fg);
  206. }
  207. /* kbd keeps an edge even though filled entries have none */
  208. & :where(kbd) {
  209. background: var(--spry-bg-inset);
  210. border-color: color-mix(in srgb, var(--spry-fg) 35%, transparent);
  211. }
  212. /* Switch: 46x26 track, 20px knob with the slider's drop shadow, 15% trough */
  213. & .switch .track {
  214. width: 2.875rem;
  215. height: 1.625rem;
  216. background: color-mix(in srgb, var(--spry-fg) 15%, transparent);
  217. }
  218. & .switch input:not(:checked):hover + .track {
  219. background: color-mix(in srgb, var(--spry-fg) 20%, transparent);
  220. }
  221. & .switch .track::after {
  222. top: 0.1875rem;
  223. width: 1.25rem;
  224. height: 1.25rem;
  225. background: var(--spry-switch-knob);
  226. box-shadow: 0 1px 3px rgb(0 0 6 / 0.2);
  227. }
  228. & .switch input:checked + .track::after { translate: 1.25rem 0; }
  229. /* Spinner: AdwSpinner — libadwaita's faint ring plus a round-capped arc whose
  230. ends ease apart and back together while it turns (the paintable's own
  231. constants and easing), drawn as an animated SVG mask over currentColor at
  232. the core's sizes; dark needs no extra colours */
  233. --spry-spinner-mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cstyle%3ec\
  234. ircle%7bfill:none;stroke:%23000;stroke-width:2;stroke-linecap:round%7dg%7btransform-origin:8px 8px;a\
  235. nimation:t 1.2s linear infinite%7d.a%7banimation:d 1.59s linear infinite%7d@keyframes t%7bto%7btrans\
  236. form:rotate(1turn)%7d%7d@keyframes d%7b0%25%7bstroke-dasharray:0.75 99.25;stroke-dashoffset:-17.5%7d\
  237. 1.25%25%7bstroke-dasharray:0.849 99.151;stroke-dashoffset:-16.938%7d2.5%25%7bstroke-dasharray:1.145 \
  238. 98.855;stroke-dashoffset:-16.375%7d3.75%25%7bstroke-dasharray:1.635 98.365;stroke-dashoffset:-15.812\
  239. %7d5%25%7bstroke-dasharray:2.315 97.685;stroke-dashoffset:-15.25%7d6.25%25%7bstroke-dasharray:3.179 \
  240. 96.821;stroke-dashoffset:-14.688%7d7.5%25%7bstroke-dasharray:4.22 95.78;stroke-dashoffset:-14.125%7d\
  241. 8.75%25%7bstroke-dasharray:5.427 94.57300000000001;stroke-dashoffset:-13.563%7d10%25%7bstroke-dashar\
  242. ray:6.79 93.21;stroke-dashoffset:-13%7d11.25%25%7bstroke-dasharray:8.297 91.703;stroke-dashoffset:-1\
  243. 2.438%7d12.5%25%7bstroke-dasharray:9.934 90.066;stroke-dashoffset:-11.875%7d13.75%25%7bstroke-dashar\
  244. ray:11.687 88.313;stroke-dashoffset:-11.313%7d15%25%7bstroke-dasharray:13.54 86.46000000000001;strok\
  245. e-dashoffset:-10.75%7d16.25%25%7bstroke-dasharray:15.421 84.57900000000001;stroke-dashoffset:-10.244\
  246. %7d17.5%25%7bstroke-dasharray:17.237 82.763;stroke-dashoffset:-9.868%7d18.75%25%7bstroke-dasharray:1\
  247. 8.971 81.029;stroke-dashoffset:-9.622%7d20%25%7bstroke-dasharray:20.607 79.393;stroke-dashoffset:-9.\
  248. 505%7d21.25%25%7bstroke-dasharray:22.129 77.871;stroke-dashoffset:-9.513%7d22.5%25%7bstroke-dasharra\
  249. y:23.522 76.47800000000001;stroke-dashoffset:-9.642%7d23.75%25%7bstroke-dasharray:24.77 75.23;stroke\
  250. -dashoffset:-9.89%7d25%25%7bstroke-dasharray:25.861 74.139;stroke-dashoffset:-10.251%7d26.25%25%7bst\
  251. roke-dasharray:26.782 73.218;stroke-dashoffset:-10.72%7d27.5%25%7bstroke-dasharray:27.521 72.479;str\
  252. oke-dashoffset:-11.29%7d28.75%25%7bstroke-dasharray:28.069 71.931;stroke-dashoffset:-11.955%7d30%25%\
  253. 7bstroke-dasharray:28.416 71.584;stroke-dashoffset:-12.707%7d31.25%25%7bstroke-dasharray:28.557 71.4\
  254. 43;stroke-dashoffset:-13.539%7d32.5%25%7bstroke-dasharray:28.485 71.515;stroke-dashoffset:-14.443%7d\
  255. 33.75%25%7bstroke-dasharray:28.197 71.803;stroke-dashoffset:-15.409%7d35%25%7bstroke-dasharray:27.69\
  256. 72.31;stroke-dashoffset:-16.429%7d36.25%25%7bstroke-dasharray:26.965 73.035;stroke-dashoffset:-17.4\
  257. 93%7d37.5%25%7bstroke-dasharray:26.023 73.977;stroke-dashoffset:-18.592%7d38.75%25%7bstroke-dasharra\
  258. y:24.867 75.133;stroke-dashoffset:-19.715%7d40%25%7bstroke-dasharray:23.503 76.497;stroke-dashoffset\
  259. :-20.853%7d41.25%25%7bstroke-dasharray:21.938 78.062;stroke-dashoffset:-21.995%7d42.5%25%7bstroke-da\
  260. sharray:20.243 79.757;stroke-dashoffset:-23.132%7d43.75%25%7bstroke-dasharray:18.559 81.441;stroke-d\
  261. ashoffset:-24.254%7d45%25%7bstroke-dasharray:16.9 83.1;stroke-dashoffset:-25.35%7d46.25%25%7bstroke-\
  262. dasharray:15.278 84.722;stroke-dashoffset:-26.41%7d47.5%25%7bstroke-dasharray:13.7 86.3;stroke-dasho\
  263. ffset:-27.425%7d48.75%25%7bstroke-dasharray:12.177 87.82300000000001;stroke-dashoffset:-28.386%7d50%\
  264. 25%7bstroke-dasharray:10.717 89.283;stroke-dashoffset:-29.283%7d51.25%25%7bstroke-dasharray:9.33 90.\
  265. 67;stroke-dashoffset:-30.108%7d52.5%25%7bstroke-dasharray:8.023 91.977;stroke-dashoffset:-30.852%7d5\
  266. 3.75%25%7bstroke-dasharray:6.804 93.196;stroke-dashoffset:-31.509%7d55%25%7bstroke-dasharray:5.681 9\
  267. 4.319;stroke-dashoffset:-32.069%7d56.25%25%7bstroke-dasharray:4.659 95.341;stroke-dashoffset:-32.528\
  268. %7d57.5%25%7bstroke-dasharray:3.746 96.254;stroke-dashoffset:-32.879%7d58.75%25%7bstroke-dasharray:2\
  269. .947 97.053;stroke-dashoffset:-33.115%7d60%25%7bstroke-dasharray:2.266 97.734;stroke-dashoffset:-33.\
  270. 234%7d61.25%25%7bstroke-dasharray:1.707 98.293;stroke-dashoffset:-33.23%7d62.5%25%7bstroke-dasharray\
  271. :1.274 98.726;stroke-dashoffset:-33.101%7d63.75%25%7bstroke-dasharray:0.97 99.03;stroke-dashoffset:-\
  272. 32.843%7d65%25%7bstroke-dasharray:0.795 99.205;stroke-dashoffset:-32.455%7d66.25%25%7bstroke-dasharr\
  273. ay:0.75 99.25;stroke-dashoffset:-31.937%7d67.5%25%7bstroke-dasharray:0.75 99.25;stroke-dashoffset:-3\
  274. 1.375%7d68.75%25%7bstroke-dasharray:0.75 99.25;stroke-dashoffset:-30.812%7d70%25%7bstroke-dasharray:\
  275. 0.75 99.25;stroke-dashoffset:-30.25%7d71.25%25%7bstroke-dasharray:0.75 99.25;stroke-dashoffset:-29.6\
  276. 87%7d72.5%25%7bstroke-dasharray:0.75 99.25;stroke-dashoffset:-29.125%7d73.75%25%7bstroke-dasharray:0\
  277. .75 99.25;stroke-dashoffset:-28.562%7d75%25%7bstroke-dasharray:0.75 99.25;stroke-dashoffset:-28%7d76\
  278. .25%25%7bstroke-dasharray:0.75 99.25;stroke-dashoffset:-27.437%7d77.5%25%7bstroke-dasharray:0.75 99.\
  279. 25;stroke-dashoffset:-26.875%7d78.75%25%7bstroke-dasharray:0.75 99.25;stroke-dashoffset:-26.313%7d80\
  280. %25%7bstroke-dasharray:0.75 99.25;stroke-dashoffset:-25.75%7d81.25%25%7bstroke-dasharray:0.75 99.25;\
  281. stroke-dashoffset:-25.187%7d82.5%25%7bstroke-dasharray:0.75 99.25;stroke-dashoffset:-24.625%7d83.75%\
  282. 25%7bstroke-dasharray:0.75 99.25;stroke-dashoffset:-24.062%7d85%25%7bstroke-dasharray:0.75 99.25;str\
  283. oke-dashoffset:-23.5%7d86.25%25%7bstroke-dasharray:0.75 99.25;stroke-dashoffset:-22.938%7d87.5%25%7b\
  284. stroke-dasharray:0.75 99.25;stroke-dashoffset:-22.375%7d88.75%25%7bstroke-dasharray:0.75 99.25;strok\
  285. e-dashoffset:-21.813%7d90%25%7bstroke-dasharray:0.75 99.25;stroke-dashoffset:-21.25%7d91.25%25%7bstr\
  286. oke-dasharray:0.75 99.25;stroke-dashoffset:-20.687%7d92.5%25%7bstroke-dasharray:0.75 99.25;stroke-da\
  287. shoffset:-20.125%7d93.75%25%7bstroke-dasharray:0.75 99.25;stroke-dashoffset:-19.563%7d95%25%7bstroke\
  288. -dasharray:0.75 99.25;stroke-dashoffset:-19%7d96.25%25%7bstroke-dasharray:0.75 99.25;stroke-dashoffs\
  289. et:-18.437%7d97.5%25%7bstroke-dasharray:0.75 99.25;stroke-dashoffset:-17.875%7d98.75%25%7bstroke-das\
  290. harray:0.75 99.25;stroke-dashoffset:-17.313%7d100%25%7bstroke-dasharray:0.75 99.25;stroke-dashoffset\
  291. :-16.75%7d%7d%3c/style%3e%3ccircle cx='8' cy='8' r='7' stroke-opacity='.15'/%3e%3cg%3e%3ccircle clas\
  292. s='a' cx='8' cy='8' r='7' pathLength='100'/%3e%3c/g%3e%3c/svg%3e") center / contain no-repeat;
  293. & .spinner {
  294. border: 0;
  295. background-color: currentColor;
  296. -webkit-mask: var(--spry-spinner-mask);
  297. mask: var(--spry-spinner-mask);
  298. animation: none;
  299. }
  300. /* Progress: the trough carries a hairline outline for definition; the
  301. fill stays the plain accent, and the indeterminate pulse keeps it */
  302. /* Trough hairline as a REAL border: it participates in layout, so the
  303. value fill is sized inside it and can never paint taller than the
  304. track (element-level inset shadows and pseudo rings both leaked) */
  305. & progress {
  306. border: 1px solid var(--spry-border);
  307. border-radius: var(--spry-radius-sm);
  308. }
  309. /* Indeterminate: GTK's pulse is a square-ish block, not the rounded
  310. stadium the core default uses */
  311. & progress:indeterminate {
  312. /* GTK pulse: rounded rectangle, softer than the stadium */
  313. --spry-pulse-cap: 0.25em;
  314. background:
  315. radial-gradient(var(--spry-pulse-cap) var(--spry-pulse-cap) at var(--spry-pulse-cap) 50%, var(--spry-accent) 97%, transparent 100%) 0% 50% / 22% 100% no-repeat,
  316. radial-gradient(var(--spry-pulse-cap) var(--spry-pulse-cap) at calc(100% - var(--spry-pulse-cap)) 50%, var(--spry-accent) 97%, transparent 100%) 0% 50% / 22% 100% no-repeat,
  317. linear-gradient(90deg, transparent 0 var(--spry-pulse-cap), var(--spry-accent) var(--spry-pulse-cap) calc(100% - var(--spry-pulse-cap)), transparent calc(100% - var(--spry-pulse-cap))) 0% 50% / 22% 100% no-repeat,
  318. color-mix(in srgb, var(--spry-fg) 15%, transparent);
  319. animation: spry-pulse 1.4s linear infinite alternate;
  320. }
  321. /* Boxed rows: flat headers/footers on the hairline card; expander rows
  322. hover at 3%, like AdwExpanderRow */
  323. & .card-header, & .card-footer { background: transparent; }
  324. & summary:hover { background: color-mix(in srgb, var(--spry-fg) 3%, transparent); }
  325. /* Alerts are flat tinted boxes: no border, 12px via --spry-radius */
  326. & :where(.alert-danger, .alert-success, .alert-warning, .alert-info) { border-color: transparent; }
  327. & .alert-info { color: #155e70; }
  328. & .alert-success { color: #14683f; }
  329. & .alert-warning { color: #7d5a06; }
  330. & .badge { color: #034f9c; }
  331. & .hero-eyebrow { color: #0461be; }
  332. /* Invalid entries take the destructive focus edge, not a glow */
  333. & .is-invalid:focus { box-shadow: inset 0 0 0 2px var(--spry-danger) !important; }
  334. /* Column headers: dim caption headings, no band; row separators are
  335. the reference's 15% currentColor borders */
  336. & :where(th, td) { border-color: color-mix(in srgb, var(--spry-fg) 15%, transparent); }
  337. & :where(thead th) {
  338. background: transparent;
  339. text-transform: none;
  340. letter-spacing: normal;
  341. font-size: 0.82em;
  342. font-weight: 700;
  343. color: var(--spry-fg-muted);
  344. border-bottom: 1px solid var(--spry-border);
  345. }
  346. /* Tabs: a GTK tab bar — flat sidebar-coloured strip under top-rounded
  347. labels with neutral hovers; the checked label (core's nth-of-type
  348. mechanism, re-scoped so it wins the cascade over the core's
  349. underline) is a view-surface card, bold window-fg text, whose -1px
  350. margin bridges the strip's hairline so it connects to the panel. */
  351. & .tab-list { background: var(--spry-bg-alt); }
  352. & .tab-list label:hover {
  353. background: color-mix(in srgb, var(--spry-fg) 7%, transparent);
  354. color: var(--spry-fg);
  355. }
  356. & .tabs > input:nth-of-type(1):checked ~ .tab-list label:nth-of-type(1),
  357. & .tabs > input:nth-of-type(2):checked ~ .tab-list label:nth-of-type(2),
  358. & .tabs > input:nth-of-type(3):checked ~ .tab-list label:nth-of-type(3),
  359. & .tabs > input:nth-of-type(4):checked ~ .tab-list label:nth-of-type(4),
  360. & .tabs > input:nth-of-type(5):checked ~ .tab-list label:nth-of-type(5),
  361. & .tabs > input:nth-of-type(6):checked ~ .tab-list label:nth-of-type(6) {
  362. color: var(--spry-fg);
  363. font-weight: 700;
  364. background: var(--spry-view-bg);
  365. box-shadow: none;
  366. margin-bottom: -1px;
  367. }
  368. /* Dialogs as AdwDialogs: dialog-bg surface, soft dialog shadow, flat 47px
  369. headerbar with a centred bold title, 24px circular flat close button,
  370. borderless response area whose buttons carry AdwAlertDialog's 12px
  371. radius and 60px min-width */
  372. & :where(dialog) {
  373. background: var(--spry-dialog-bg);
  374. box-shadow:
  375. 0 0 14px 2px rgb(0 0 6 / 0.03),
  376. 0 0 5px 2px rgb(0 0 6 / 0.1),
  377. 0 0 0 1px rgb(0 0 0 / 0.05);
  378. }
  379. & .dialog-titlebar {
  380. min-height: 2.938rem;
  381. background: transparent;
  382. border-bottom-color: transparent;
  383. }
  384. & .dialog-title { font-weight: 700; text-align: center; }
  385. & .dialog-close {
  386. width: 1.5rem;
  387. height: 1.5rem;
  388. padding: 0;
  389. border-radius: 50%;
  390. background: color-mix(in srgb, var(--spry-fg) 10%, transparent);
  391. color: var(--spry-fg);
  392. }
  393. & .dialog-close:hover {
  394. background: color-mix(in srgb, var(--spry-fg) 15%, transparent);
  395. color: var(--spry-fg);
  396. }
  397. & .dialog-footer {
  398. gap: 0.75rem;
  399. padding: 0.75rem;
  400. background: transparent;
  401. border-top-color: transparent;
  402. }
  403. & .dialog-footer :is(.btn, button) { min-width: 3.75rem; border-radius: var(--spry-radius); }
  404. /* Drawers are sidebar panes: the sidebar band, not the popover white */
  405. & :is(.drawer-left, .drawer-right) { background: var(--spry-bg-alt); }
  406. /* Hero: a flat welcome page — window bg with a soft accent glow */
  407. & .hero {
  408. background:
  409. radial-gradient(60rem 24rem at 50% -8rem, var(--spry-accent-soft), transparent 70%),
  410. var(--spry-bg);
  411. border-block-color: transparent;
  412. }
  413. & .hero-title { font-weight: 800; }
  414. /* Avatars: the GNOME user-menu blue gradient with its pale-blue label */
  415. & .avatar { background: linear-gradient(#83b6ec, #337fdc); color: #cfe1f5; font-weight: 700; }
  416. /* OTP fields are large entries: the 12px large-entry radius */
  417. & .otp input { border-radius: var(--spry-radius); }
  418. /* Pagination: flat page buttons, neutral hovers, the current page a
  419. 10% fill with a bold label (no accent block) */
  420. & .pagination a:hover {
  421. background: color-mix(in srgb, var(--spry-fg) 7%, transparent);
  422. color: var(--spry-fg);
  423. }
  424. & .pagination [aria-current="page"] {
  425. background: color-mix(in srgb, var(--spry-fg) 10%, transparent);
  426. color: var(--spry-fg);
  427. font-weight: 700;
  428. }
  429. }
  430. /* Forced dark (Adwaita dark). --------------------------------------------- */
  431. [data-theme="dwarf"][data-mode="dark"],
  432. html:has(#spry-theme-dwarf:checked):has(#spry-mode-dark:checked),
  433. [data-theme="dwarf"]:has(#spry-mode-dark:checked) {
  434. color-scheme: dark;
  435. /* Light-on-dark counterparts of the light scope's text fixes */
  436. & .badge { color: #81d0ff; }
  437. & .hero-eyebrow { color: #81d0ff; }
  438. & .alert-info { color: #8fd8ea; }
  439. /* Palette — libadwaita named colours (adwaita-dark.scss) */
  440. --spry-bg: #222226; /* window_bg_color */
  441. --spry-bg-alt: #2e2e32; /* sidebar / headerbar band */
  442. --spry-bg-inset: #38383c; /* entry_bg fill */
  443. --spry-surface: #343437; /* card (opaque equivalent) */
  444. --spry-surface-hover: #3a3a3f;
  445. --spry-headerbar-bg: #2e2e32;
  446. --spry-view-bg: #1d1d20; /* view_bg_color */
  447. --spry-dialog-bg: #36363a; /* dialog_bg_color */
  448. --spry-popover-bg: #36363a; /* popover_bg_color */
  449. --spry-popover-border: rgb(255 255 255 / 0.07);
  450. --spry-fg: #ffffff;
  451. --spry-fg-muted: rgb(255 255 255 / 0.55); /* dim labels: fg at 55% */
  452. --spry-border: rgb(0 0 6 / 0.36);
  453. --spry-headerbar-shade: rgb(0 0 6 / 0.36);
  454. --spry-switch-knob: #d2d2d3; /* white 80% over the view bg */
  455. --spry-accent: #3584e4;
  456. --spry-accent-fg: #ffffff;
  457. --spry-danger: #ff938c; /* destructive_color */
  458. --spry-danger-bg: #c01c28; /* destructive_bg_color */
  459. --spry-danger-fg: #ffffff;
  460. --spry-success: #78e9ab; /* success_color */
  461. --spry-warning: #ffc252; /* warning_color */
  462. --spry-info: #2190a4;
  463. --spry-link: #81d0ff; /* accent_color */
  464. --spry-link-hover: color-mix(in srgb, var(--spry-link) 85%, #fff);
  465. --spry-backdrop: rgb(0 0 6 / 0.5); /* dimming 50% */
  466. --spry-shadow-lg: 0 0 0 1px rgb(0 0 0 / 0.4), 0 1px 5px 1px rgb(0 0 0 / 0.35),
  467. 0 2px 14px 3px rgb(0 0 0 / 0.25);
  468. --spry-control-bg: #38383c;
  469. --spry-card-bg: var(--spry-surface);
  470. --spry-card-border: rgb(0 0 6 / 0.36);
  471. }
  472. /* Auto dark (system preference unless overridden). ------------------------ */
  473. @media (prefers-color-scheme: dark) {
  474. [data-theme="dwarf"]:not([data-mode="light"]):not(:has(#spry-mode-light:checked)),
  475. html:has(#spry-theme-dwarf:checked):has(#spry-mode-auto:checked) {
  476. color-scheme: dark;
  477. & .badge { color: #81d0ff; }
  478. & .hero-eyebrow { color: #81d0ff; }
  479. & .alert-info { color: #8fd8ea; }
  480. /* Palette — libadwaita named colours (adwaita-dark.scss) */
  481. --spry-bg: #222226; /* window_bg_color */
  482. --spry-bg-alt: #2e2e32; /* sidebar / headerbar band */
  483. --spry-bg-inset: #38383c; /* entry_bg fill */
  484. --spry-surface: #343437; /* card (opaque equivalent) */
  485. --spry-surface-hover: #3a3a3f;
  486. --spry-headerbar-bg: #2e2e32;
  487. --spry-view-bg: #1d1d20; /* view_bg_color */
  488. --spry-dialog-bg: #36363a; /* dialog_bg_color */
  489. --spry-popover-bg: #36363a; /* popover_bg_color */
  490. --spry-popover-border: rgb(255 255 255 / 0.07);
  491. --spry-fg: #ffffff;
  492. --spry-fg-muted: rgb(255 255 255 / 0.55); /* dim labels: fg at 55% */
  493. --spry-border: rgb(0 0 6 / 0.36);
  494. --spry-headerbar-shade: rgb(0 0 6 / 0.36);
  495. --spry-switch-knob: #d2d2d3; /* white 80% over the view bg */
  496. --spry-accent: #3584e4;
  497. --spry-accent-fg: #ffffff;
  498. --spry-danger: #ff938c; /* destructive_color */
  499. --spry-danger-bg: #c01c28; /* destructive_bg_color */
  500. --spry-danger-fg: #ffffff;
  501. --spry-success: #78e9ab; /* success_color */
  502. --spry-warning: #ffc252; /* warning_color */
  503. --spry-info: #2190a4;
  504. --spry-link: #81d0ff; /* accent_color */
  505. --spry-link-hover: color-mix(in srgb, var(--spry-link) 85%, #fff);
  506. --spry-backdrop: rgb(0 0 6 / 0.5); /* dimming 50% */
  507. --spry-shadow-lg: 0 0 0 1px rgb(0 0 0 / 0.4), 0 1px 5px 1px rgb(0 0 0 / 0.35),
  508. 0 2px 14px 3px rgb(0 0 0 / 0.25);
  509. --spry-control-bg: #38383c;
  510. --spry-card-bg: var(--spry-surface);
  511. --spry-card-border: rgb(0 0 6 / 0.36);
  512. }
  513. }