plass-ui 1.7.0 → 1.8.1

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 (335) hide show
  1. package/CHANGELOG.md +229 -0
  2. package/README.md +3 -3
  3. package/dist/components/accordion/PlAccordion.d.ts +11 -4
  4. package/dist/components/accordion/PlAccordion.js +1 -1
  5. package/dist/components/alert/PlAlert.d.ts +2 -0
  6. package/dist/components/alert/PlAlert.js +1 -1
  7. package/dist/components/anchor/PlAnchor.js +1 -1
  8. package/dist/components/animate-appear/PlAnimateAppear.js +1 -1
  9. package/dist/components/animate-counter/PlAnimateCounter.d.ts +5 -2
  10. package/dist/components/animate-counter/PlAnimateCounter.js +1 -1
  11. package/dist/components/animate-float/PlAnimateFloat.js +1 -1
  12. package/dist/components/animate-headline/PlAnimateHeadline.js +1 -1
  13. package/dist/components/animate-lighting/PlAnimateLighting.js +1 -1
  14. package/dist/components/animate-marquee/PlAnimateMarquee.js +1 -1
  15. package/dist/components/animate-scramble/PlAnimateScramble.js +1 -1
  16. package/dist/components/animate-shake/PlAnimateShake.js +1 -1
  17. package/dist/components/animate-split/PlAnimateSplit.js +1 -1
  18. package/dist/components/animate-typing/PlAnimateTyping.js +1 -1
  19. package/dist/components/app-logo/PlAppLogo.d.ts +51 -15
  20. package/dist/components/area-chart/PlAreaChart.js +1 -1
  21. package/dist/components/avatar/PlAvatar.js +1 -1
  22. package/dist/components/badge/PlBadge.d.ts +2 -0
  23. package/dist/components/bar-chart/PlBarChart.js +1 -1
  24. package/dist/components/blockquote/PlBlockquote.d.ts +2 -0
  25. package/dist/components/bottom-navigation/PlBottomNavigation.d.ts +17 -5
  26. package/dist/components/bottom-navigation/PlBottomNavigation.js +1 -1
  27. package/dist/components/box/PlBox.d.ts +2 -0
  28. package/dist/components/breadcrumb/PlBreadcrumb.d.ts +16 -3
  29. package/dist/components/breadcrumb/PlBreadcrumb.js +1 -1
  30. package/dist/components/button/PlButton.d.ts +2 -0
  31. package/dist/components/button/PlButton.js +1 -1
  32. package/dist/components/button-group/PlButtonGroup.d.ts +2 -0
  33. package/dist/components/calendar/PlCalendar.js +1 -1
  34. package/dist/components/card/PlCard.d.ts +4 -1
  35. package/dist/components/card/PlCard.js +1 -1
  36. package/dist/components/carousel/PlCarousel.d.ts +2 -0
  37. package/dist/components/carousel/PlCarousel.js +1 -1
  38. package/dist/components/checkbox/PlCheckbox.js +1 -1
  39. package/dist/components/chip/PlChip.d.ts +2 -0
  40. package/dist/components/chip/PlChip.js +1 -1
  41. package/dist/components/code-block/PlCodeBlock.js +1 -1
  42. package/dist/components/collapsible/PlCollapsible.d.ts +2 -0
  43. package/dist/components/collapsible/PlCollapsible.js +1 -1
  44. package/dist/components/color-picker/PlColorPicker.d.ts +2 -0
  45. package/dist/components/color-picker/PlColorPicker.js +1 -1
  46. package/dist/components/combobox/PlCombobox.d.ts +3 -1
  47. package/dist/components/combobox/PlCombobox.js +1 -1
  48. package/dist/components/command-palette/PlCommandPalette.js +1 -1
  49. package/dist/components/confirm/PlConfirmProvider.js +1 -1
  50. package/dist/components/data-table/PlDataTable.d.ts +2 -0
  51. package/dist/components/data-table/PlDataTable.js +1 -1
  52. package/dist/components/date-picker/PlDatePicker.js +1 -1
  53. package/dist/components/date-range-picker/PlDateRangePicker.js +1 -1
  54. package/dist/components/date-time-picker/PlDateTimePicker.js +1 -1
  55. package/dist/components/drawer/PlDrawer.d.ts +27 -2
  56. package/dist/components/drawer/PlDrawer.js +1 -1
  57. package/dist/components/empty/PlEmpty.d.ts +4 -1
  58. package/dist/components/empty/PlEmpty.js +1 -1
  59. package/dist/components/file-picker/PlFilePicker.d.ts +31 -0
  60. package/dist/components/file-picker/PlFilePicker.js +1 -1
  61. package/dist/components/file-picker/index.d.ts +1 -1
  62. package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.d.ts +10 -0
  63. package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.js +1 -1
  64. package/dist/components/footer/PlFooter.js +1 -1
  65. package/dist/components/gallery/PlGallery.js +1 -1
  66. package/dist/components/gauge-chart/PlGaugeChart.d.ts +11 -2
  67. package/dist/components/gauge-chart/PlGaugeChart.js +1 -1
  68. package/dist/components/header/PlHeader.js +1 -1
  69. package/dist/components/heatmap-chart/PlHeatmapChart.d.ts +1 -1
  70. package/dist/components/heatmap-chart/PlHeatmapChart.js +1 -1
  71. package/dist/components/hot-keys/PlHotKeys.d.ts +4 -0
  72. package/dist/components/image/PlImage.js +1 -1
  73. package/dist/components/image/PlImagePreview.d.ts +3 -2
  74. package/dist/components/list/PlList.d.ts +18 -5
  75. package/dist/components/list/PlList.js +1 -1
  76. package/dist/components/menu/PlMenu.d.ts +19 -7
  77. package/dist/components/menu/PlMenu.js +1 -1
  78. package/dist/components/menubar/PlMenubar.js +1 -1
  79. package/dist/components/meter/PlMeter.js +1 -1
  80. package/dist/components/mockup/PlMockup.d.ts +4 -3
  81. package/dist/components/mockup/PlMockup.js +1 -1
  82. package/dist/components/modal/PlModal.js +1 -1
  83. package/dist/components/navigation-menu/PlNavigationMenu.d.ts +52 -8
  84. package/dist/components/navigation-menu/PlNavigationMenu.js +1 -1
  85. package/dist/components/number-field/PlNumberField.d.ts +3 -1
  86. package/dist/components/number-field/PlNumberField.js +1 -1
  87. package/dist/components/otp-field/PlOtpField.d.ts +2 -0
  88. package/dist/components/otp-field/PlOtpField.js +1 -1
  89. package/dist/components/overlay/PlOverlay.js +1 -1
  90. package/dist/components/page-layout/PlPageLayout.js +1 -1
  91. package/dist/components/pagination/PlPagination.d.ts +2 -0
  92. package/dist/components/panes/PlPanes.d.ts +4 -1
  93. package/dist/components/panes/PlPanes.js +1 -1
  94. package/dist/components/pie-chart/PlPieChart.d.ts +1 -1
  95. package/dist/components/pie-chart/PlPieChart.js +1 -1
  96. package/dist/components/pill/PlPill.d.ts +2 -0
  97. package/dist/components/pill/PlPill.js +1 -1
  98. package/dist/components/popover/PlPopover.js +1 -1
  99. package/dist/components/progress-box/PlProgressBox.js +1 -1
  100. package/dist/components/progress-circular/PlProgressCircular.d.ts +11 -1
  101. package/dist/components/progress-circular/PlProgressCircular.js +1 -1
  102. package/dist/components/progress-linear/PlProgressLinear.js +1 -1
  103. package/dist/components/radio-group/PlRadioGroup.js +1 -1
  104. package/dist/components/scatter-chart/PlScatterChart.js +1 -1
  105. package/dist/components/scroll-zone/PlScrollZone.d.ts +2 -0
  106. package/dist/components/scroll-zone/PlScrollZone.js +1 -1
  107. package/dist/components/segmented-button/PlSegmentedButton.d.ts +6 -1
  108. package/dist/components/segmented-button/PlSegmentedButton.js +1 -1
  109. package/dist/components/select/PlSelect.d.ts +2 -0
  110. package/dist/components/select/PlSelect.js +1 -1
  111. package/dist/components/sidebar/PlSidebar.d.ts +12 -0
  112. package/dist/components/sidebar/PlSidebar.js +1 -1
  113. package/dist/components/sidebar/PlSidebarTrigger.d.ts +2 -0
  114. package/dist/components/slider/PlSlider.d.ts +2 -1
  115. package/dist/components/slider/PlSlider.js +1 -1
  116. package/dist/components/sparkline/PlSparkline.d.ts +15 -3
  117. package/dist/components/sparkline/PlSparkline.js +1 -1
  118. package/dist/components/stepper/PlStepper.d.ts +11 -0
  119. package/dist/components/stepper/PlStepper.js +1 -1
  120. package/dist/components/switch/PlSwitch.js +1 -1
  121. package/dist/components/table/PlTable.d.ts +2 -0
  122. package/dist/components/tabs/PlTabs.js +1 -1
  123. package/dist/components/text-field/PlTextField.d.ts +2 -0
  124. package/dist/components/text-field/PlTextField.js +1 -1
  125. package/dist/components/text-link/PlTextLink.js +1 -1
  126. package/dist/components/time-picker/PlTimePicker.js +1 -1
  127. package/dist/components/timeline-chart/PlTimelineChart.js +1 -1
  128. package/dist/components/toast/PlToast.d.ts +2 -0
  129. package/dist/components/toast/PlToast.js +1 -1
  130. package/dist/components/toggle/PlToggle.js +1 -1
  131. package/dist/components/toolbar/PlToolbar.d.ts +2 -0
  132. package/dist/components/tour/PlTour.js +1 -1
  133. package/dist/components/transfer/PlTransfer.d.ts +2 -0
  134. package/dist/components/transfer/PlTransfer.js +1 -1
  135. package/dist/components/tree/PlTree.d.ts +12 -0
  136. package/dist/components/tree/PlTree.js +1 -1
  137. package/dist/components/tree-select/PlTreeSelect.js +1 -1
  138. package/dist/components/typography/PlTypography.d.ts +20 -7
  139. package/dist/components/typography/PlTypography.js +1 -1
  140. package/dist/components/visually-hidden/PlVisuallyHidden.d.ts +12 -3
  141. package/dist/components/visually-hidden/PlVisuallyHidden.js +1 -1
  142. package/dist/components/window-pane/PlWindowPane.d.ts +3 -0
  143. package/dist/components/window-pane/PlWindowPane.js +1 -1
  144. package/dist/css/accordion.css +4 -0
  145. package/dist/css/alert.css +5 -0
  146. package/dist/css/anchor.css +6 -0
  147. package/dist/css/animate-appear.css +3 -0
  148. package/dist/css/animate-blink.css +3 -0
  149. package/dist/css/animate-counter.css +4 -0
  150. package/dist/css/animate-fade.css +3 -0
  151. package/dist/css/animate-float.css +3 -0
  152. package/dist/css/animate-grow.css +3 -0
  153. package/dist/css/animate-headline.css +3 -0
  154. package/dist/css/animate-lighting.css +4 -0
  155. package/dist/css/animate-marquee.css +4 -0
  156. package/dist/css/animate-reveal.css +3 -0
  157. package/dist/css/animate-rotate.css +3 -0
  158. package/dist/css/animate-scramble.css +5 -0
  159. package/dist/css/animate-shake.css +3 -0
  160. package/dist/css/animate-slide.css +3 -0
  161. package/dist/css/animate-split.css +4 -0
  162. package/dist/css/animate-typing.css +4 -0
  163. package/dist/css/animate-zoom.css +3 -0
  164. package/dist/css/app-logo.css +2 -0
  165. package/dist/css/area-chart.css +12 -0
  166. package/dist/css/aspect-ratio.css +2 -0
  167. package/dist/css/avatar.css +2 -0
  168. package/dist/css/back-top.css +11 -0
  169. package/dist/css/badge.css +2 -0
  170. package/dist/css/bar-chart.css +10 -0
  171. package/dist/css/base.css +2 -3
  172. package/dist/css/blockquote.css +2 -0
  173. package/dist/css/bottom-navigation.css +4 -0
  174. package/dist/css/box.css +2 -0
  175. package/dist/css/breadcrumb.css +6 -0
  176. package/dist/css/button-group.css +2 -0
  177. package/dist/css/button.css +7 -0
  178. package/dist/css/calendar.css +17 -0
  179. package/dist/css/card.css +2 -0
  180. package/dist/css/carousel.css +10 -0
  181. package/dist/css/chat-bubble.css +6 -0
  182. package/dist/css/checkbox.css +3 -0
  183. package/dist/css/chip.css +8 -0
  184. package/dist/css/code-block.css +6 -0
  185. package/dist/css/collapsible.css +3 -0
  186. package/dist/css/color-picker.css +17 -0
  187. package/dist/css/combobox.css +10 -0
  188. package/dist/css/command-palette.css +7 -0
  189. package/dist/css/confirm.css +9 -0
  190. package/dist/css/container.css +5 -0
  191. package/dist/css/data-list.css +2 -0
  192. package/dist/css/data-table.css +15 -0
  193. package/dist/css/date-picker.css +16 -0
  194. package/dist/css/date-range-picker.css +16 -0
  195. package/dist/css/date-time-picker.css +16 -0
  196. package/dist/css/divider.css +2 -0
  197. package/dist/css/drawer.css +6 -0
  198. package/dist/css/empty.css +2 -0
  199. package/dist/css/fieldset.css +2 -0
  200. package/dist/css/file-picker.css +8 -0
  201. package/dist/css/flex.css +5 -0
  202. package/dist/css/floating-action-button.css +7 -0
  203. package/dist/css/floating-bottom-navigation.css +5 -0
  204. package/dist/css/footer.css +6 -0
  205. package/dist/css/form.css +2 -0
  206. package/dist/css/gallery.css +15 -0
  207. package/dist/css/gauge-chart.css +11 -0
  208. package/dist/css/grid.css +5 -0
  209. package/dist/css/header.css +6 -0
  210. package/dist/css/heatmap-chart.css +10 -0
  211. package/dist/css/highlight.css +2 -0
  212. package/dist/css/hot-keys.css +3 -0
  213. package/dist/css/hover-card.css +9 -0
  214. package/dist/css/how-to-steps.css +3 -0
  215. package/dist/css/icon-button.css +7 -0
  216. package/dist/css/icon.css +1 -0
  217. package/dist/css/image.css +7 -0
  218. package/dist/css/line-chart.css +12 -0
  219. package/dist/css/list.css +2 -0
  220. package/dist/css/menu.css +5 -0
  221. package/dist/css/menubar.css +5 -0
  222. package/dist/css/meter.css +6 -0
  223. package/dist/css/mockup.css +4 -0
  224. package/dist/css/modal.css +5 -0
  225. package/dist/css/navigation-menu.css +4 -0
  226. package/dist/css/number-field.css +10 -0
  227. package/dist/css/otp-field.css +6 -0
  228. package/dist/css/overlay.css +4 -0
  229. package/dist/css/page-layout.css +7 -0
  230. package/dist/css/pagination.css +8 -0
  231. package/dist/css/panes.css +7 -0
  232. package/dist/css/pie-chart.css +10 -0
  233. package/dist/css/pill.css +4 -0
  234. package/dist/css/popconfirm.css +12 -0
  235. package/dist/css/popover.css +11 -0
  236. package/dist/css/portal.css +1 -0
  237. package/dist/css/progress-box.css +5 -0
  238. package/dist/css/progress-circular.css +5 -0
  239. package/dist/css/progress-linear.css +5 -0
  240. package/dist/css/radio-group.css +3 -0
  241. package/dist/css/rating.css +6 -0
  242. package/dist/css/scatter-chart.css +10 -0
  243. package/dist/css/scroll-area.css +2 -0
  244. package/dist/css/scroll-zone.css +15 -0
  245. package/dist/css/segmented-button.css +5 -0
  246. package/dist/css/select.css +9 -0
  247. package/dist/css/show.css +1 -0
  248. package/dist/css/sidebar.css +16 -0
  249. package/dist/css/skeleton.css +2 -0
  250. package/dist/css/slider.css +3 -0
  251. package/dist/css/sparkline.css +10 -0
  252. package/dist/css/spoiler.css +10 -0
  253. package/dist/css/stack.css +5 -0
  254. package/dist/css/stat.css +2 -0
  255. package/dist/css/stepper.css +8 -0
  256. package/dist/css/switch.css +3 -0
  257. package/dist/css/table.css +3 -0
  258. package/dist/css/tabs.css +7 -0
  259. package/dist/css/text-field.css +8 -0
  260. package/dist/css/text-link.css +6 -0
  261. package/dist/css/time-picker.css +16 -0
  262. package/dist/css/timeline-chart.css +10 -0
  263. package/dist/css/timeline.css +6 -0
  264. package/dist/css/toast.css +5 -0
  265. package/dist/css/toggle.css +5 -0
  266. package/dist/css/toolbar.css +2 -0
  267. package/dist/css/tooltip.css +9 -0
  268. package/dist/css/tour.css +10 -0
  269. package/dist/css/transfer.css +13 -0
  270. package/dist/css/tree-select.css +14 -0
  271. package/dist/css/tree.css +3 -0
  272. package/dist/css/visually-hidden.css +2 -0
  273. package/dist/css/window-pane.css +9 -0
  274. package/dist/internal/animate.d.ts +59 -4
  275. package/dist/internal/animate.js +1 -1
  276. package/dist/internal/bottom-bar.js +1 -1
  277. package/dist/internal/calendar.js +1 -1
  278. package/dist/internal/chart-frame.d.ts +132 -11
  279. package/dist/internal/chart-frame.js +1 -1
  280. package/dist/internal/commit-change.d.ts +38 -0
  281. package/dist/internal/commit-change.js +1 -0
  282. package/dist/internal/data-table.d.ts +2 -2
  283. package/dist/internal/data-table.js +1 -1
  284. package/dist/internal/date.d.ts +9 -0
  285. package/dist/internal/date.js +1 -1
  286. package/dist/internal/defaults.d.ts +34 -1
  287. package/dist/internal/defaults.js +1 -1
  288. package/dist/internal/direction.d.ts +8 -2
  289. package/dist/internal/direction.js +1 -1
  290. package/dist/internal/form.d.ts +43 -0
  291. package/dist/internal/form.js +1 -1
  292. package/dist/internal/format.d.ts +4 -1
  293. package/dist/internal/format.js +1 -1
  294. package/dist/internal/gallery.d.ts +28 -0
  295. package/dist/internal/gallery.js +1 -1
  296. package/dist/internal/glow.d.ts +7 -2
  297. package/dist/internal/glow.js +1 -1
  298. package/dist/internal/heading.d.ts +11 -0
  299. package/dist/internal/heading.js +1 -0
  300. package/dist/internal/highlight.d.ts +4 -2
  301. package/dist/internal/highlight.js +1 -1
  302. package/dist/internal/labels.d.ts +5 -0
  303. package/dist/internal/labels.js +1 -1
  304. package/dist/internal/layout-box.d.ts +35 -0
  305. package/dist/internal/layout-box.js +1 -0
  306. package/dist/internal/lazy.d.ts +37 -0
  307. package/dist/internal/lazy.js +1 -0
  308. package/dist/internal/media.d.ts +6 -0
  309. package/dist/internal/media.js +1 -1
  310. package/dist/internal/page-layout.d.ts +24 -13
  311. package/dist/internal/page-layout.js +1 -1
  312. package/dist/internal/picker.d.ts +1 -1
  313. package/dist/internal/picker.js +1 -1
  314. package/dist/internal/progress.d.ts +24 -0
  315. package/dist/internal/progress.js +1 -1
  316. package/dist/internal/search.d.ts +12 -0
  317. package/dist/internal/search.js +1 -1
  318. package/dist/internal/sizer.d.ts +15 -8
  319. package/dist/internal/sizer.js +1 -1
  320. package/dist/internal/styles.d.ts +22 -6
  321. package/dist/internal/styles.js +1 -1
  322. package/dist/internal/wheel.d.ts +13 -1
  323. package/dist/internal/wheel.js +1 -1
  324. package/dist/internal/window.js +1 -1
  325. package/dist/locales/de.js +1 -1
  326. package/dist/locales/es.js +1 -1
  327. package/dist/locales/fr.js +1 -1
  328. package/dist/locales/ja.js +1 -1
  329. package/dist/locales/ko.js +1 -1
  330. package/dist/locales/zh-Hans.js +1 -1
  331. package/dist/styles.css +1 -1
  332. package/dist/tailwind.css +758 -40
  333. package/dist/tokens.css +758 -40
  334. package/dist/types.d.ts +14 -2
  335. package/package.json +19 -18
package/dist/tokens.css CHANGED
@@ -55,8 +55,11 @@
55
55
  * glass around it, and the `accent` — the one value that has to be *read* off a
56
56
  * surface rather than looked at.
57
57
  *
58
- * Three values are hand-picked per family and everything else is derived with
59
- * `color-mix()`. Adding a family is still five places, though: one entry in
58
+ * Three values are hand-picked per family here, and an `accent` in each theme
59
+ * block below. Everything else is derived from those: `-fill` is a
60
+ * `linear-gradient()` between the two ends, `-tint`, `-soft` and `-line` are a
61
+ * `color-mix()` of `solid` or `accent` with `transparent`, and `-ring` is
62
+ * `accent` itself. Adding a family is still five places, though: one entry in
60
63
  * `PlassColor`, those three lines here, an `accent` in each of the three theme
61
64
  * blocks below, the eight derived declarations, which are written out per
62
65
  * family rather than generated, and the Flutter package's own enum and
@@ -198,6 +201,239 @@
198
201
  --plass-bottom-navigation-height: 0px;
199
202
  }
200
203
 
204
+ /* ---------------------------------------------------------------------------
205
+ * The room a pinned header takes in a page layout
206
+ *
207
+ * A `PlHeader` with `position="fixed"` is out of the flow, so a `PlPageLayout`
208
+ * pads its content down by the header's height and starts its sidebars there.
209
+ * A `sticky` one across the whole width is in the flow, but it stays across
210
+ * the top of the window, so the sidebars under it start below it and are that
211
+ * much shorter. The layout measures the height and writes it on its root — but
212
+ * only once JavaScript runs, so the HTML a server sends would be drawn with
213
+ * the content under a fixed header, or with the sidebars under a sticky one as
214
+ * tall as the whole window, which pushes a short page's footer a header's
215
+ * height down. Both would move a moment later, when the page hydrates.
216
+ *
217
+ * These rules give that first paint the same room out of what the stylesheet
218
+ * already knows: the header's floor for its `size`, which is the ladder of
219
+ * `barMinHeightClasses` in `PlHeader.tsx` spelled in the same `--spacing`, and
220
+ * the hairlines along its top and bottom edges. A header whose content is
221
+ * taller than its floor is still measured, and the measurement is an inline
222
+ * style on the same root, so it replaces all of this the moment it is written.
223
+ *
224
+ * Two paths for a fixed header, because it is the layout's own child or, with
225
+ * `headerSpan="content"`, its content column's. A sticky header counts only as
226
+ * the layout's own child: in the content column it sits beside the sidebars
227
+ * rather than over them. A `PlHeader` any deeper is one the page drew rather
228
+ * than the layout's.
229
+ *
230
+ * Every layout starts from zero rather than from what it inherits, so a layout
231
+ * inside another one's page does not take the outer header's room as its own.
232
+ * ------------------------------------------------------------------------- */
233
+
234
+ .plass-layout {
235
+ --p-layout-header: 0px;
236
+ --p-layout-header-inset: 0px;
237
+ --p-layout-header-floor: 0px;
238
+ --p-layout-header-rule: 0px;
239
+ }
240
+
241
+ .plass-layout:has(> .plass-header-fixed, > div > div > .plass-header-fixed) {
242
+ --p-layout-header: calc(var(--p-layout-header-floor) + var(--p-layout-header-rule));
243
+ --p-layout-header-inset: var(--p-layout-header);
244
+ }
245
+
246
+ .plass-layout:has(> .plass-header-sticky) {
247
+ --p-layout-header: calc(var(--p-layout-header-floor) + var(--p-layout-header-rule));
248
+ }
249
+
250
+ .plass-layout:has(
251
+ > .plass-header-fixed[data-size='xs'],
252
+ > div > div > .plass-header-fixed[data-size='xs'],
253
+ > .plass-header-sticky[data-size='xs']
254
+ ) {
255
+ --p-layout-header-floor: calc(var(--spacing, 0.25rem) * 10);
256
+ }
257
+
258
+ .plass-layout:has(
259
+ > .plass-header-fixed[data-size='sm'],
260
+ > div > div > .plass-header-fixed[data-size='sm'],
261
+ > .plass-header-sticky[data-size='sm']
262
+ ) {
263
+ --p-layout-header-floor: calc(var(--spacing, 0.25rem) * 12);
264
+ }
265
+
266
+ .plass-layout:has(
267
+ > .plass-header-fixed[data-size='md'],
268
+ > div > div > .plass-header-fixed[data-size='md'],
269
+ > .plass-header-sticky[data-size='md']
270
+ ) {
271
+ --p-layout-header-floor: calc(var(--spacing, 0.25rem) * 16);
272
+ }
273
+
274
+ .plass-layout:has(
275
+ > .plass-header-fixed[data-size='lg'],
276
+ > div > div > .plass-header-fixed[data-size='lg'],
277
+ > .plass-header-sticky[data-size='lg']
278
+ ) {
279
+ --p-layout-header-floor: calc(var(--spacing, 0.25rem) * 20);
280
+ }
281
+
282
+ .plass-layout:has(
283
+ > .plass-header-fixed[data-size='xl'],
284
+ > div > div > .plass-header-fixed[data-size='xl'],
285
+ > .plass-header-sticky[data-size='xl']
286
+ ) {
287
+ --p-layout-header-floor: calc(var(--spacing, 0.25rem) * 24);
288
+ }
289
+
290
+ /* The divider is a line along the bottom; a glass sheet has an edge all round,
291
+ which the divider only colours. Later, so the glass wins where both match. */
292
+ .plass-layout:has(
293
+ > .plass-header-fixed[data-divider],
294
+ > div > div > .plass-header-fixed[data-divider],
295
+ > .plass-header-sticky[data-divider]
296
+ ) {
297
+ --p-layout-header-rule: 1px;
298
+ }
299
+
300
+ .plass-layout:has(
301
+ > .plass-header-fixed[data-variant='glass'],
302
+ > div > div > .plass-header-fixed[data-variant='glass'],
303
+ > .plass-header-sticky[data-variant='glass']
304
+ ) {
305
+ --p-layout-header-rule: 2px;
306
+ }
307
+
308
+ /* ---------------------------------------------------------------------------
309
+ * The room a pinned footer takes in a page layout
310
+ *
311
+ * The same arrangement at the other end, with one difference: a `PlFooter`
312
+ * has no height floor. What the stylesheet knows of its height is the air
313
+ * above and below its content, which is `sheetPaddingYClasses` in
314
+ * `internal/styles.ts` for its `size` and `density` spelled in the same
315
+ * `--spacing`, and the hairlines along its edges. The content is the caller's,
316
+ * and only the layout's measurement knows how tall it is, so a server's first
317
+ * paint reserves the air and the edges and the measurement adds the rest.
318
+ *
319
+ * The two paths of a fixed footer, the one path of a sticky footer that spans
320
+ * the full width, and the start from zero are the header's, for its reasons.
321
+ * ------------------------------------------------------------------------- */
322
+
323
+ .plass-layout {
324
+ --p-layout-footer: 0px;
325
+ --p-layout-footer-inset: 0px;
326
+ --p-layout-footer-floor: 0px;
327
+ --p-layout-footer-rule: 0px;
328
+ }
329
+
330
+ .plass-layout:has(> .plass-footer-fixed, > div > div > .plass-footer-fixed) {
331
+ --p-layout-footer: calc(var(--p-layout-footer-floor) + var(--p-layout-footer-rule));
332
+ --p-layout-footer-inset: var(--p-layout-footer);
333
+ }
334
+
335
+ .plass-layout:has(> .plass-footer-sticky) {
336
+ --p-layout-footer: calc(var(--p-layout-footer-floor) + var(--p-layout-footer-rule));
337
+ }
338
+
339
+ .plass-layout:has(
340
+ > .plass-footer-fixed[data-size='xs'][data-density='default'],
341
+ > div > div > .plass-footer-fixed[data-size='xs'][data-density='default'],
342
+ > .plass-footer-sticky[data-size='xs'][data-density='default']
343
+ ) {
344
+ --p-layout-footer-floor: calc(var(--spacing, 0.25rem) * 5);
345
+ }
346
+
347
+ .plass-layout:has(
348
+ > .plass-footer-fixed[data-size='sm'][data-density='default'],
349
+ > div > div > .plass-footer-fixed[data-size='sm'][data-density='default'],
350
+ > .plass-footer-sticky[data-size='sm'][data-density='default']
351
+ ) {
352
+ --p-layout-footer-floor: calc(var(--spacing, 0.25rem) * 7);
353
+ }
354
+
355
+ .plass-layout:has(
356
+ > .plass-footer-fixed[data-size='md'][data-density='default'],
357
+ > div > div > .plass-footer-fixed[data-size='md'][data-density='default'],
358
+ > .plass-footer-sticky[data-size='md'][data-density='default']
359
+ ) {
360
+ --p-layout-footer-floor: calc(var(--spacing, 0.25rem) * 10);
361
+ }
362
+
363
+ .plass-layout:has(
364
+ > .plass-footer-fixed[data-size='lg'][data-density='default'],
365
+ > div > div > .plass-footer-fixed[data-size='lg'][data-density='default'],
366
+ > .plass-footer-sticky[data-size='lg'][data-density='default']
367
+ ) {
368
+ --p-layout-footer-floor: calc(var(--spacing, 0.25rem) * 12);
369
+ }
370
+
371
+ .plass-layout:has(
372
+ > .plass-footer-fixed[data-size='xl'][data-density='default'],
373
+ > div > div > .plass-footer-fixed[data-size='xl'][data-density='default'],
374
+ > .plass-footer-sticky[data-size='xl'][data-density='default']
375
+ ) {
376
+ --p-layout-footer-floor: calc(var(--spacing, 0.25rem) * 14);
377
+ }
378
+
379
+ .plass-layout:has(
380
+ > .plass-footer-fixed[data-size='xs'][data-density='compact'],
381
+ > div > div > .plass-footer-fixed[data-size='xs'][data-density='compact'],
382
+ > .plass-footer-sticky[data-size='xs'][data-density='compact']
383
+ ) {
384
+ --p-layout-footer-floor: calc(var(--spacing, 0.25rem) * 4);
385
+ }
386
+
387
+ .plass-layout:has(
388
+ > .plass-footer-fixed[data-size='sm'][data-density='compact'],
389
+ > div > div > .plass-footer-fixed[data-size='sm'][data-density='compact'],
390
+ > .plass-footer-sticky[data-size='sm'][data-density='compact']
391
+ ) {
392
+ --p-layout-footer-floor: calc(var(--spacing, 0.25rem) * 5);
393
+ }
394
+
395
+ .plass-layout:has(
396
+ > .plass-footer-fixed[data-size='md'][data-density='compact'],
397
+ > div > div > .plass-footer-fixed[data-size='md'][data-density='compact'],
398
+ > .plass-footer-sticky[data-size='md'][data-density='compact']
399
+ ) {
400
+ --p-layout-footer-floor: calc(var(--spacing, 0.25rem) * 7);
401
+ }
402
+
403
+ .plass-layout:has(
404
+ > .plass-footer-fixed[data-size='lg'][data-density='compact'],
405
+ > div > div > .plass-footer-fixed[data-size='lg'][data-density='compact'],
406
+ > .plass-footer-sticky[data-size='lg'][data-density='compact']
407
+ ) {
408
+ --p-layout-footer-floor: calc(var(--spacing, 0.25rem) * 8);
409
+ }
410
+
411
+ .plass-layout:has(
412
+ > .plass-footer-fixed[data-size='xl'][data-density='compact'],
413
+ > div > div > .plass-footer-fixed[data-size='xl'][data-density='compact'],
414
+ > .plass-footer-sticky[data-size='xl'][data-density='compact']
415
+ ) {
416
+ --p-layout-footer-floor: calc(var(--spacing, 0.25rem) * 10);
417
+ }
418
+
419
+ /* The divider is a line along the top; the glass wins where both match, as
420
+ on the header. */
421
+ .plass-layout:has(
422
+ > .plass-footer-fixed[data-divider],
423
+ > div > div > .plass-footer-fixed[data-divider],
424
+ > .plass-footer-sticky[data-divider]
425
+ ) {
426
+ --p-layout-footer-rule: 1px;
427
+ }
428
+
429
+ .plass-layout:has(
430
+ > .plass-footer-fixed[data-variant='glass'],
431
+ > div > div > .plass-footer-fixed[data-variant='glass'],
432
+ > .plass-footer-sticky[data-variant='glass']
433
+ ) {
434
+ --p-layout-footer-rule: 2px;
435
+ }
436
+
201
437
  /* ---------------------------------------------------------------------------
202
438
  * Light theme (default)
203
439
  *
@@ -319,8 +555,10 @@
319
555
  --plass-shadow-ambient: rgb(20 40 90 / 0.1);
320
556
  --plass-tint-strength: 35%;
321
557
 
322
- /* The scrim behind a modal surface. */
558
+ /* The scrim behind a modal surface, and the blur it lays over the page. The
559
+ blur is the same in every theme, so it is written here only. */
323
560
  --plass-scrim: rgb(16 24 40 / 0.4);
561
+ --plass-scrim-blur: blur(2px);
324
562
 
325
563
  /* Corner radius: roughly 30% of the control height, and roughly constant in
326
564
  feel across the ladder — a Plass corner is a moulded fillet, not a pill and
@@ -448,7 +686,10 @@
448
686
 
449
687
  --plass-surface: #141b30;
450
688
  --plass-fg: #e7eaf3;
451
- --plass-muted-fg: #99a2ba;
689
+ /* Light enough to clear 4.5:1 on the densest step of the glass, which is
690
+ lighter than the sheet: a modal or a select's list over an opaque sheet
691
+ is the hardest place muted text is read. */
692
+ --plass-muted-fg: #a0a9bf;
452
693
  --plass-border: rgb(255 255 255 / 0.12);
453
694
 
454
695
  --plass-bg-from: #111731;
@@ -527,7 +768,7 @@
527
768
 
528
769
  --plass-surface: #141b30;
529
770
  --plass-fg: #e7eaf3;
530
- --plass-muted-fg: #99a2ba;
771
+ --plass-muted-fg: #a0a9bf;
531
772
  --plass-border: rgb(255 255 255 / 0.12);
532
773
 
533
774
  --plass-bg-from: #111731;
@@ -597,11 +838,79 @@
597
838
  --plass-chart-div-on-5: var(--plass-fg);
598
839
  }
599
840
 
841
+ /* ---------------------------------------------------------------------------
842
+ * Reduced transparency
843
+ *
844
+ * A reader who has asked their system for less transparency gets every sheet
845
+ * opaque. The blur goes, and each rung of the glass ladder is laid over the
846
+ * theme's own `--plass-surface` instead of over the page: the same white at the
847
+ * same strength, with the opaque sheet behind it where the page used to be.
848
+ * That is the pair of layers a pinned table header already stacks so that rows
849
+ * do not show through it, and it keeps the ladder: an engaged sheet still holds
850
+ * more light than one at rest, except on a white surface, which has no lighter
851
+ * step to take.
852
+ *
853
+ * Only the fill and the blur move. The hairline, the light along the top edge,
854
+ * the shadows and the focus ring are drawn exactly as before, so a sheet keeps
855
+ * its edge and its place above the page.
856
+ *
857
+ * The scrim behind a modal, a drawer, a command palette or a tour, and an
858
+ * overlay's `scrim` tone, loses its blur too and keeps its dim, which is what
859
+ * tells the reader the page behind has stopped being reachable. Its blur is the same in every theme, so the
860
+ * first block alone turns it off, and every element inherits that.
861
+ *
862
+ * It is done here, on the tokens, rather than on the components, because the
863
+ * sheets in the library paint with these four: a new component that draws glass
864
+ * the house way is opaque for this reader without having to know that this
865
+ * block exists. The two that blur a translucency of their own, `PlOverlay`'s
866
+ * `glass` tone and a `PlWindowPane`, answer the same reader in their own
867
+ * classes.
868
+ *
869
+ * Three blocks for the three theme blocks above, each with the selector of the
870
+ * one it overrides, because the strengths are per theme and a rule only takes
871
+ * over from one at least as specific as itself. The forced dark block stays
872
+ * last, for the reason it is last up there. The surface is the first colour in
873
+ * each mix because the compiler writes that one out as the fallback for a
874
+ * browser with no `color-mix()`, and the opaque surface is the right one.
875
+ * ------------------------------------------------------------------------- */
876
+
877
+ @media (prefers-reduced-transparency: reduce) {
878
+ :root,
879
+ .light,
880
+ [data-theme='light'] {
881
+ --plass-glass: color-mix(in srgb, var(--plass-surface), rgb(255 255 255) 62%);
882
+ --plass-glass-hover: color-mix(in srgb, var(--plass-surface), rgb(255 255 255) 76%);
883
+ --plass-glass-press: color-mix(in srgb, var(--plass-surface), rgb(255 255 255) 88%);
884
+ --plass-blur: none;
885
+ --plass-scrim-blur: none;
886
+ }
887
+ }
888
+
889
+ @media (prefers-reduced-transparency: reduce) and (prefers-color-scheme: dark) {
890
+ :root:not(.light):not([data-theme='light']) {
891
+ --plass-glass: color-mix(in srgb, var(--plass-surface), rgb(255 255 255) 7%);
892
+ --plass-glass-hover: color-mix(in srgb, var(--plass-surface), rgb(255 255 255) 11%);
893
+ --plass-glass-press: color-mix(in srgb, var(--plass-surface), rgb(255 255 255) 15%);
894
+ --plass-blur: none;
895
+ }
896
+ }
897
+
898
+ @media (prefers-reduced-transparency: reduce) {
899
+ .dark,
900
+ [data-theme='dark'] {
901
+ --plass-glass: color-mix(in srgb, var(--plass-surface), rgb(255 255 255) 7%);
902
+ --plass-glass-hover: color-mix(in srgb, var(--plass-surface), rgb(255 255 255) 11%);
903
+ --plass-glass-press: color-mix(in srgb, var(--plass-surface), rgb(255 255 255) 15%);
904
+ --plass-blur: none;
905
+ }
906
+ }
907
+
600
908
  /* ---------------------------------------------------------------------------
601
909
  * Derived tokens
602
910
  *
603
- * Gradients, glows, tints, hairlines and focus rings are all one base colour at
604
- * different strengths, so they are computed rather than hand-picked per theme.
911
+ * A family's gradient, tint, soft fills, hairlines and focus ring are computed
912
+ * from its hand-picked values rather than picked per theme: the gradient from
913
+ * the two ends, the tint from `solid`, and the rest from `accent`.
605
914
  *
606
915
  * **This block is repeated for every theme root**, because a custom property
607
916
  * resolves its `var()`s on the element that declares it — declaring these only
@@ -612,8 +921,9 @@
612
921
  * `--plass-primary-solid` on a `<div>` changes the base and nothing else,
613
922
  * because every value derived from it was computed further up, where the old
614
923
  * colour still is. The class re-runs the whole block on that element, so the
615
- * gradient, the tint, the hairline and the ring follow the base that was just
616
- * written beside them. It is the one hook here that does not force a theme:
924
+ * gradient and the tint follow the ends that were just written beside them,
925
+ * and the soft fills, the hairline and the ring follow an `accent` written
926
+ * there too. It is the one hook here that does not force a theme:
617
927
  * `--plass-tint-strength` and the rest inherit from whichever theme root is
618
928
  * above, so a scoped family works the same in light and in dark.
619
929
  * ------------------------------------------------------------------------- */
@@ -790,6 +1100,25 @@
790
1100
  margin: 0;
791
1101
  }
792
1102
 
1103
+ /* ---------------------------------------------------------------------------
1104
+ * Struts
1105
+ *
1106
+ * An empty line in the type of the element that carries the class, for lining
1107
+ * something up by a line of text it does not hold: a card's `headerAction` is
1108
+ * centred with one so that its middle meets the middle of the title's first
1109
+ * line. A zero-width space is the least a line box needs, and as generated
1110
+ * content it never reaches the element's `textContent`.
1111
+ *
1112
+ * In CSS rather than in Tailwind because the character is an escape: a
1113
+ * `content-[…]` utility holding it matches its rule only while every tool
1114
+ * between the source and the `dist/` a project's Tailwind scans keeps the
1115
+ * backslash as written.
1116
+ * ------------------------------------------------------------------------- */
1117
+
1118
+ .plass-strut::before {
1119
+ content: '\200b';
1120
+ }
1121
+
793
1122
  /* ---------------------------------------------------------------------------
794
1123
  * Links
795
1124
  *
@@ -1044,28 +1373,56 @@
1044
1373
  * Two rules hold across all three. **Nothing changes the paint.** A Plass fill is a gradient and
1045
1374
  * a gradient cannot be interpolated, so what moves is a length or an opacity and
1046
1375
  * the fill itself is either there or not. And **the segment travels on
1047
- * `inset-inline-start`**, not on a `transform` — the same trade the skeleton's
1048
- * highlight makes, and for the same two reasons: it runs the other way under RTL
1049
- * without being told, and the layout pass it costs is confined to a box with
1050
- * nothing in it.
1376
+ * `translate`**, never on an inset: an inset lays the box out again on every
1377
+ * frame, and the browser records each of those frames as a layout shift, which
1378
+ * a page loading behind an indicator pays for in its CLS for as long as it
1379
+ * loads. The skeleton's highlight travels the same way.
1380
+ *
1381
+ * The segment rests at the inline start and a percentage `translate` resolves
1382
+ * against its own width, so the keyframes are the old path divided by 45%: one
1383
+ * whole width out before the start, to the end of the groove, which is 1 / 0.45
1384
+ * of its width away. There is no logical `translate`, so the sign is turned
1385
+ * round under RTL by hand, the way the marquee's is (see `.plass-marquee-track`
1386
+ * for why it is written twice).
1051
1387
  * ------------------------------------------------------------------------- */
1052
1388
 
1053
1389
  @keyframes plass-progress-sweep {
1054
1390
  from {
1055
- inset-inline-start: -45%;
1391
+ translate: calc(-100% * var(--p-anim-along, 1)) 0;
1056
1392
  }
1057
1393
  to {
1058
- inset-inline-start: 100%;
1394
+ translate: calc(100% / 0.45 * var(--p-anim-along, 1)) 0;
1059
1395
  }
1060
1396
  }
1061
1397
 
1062
1398
  .plass-progress-sweep {
1063
1399
  position: absolute;
1064
1400
  inset-block: 0;
1401
+ inset-inline-start: 0;
1065
1402
  inline-size: 45%;
1066
1403
  animation: plass-progress-sweep 1.15s var(--plass-ease) infinite;
1067
1404
  }
1068
1405
 
1406
+ .plass-progress-sweep:dir(rtl) {
1407
+ --p-anim-along: -1;
1408
+ }
1409
+
1410
+ .plass-progress-sweep:dir(ltr) {
1411
+ --p-anim-along: 1;
1412
+ }
1413
+
1414
+ /* The attribute, for a browser without `:dir()`; see `.plass-marquee-track` for
1415
+ why the selectors are written this way and how deep they reach. */
1416
+ @supports not selector(:dir(rtl)) {
1417
+ [dir='rtl'] .plass-progress-sweep {
1418
+ --p-anim-along: -1;
1419
+ }
1420
+
1421
+ [dir='rtl'] [dir='ltr'] .plass-progress-sweep {
1422
+ --p-anim-along: 1;
1423
+ }
1424
+ }
1425
+
1069
1426
  /* The one place the library turns something, and the exception is the same one
1070
1427
  the spinner already has: an indeterminate indicator that holds still says the
1071
1428
  opposite of what it is for. `rotate` rather than `transform`, so nothing else
@@ -1122,10 +1479,17 @@
1122
1479
  /* ---------------------------------------------------------------------------
1123
1480
  * The travelling highlight on a placeholder
1124
1481
  *
1125
- * `inset-inline-start` rather than a `transform`, which is the same trade the
1126
- * rest of the library makes and for the same two reasons: it runs the other way
1127
- * under RTL without being told, and the layout pass it costs is confined to a
1128
- * box with nothing in it.
1482
+ * It travels on `translate`, as the progress segment does and for the same
1483
+ * reason: an inset would lay the highlight out again on every frame and record
1484
+ * a layout shift each time, for as long as the page is waiting. The highlight
1485
+ * rests at the left edge and is 60% of the box, so its path of -60% to 100% of
1486
+ * the box is -100% to 100% / 0.6 of its own width.
1487
+ *
1488
+ * The left edge, and not the inline start, on purpose: this is a light
1489
+ * crossing a surface rather than something read along a line, so it runs left
1490
+ * to right in every writing direction, as the Flutter build's does. Its
1491
+ * keyframes leave `--p-anim-along` out for the same reason, so a placeholder
1492
+ * inside a right-to-left marquee does not inherit the turn.
1129
1493
  *
1130
1494
  * A pseudo-element rather than a child, so a `PlSkeleton` is one element per
1131
1495
  * shape and a stack of ten lines is ten nodes rather than twenty. The gradient
@@ -1137,10 +1501,10 @@
1137
1501
 
1138
1502
  @keyframes plass-skeleton-sweep {
1139
1503
  from {
1140
- inset-inline-start: -60%;
1504
+ translate: -100% 0;
1141
1505
  }
1142
1506
  to {
1143
- inset-inline-start: 100%;
1507
+ translate: calc(100% / 0.6) 0;
1144
1508
  }
1145
1509
  }
1146
1510
 
@@ -1148,6 +1512,7 @@
1148
1512
  content: '';
1149
1513
  position: absolute;
1150
1514
  inset-block: 0;
1515
+ left: 0;
1151
1516
  inline-size: 60%;
1152
1517
  background-image: linear-gradient(90deg, transparent, var(--p-soft-press), transparent);
1153
1518
  animation: plass-skeleton-sweep 1.5s var(--plass-ease) infinite;
@@ -1542,6 +1907,81 @@
1542
1907
  inherits: false;
1543
1908
  }
1544
1909
 
1910
+ @property --p-lane-rows-xs {
1911
+ syntax: '*';
1912
+ inherits: false;
1913
+ }
1914
+
1915
+ @property --p-lane-rows-sm {
1916
+ syntax: '*';
1917
+ inherits: false;
1918
+ }
1919
+
1920
+ @property --p-lane-rows-md {
1921
+ syntax: '*';
1922
+ inherits: false;
1923
+ }
1924
+
1925
+ @property --p-lane-rows-lg {
1926
+ syntax: '*';
1927
+ inherits: false;
1928
+ }
1929
+
1930
+ @property --p-lane-rows-xl {
1931
+ syntax: '*';
1932
+ inherits: false;
1933
+ }
1934
+
1935
+ @property --p-lane-area-xs {
1936
+ syntax: '*';
1937
+ inherits: false;
1938
+ }
1939
+
1940
+ @property --p-lane-area-sm {
1941
+ syntax: '*';
1942
+ inherits: false;
1943
+ }
1944
+
1945
+ @property --p-lane-area-md {
1946
+ syntax: '*';
1947
+ inherits: false;
1948
+ }
1949
+
1950
+ @property --p-lane-area-lg {
1951
+ syntax: '*';
1952
+ inherits: false;
1953
+ }
1954
+
1955
+ @property --p-lane-area-xl {
1956
+ syntax: '*';
1957
+ inherits: false;
1958
+ }
1959
+
1960
+ @property --p-lane-span-xs {
1961
+ syntax: '*';
1962
+ inherits: false;
1963
+ }
1964
+
1965
+ @property --p-lane-span-sm {
1966
+ syntax: '*';
1967
+ inherits: false;
1968
+ }
1969
+
1970
+ @property --p-lane-span-md {
1971
+ syntax: '*';
1972
+ inherits: false;
1973
+ }
1974
+
1975
+ @property --p-lane-span-lg {
1976
+ syntax: '*';
1977
+ inherits: false;
1978
+ }
1979
+
1980
+ @property --p-lane-span-xl {
1981
+ syntax: '*';
1982
+ inherits: false;
1983
+ }
1984
+
1545
1985
  .plass-grid,
1546
1986
  .plass-flex {
1547
1987
  --p-gap-x: var(--p-gap-x-xs, 0px);
@@ -1556,6 +1996,21 @@
1556
1996
  --p-cols: var(--p-cols-xs, 2);
1557
1997
  }
1558
1998
 
1999
+ /*
2000
+ * A masonry's deal at the width the window is: the list's rows, and each
2001
+ * tile's place in them and how many it spans. The span is read by the tile's
2002
+ * button, picture and caption as well, so it is the one of the three that
2003
+ * inherits.
2004
+ */
2005
+ .plass-gallery-masonry {
2006
+ --p-lane-rows: var(--p-lane-rows-xs, none);
2007
+ }
2008
+
2009
+ .plass-gallery-masonry > li {
2010
+ --p-lane-area: var(--p-lane-area-xs, auto);
2011
+ --p-lane-span: var(--p-lane-span-xs, 1);
2012
+ }
2013
+
1559
2014
  /*
1560
2015
  * `PlFlex`'s axis. One slot rather than two, because `reverse` is not
1561
2016
  * responsive and the direction is: the component folds the two into the four
@@ -1620,6 +2075,15 @@
1620
2075
  --p-cols: var(--p-cols-sm, var(--p-cols-xs, 2));
1621
2076
  }
1622
2077
 
2078
+ .plass-gallery-masonry {
2079
+ --p-lane-rows: var(--p-lane-rows-sm, var(--p-lane-rows-xs, none));
2080
+ }
2081
+
2082
+ .plass-gallery-masonry > li {
2083
+ --p-lane-area: var(--p-lane-area-sm, var(--p-lane-area-xs, auto));
2084
+ --p-lane-span: var(--p-lane-span-sm, var(--p-lane-span-xs, 1));
2085
+ }
2086
+
1623
2087
  .plass-flex {
1624
2088
  --p-dir: var(--p-dir-sm, var(--p-dir-xs, row));
1625
2089
  }
@@ -1649,6 +2113,15 @@
1649
2113
  --p-cols: var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 2)));
1650
2114
  }
1651
2115
 
2116
+ .plass-gallery-masonry {
2117
+ --p-lane-rows: var(--p-lane-rows-md, var(--p-lane-rows-sm, var(--p-lane-rows-xs, none)));
2118
+ }
2119
+
2120
+ .plass-gallery-masonry > li {
2121
+ --p-lane-area: var(--p-lane-area-md, var(--p-lane-area-sm, var(--p-lane-area-xs, auto)));
2122
+ --p-lane-span: var(--p-lane-span-md, var(--p-lane-span-sm, var(--p-lane-span-xs, 1)));
2123
+ }
2124
+
1652
2125
  .plass-flex {
1653
2126
  --p-dir: var(--p-dir-md, var(--p-dir-sm, var(--p-dir-xs, row)));
1654
2127
  }
@@ -1678,6 +2151,24 @@
1678
2151
  --p-cols: var(--p-cols-lg, var(--p-cols-md, var(--p-cols-sm, var(--p-cols-xs, 2))));
1679
2152
  }
1680
2153
 
2154
+ .plass-gallery-masonry {
2155
+ --p-lane-rows: var(
2156
+ --p-lane-rows-lg,
2157
+ var(--p-lane-rows-md, var(--p-lane-rows-sm, var(--p-lane-rows-xs, none)))
2158
+ );
2159
+ }
2160
+
2161
+ .plass-gallery-masonry > li {
2162
+ --p-lane-area: var(
2163
+ --p-lane-area-lg,
2164
+ var(--p-lane-area-md, var(--p-lane-area-sm, var(--p-lane-area-xs, auto)))
2165
+ );
2166
+ --p-lane-span: var(
2167
+ --p-lane-span-lg,
2168
+ var(--p-lane-span-md, var(--p-lane-span-sm, var(--p-lane-span-xs, 1)))
2169
+ );
2170
+ }
2171
+
1681
2172
  .plass-flex {
1682
2173
  --p-dir: var(--p-dir-lg, var(--p-dir-md, var(--p-dir-sm, var(--p-dir-xs, row))));
1683
2174
  }
@@ -1725,6 +2216,30 @@
1725
2216
  );
1726
2217
  }
1727
2218
 
2219
+ .plass-gallery-masonry {
2220
+ --p-lane-rows: var(
2221
+ --p-lane-rows-xl,
2222
+ var(
2223
+ --p-lane-rows-lg,
2224
+ var(--p-lane-rows-md, var(--p-lane-rows-sm, var(--p-lane-rows-xs, none)))
2225
+ )
2226
+ );
2227
+ }
2228
+
2229
+ .plass-gallery-masonry > li {
2230
+ --p-lane-area: var(
2231
+ --p-lane-area-xl,
2232
+ var(
2233
+ --p-lane-area-lg,
2234
+ var(--p-lane-area-md, var(--p-lane-area-sm, var(--p-lane-area-xs, auto)))
2235
+ )
2236
+ );
2237
+ --p-lane-span: var(
2238
+ --p-lane-span-xl,
2239
+ var(--p-lane-span-lg, var(--p-lane-span-md, var(--p-lane-span-sm, var(--p-lane-span-xs, 1))))
2240
+ );
2241
+ }
2242
+
1728
2243
  .plass-flex {
1729
2244
  --p-dir: var(
1730
2245
  --p-dir-xl,
@@ -1773,7 +2288,7 @@
1773
2288
 
1774
2289
  .plass-anim {
1775
2290
  animation-duration: var(--p-anim-duration, 300ms);
1776
- animation-delay: var(--p-anim-delay, 0ms);
2291
+ animation-delay: var(--p-anim-run-delay, var(--p-anim-delay, 0ms));
1777
2292
  animation-timing-function: var(--p-anim-ease, var(--plass-ease));
1778
2293
  animation-iteration-count: var(--p-anim-repeat, 1);
1779
2294
  animation-direction: var(--p-anim-direction, normal);
@@ -1781,6 +2296,57 @@
1781
2296
  animation-play-state: var(--p-anim-state, running);
1782
2297
  }
1783
2298
 
2299
+ /*
2300
+ * The delay a run started with, kept until the next run.
2301
+ *
2302
+ * A new `animation-delay` applies to an animation that is already running, so
2303
+ * a `delay` changed while a run was under way sent it back to waiting: a fade
2304
+ * with a delay of 300ms given 1000ms at 400ms went back to nothing and waited
2305
+ * again. `src/internal/animate.ts` writes the delay into `--p-anim-run-delay`
2306
+ * as the run starts and takes it off when the next one does, so a new delay is
2307
+ * waited out from the next run on. A run still waiting has nothing written, and
2308
+ * a new delay is measured from when its wait began.
2309
+ *
2310
+ * Every element that reads it is reset here, because a custom property is
2311
+ * inherited and an effect nested inside a running one has a delay of its own.
2312
+ * The value written inline on an element outranks the reset. The arc of a
2313
+ * `PlAnimateLighting` is a pseudo-element, and takes its root's.
2314
+ */
2315
+ .plass-anim,
2316
+ .plass-marquee-track,
2317
+ .plass-anim-lighting {
2318
+ --p-anim-run-delay: initial;
2319
+ }
2320
+
2321
+ /*
2322
+ * Every effect's slots are its own.
2323
+ *
2324
+ * An effect writes inline only the slots it has a value for, and a custom
2325
+ * property is inherited, so a slot it left out was whatever an effect around
2326
+ * it had written: a fade inside an endless linear turn eased linearly, took
2327
+ * the turn's one pass under reduced motion, and inside a `timeline="view"`
2328
+ * effect followed the scroll. Each element an effect writes its slots on
2329
+ * starts them over here, and what it writes inline outranks this. The strips
2330
+ * of a marquee and the lines of a headline read their root's, which is why
2331
+ * they are not on the list.
2332
+ */
2333
+ .plass-anim,
2334
+ .plass-anim-lighting,
2335
+ .plass-marquee,
2336
+ .plass-headline {
2337
+ --p-anim-still-repeat: initial;
2338
+ --p-anim-ease: initial;
2339
+ --p-anim-timeline: initial;
2340
+ --p-anim-range: initial;
2341
+ --p-anim-opacity: initial;
2342
+ --p-anim-scale: initial;
2343
+ --p-anim-x: initial;
2344
+ --p-anim-y: initial;
2345
+ --p-anim-angle: initial;
2346
+ --p-anim-angle-to: initial;
2347
+ --p-anim-clip: initial;
2348
+ }
2349
+
1784
2350
  /*
1785
2351
  * `timeline="view"`, and the whole of it.
1786
2352
  *
@@ -2028,7 +2594,7 @@
2028
2594
  filter: blur(var(--p-anim-glow-blur, 5px));
2029
2595
  animation-name: plass-anim-lighting;
2030
2596
  animation-duration: var(--p-anim-duration, 3s);
2031
- animation-delay: var(--p-anim-delay, 0ms);
2597
+ animation-delay: var(--p-anim-run-delay, var(--p-anim-delay, 0ms));
2032
2598
  /* Linear unless a caller says otherwise, which is what `curve` does in the
2033
2599
  Flutter build: an arc that eases at both ends of a turn that has no ends
2034
2600
  reads as a stutter, and that is a default rather than a rule. */
@@ -2101,7 +2667,7 @@
2101
2667
  gap: var(--p-anim-gap, 0px);
2102
2668
  animation-name: plass-anim-marquee-x;
2103
2669
  animation-duration: var(--p-anim-duration, 12s);
2104
- animation-delay: var(--p-anim-delay, 0ms);
2670
+ animation-delay: var(--p-anim-run-delay, var(--p-anim-delay, 0ms));
2105
2671
  /* Linear unless a caller insists otherwise. An eased marquee slows at both
2106
2672
  ends of a loop that has no ends, which reads as the page stuttering. */
2107
2673
  animation-timing-function: var(--p-anim-ease, linear);
@@ -2111,7 +2677,14 @@
2111
2677
  animation-play-state: var(--p-anim-state, running);
2112
2678
  }
2113
2679
 
2114
- .plass-marquee-vertical .plass-marquee-track {
2680
+ /* `:where()` keeps this as specific as `.plass-marquee-track` on its own, so
2681
+ the reduced-motion block below switches a vertical strip off as it does a
2682
+ horizontal one. Written more specifically, the name outranked that block's
2683
+ `animation: none`, so the first copy ran a pass in no time under the setting
2684
+ and went on from its own clock afterwards, while the second, not drawn until
2685
+ then, started afresh and ran behind it. The track is the strip's own child,
2686
+ so a strip running across inside one running down keeps its own way. */
2687
+ :where(.plass-marquee-vertical) > .plass-marquee-track {
2115
2688
  flex-direction: column;
2116
2689
  animation-name: plass-anim-marquee-y;
2117
2690
  }
@@ -2123,15 +2696,43 @@
2123
2696
  *
2124
2697
  * There is no logical `translate`, so the sign is flipped by hand. The flex
2125
2698
  * track has already reversed on its own, which is what puts the overflow on the
2126
- * other side for the translate to bring in. Written against the attribute as
2127
- * well as `:dir()` because `:dir()` is newer than the rest of this sheet's
2128
- * floor; the two agree on every page that set `dir`.
2699
+ * other side for the translate to bring in. `:dir()` asks for the direction the
2700
+ * track itself is in, which is the nearest `dir` above it however deeply one
2701
+ * region is nested in another.
2129
2702
  */
2130
- [dir='rtl'] .plass-marquee-track,
2131
2703
  .plass-marquee-track:dir(rtl) {
2132
2704
  --p-anim-along: -1;
2133
2705
  }
2134
2706
 
2707
+ .plass-marquee-track:dir(ltr) {
2708
+ --p-anim-along: 1;
2709
+ }
2710
+
2711
+ /*
2712
+ * `:dir()` is newer than the rest of this sheet's floor (Chrome 120), so a
2713
+ * browser without it reads the attribute instead, and only that browser:
2714
+ * written beside `:dir()` for every browser, the attribute rules would outrank
2715
+ * it where the two disagree.
2716
+ *
2717
+ * `[dir='rtl']` asks whether any ancestor is right to left rather than the
2718
+ * nearest, so the second rule turns a left-to-right region inside a
2719
+ * right-to-left page back again; it is the more specific, so the nearer `dir`
2720
+ * wins. It is `[dir='rtl'] [dir='ltr']` and not a bare `[dir='ltr']`: a page
2721
+ * that writes `dir="ltr"` on its root would otherwise turn every right-to-left
2722
+ * region inside it the English way. That answers one region inside another in
2723
+ * either order and goes no deeper: in such a browser, a right-to-left region
2724
+ * inside a left-to-right one inside a right-to-left page runs the English way.
2725
+ */
2726
+ @supports not selector(:dir(rtl)) {
2727
+ [dir='rtl'] .plass-marquee-track {
2728
+ --p-anim-along: -1;
2729
+ }
2730
+
2731
+ [dir='rtl'] [dir='ltr'] .plass-marquee-track {
2732
+ --p-anim-along: 1;
2733
+ }
2734
+ }
2735
+
2135
2736
  .plass-marquee[data-pause-on-hover]:hover .plass-marquee-track {
2136
2737
  animation-play-state: paused;
2137
2738
  }
@@ -2758,19 +3359,30 @@
2758
3359
  * tiles across and a layout grid is counted in tracks, and two is the narrowest
2759
3360
  * arrangement that still reads as a set.
2760
3361
  *
2761
- * The three lines below are what the slot is *for*. A grid and a quilt lay out
2762
- * in CSS Grid off `--p-cols`; a masonry deals its items into lanes in JavaScript
2763
- * and writes the count and the rows inline, because which lane an item lands in
2764
- * depends on the heights of the items before it and no stylesheet can work that
2765
- * out; and a justified row is flexbox, which needs no count at all — it fills
2766
- * to the edge with whatever fits.
3362
+ * The rules below are what the slot is *for*. A grid, a quilt and a masonry lay
3363
+ * out in CSS Grid off `--p-cols`. A masonry also deals its items into lanes in
3364
+ * JavaScript, because which lane an item lands in depends on the heights of the
3365
+ * items before it and no stylesheet can work that out; it deals once for every
3366
+ * lane count the columns name and writes each deal as `--p-lane-*` slots, which
3367
+ * the chains above switch between, so a server's markup has the right lanes at
3368
+ * every width. A justified row is flexbox, which needs no count at all — it
3369
+ * fills to the edge with whatever fits.
2767
3370
  * ------------------------------------------------------------------------- */
2768
3371
 
2769
3372
  .plass-gallery-grid,
2770
- .plass-gallery-quilted {
3373
+ .plass-gallery-quilted,
3374
+ .plass-gallery-masonry {
2771
3375
  grid-template-columns: repeat(var(--p-cols, 2), minmax(0, 1fr));
2772
3376
  }
2773
3377
 
3378
+ .plass-gallery-masonry {
3379
+ grid-template-rows: var(--p-lane-rows);
3380
+ }
3381
+
3382
+ .plass-gallery-masonry > li {
3383
+ grid-area: var(--p-lane-area);
3384
+ }
3385
+
2774
3386
  /*
2775
3387
  * What holds a justified gallery's last row down.
2776
3388
  *
@@ -2891,6 +3503,13 @@
2891
3503
  color: var(--plass-muted-fg);
2892
3504
  }
2893
3505
 
3506
+ /*
3507
+ * The placeholder steps out of sight while the label rests where it is written,
3508
+ * and only out of sight: it stays in the accessibility tree. A reader who moves
3509
+ * to the control gives it the focus, which raises the label and brings the
3510
+ * placeholder back, so what a screen reader says there is what the page shows.
3511
+ * The Flutter build keeps it the same way.
3512
+ */
2894
3513
  .plass-notch-float:not(:focus-within):not(:has([data-popup-open])):is(
2895
3514
  [data-empty],
2896
3515
  :has(.plass-float-control:placeholder-shown:not(:autofill)),
@@ -2971,7 +3590,6 @@
2971
3590
  indistinguishable from an empty box that finished loading with nothing in
2972
3591
  it. */
2973
3592
  .plass-skeleton::after {
2974
- inset-inline-start: 0;
2975
3593
  inline-size: 100%;
2976
3594
  background-image: none;
2977
3595
  animation: plass-skeleton-pulse 2.4s var(--plass-ease) infinite;
@@ -2989,7 +3607,6 @@
2989
3607
  two that genuinely have to keep turning or cycling are slowed to where they
2990
3608
  stop reading as motion. */
2991
3609
  .plass-progress-sweep {
2992
- inset-inline-start: 0;
2993
3610
  inline-size: 100%;
2994
3611
  animation: plass-progress-pulse 1.8s var(--plass-ease) infinite;
2995
3612
  }
@@ -3027,7 +3644,7 @@
3027
3644
  */
3028
3645
  .plass-anim {
3029
3646
  animation-duration: 0s;
3030
- animation-delay: max(1ms, var(--p-anim-delay, 0ms));
3647
+ animation-delay: max(1ms, var(--p-anim-run-delay, var(--p-anim-delay, 0ms)));
3031
3648
  animation-iteration-count: var(--p-anim-still-repeat, var(--p-anim-repeat, 1));
3032
3649
  animation-fill-mode: forwards;
3033
3650
  animation-timeline: auto;
@@ -3040,7 +3657,9 @@
3040
3657
  rotate: var(--p-anim-angle-to, 0deg);
3041
3658
  }
3042
3659
 
3043
- .plass-marquee-track,
3660
+ /* A strip that ends is the exception, below. `:where()` keeps the selector
3661
+ as specific as `.plass-marquee-track` on its own. */
3662
+ :where(.plass-marquee:not([data-plass-finite])) > .plass-marquee-track,
3044
3663
  .plass-headline-item,
3045
3664
  .plass-caret {
3046
3665
  animation: none;
@@ -3071,6 +3690,105 @@
3071
3690
  skeleton makes: the decoration survives, the motion does not. */
3072
3691
  .plass-anim-lighting::before {
3073
3692
  background: var(--p-anim-glow-to);
3693
+ }
3694
+
3695
+ .plass-anim-lighting:not([data-plass-finite])::before {
3074
3696
  animation: none;
3075
3697
  }
3698
+
3699
+ /*
3700
+ * A strip or a light that ends is run in no time instead, as an effect
3701
+ * above is, so that it lands and `animationend` arrives. Neither fills
3702
+ * either side of its run, so nothing it draws moves: the strip stands where
3703
+ * it started and the arc is the even glow. `src/internal/animate.ts` marks
3704
+ * one that has landed, which is what keeps it there when the reader gives
3705
+ * movement back; an endless one is switched off and goes on from its start.
3706
+ */
3707
+ .plass-marquee[data-plass-finite] > .plass-marquee-track,
3708
+ .plass-anim-lighting[data-plass-finite]::before {
3709
+ animation-duration: 0s;
3710
+ animation-delay: max(1ms, var(--p-anim-run-delay, var(--p-anim-delay, 0ms)));
3711
+ animation-fill-mode: none;
3712
+ }
3713
+ }
3714
+
3715
+ /*
3716
+ * A run that landed under reduced motion, until it runs again.
3717
+ *
3718
+ * Its keyframe goes on counting its time from when it began, so a fade that
3719
+ * landed in no time and was handed its duration back while it would still have
3720
+ * been running stood that far into the run and played on from there. The
3721
+ * timing the block above lands it with holds it on its last frame whatever the
3722
+ * setting is now. `src/internal/animate.ts` marks a finite run on the clock
3723
+ * when it lands, and takes the mark off when the run starts again. An endless
3724
+ * run is never marked: it has no last frame to stay on, and goes on from where
3725
+ * its passes would have got to.
3726
+ *
3727
+ * Unless `paused` is holding it, finite or endless. A paused keyframe stands
3728
+ * where its clock stopped: the start of a pass for an endless run that landed,
3729
+ * so an endless fade held while the reader gave movement back went from fully
3730
+ * drawn to nearly gone, and ahead of its start for a run held before its delay
3731
+ * was over, so a fade held there went from fully drawn to nothing and a turn
3732
+ * from its `to` angle back to its `from`. The script marks such a run while
3733
+ * reduced motion shows it, and takes the mark off when it is let go, which
3734
+ * plays it on from where its clock stands. Held before its delay was over, it
3735
+ * stands where the block above stands a waiting effect, which is where a turn
3736
+ * stands too.
3737
+ */
3738
+ .plass-anim[data-plass-landed],
3739
+ .plass-anim[data-plass-held] {
3740
+ animation-duration: 0s;
3741
+ animation-delay: max(1ms, var(--p-anim-run-delay, var(--p-anim-delay, 0ms)));
3742
+ animation-iteration-count: var(--p-anim-still-repeat, var(--p-anim-repeat, 1));
3743
+ animation-fill-mode: forwards;
3744
+ }
3745
+
3746
+ .plass-anim-rotate[data-plass-held] {
3747
+ rotate: var(--p-anim-angle-to, 0deg);
3748
+ }
3749
+
3750
+ /*
3751
+ * A light held the same way keeps the even glow the setting draws. Its arc is
3752
+ * left as it is underneath, an endless one made paused at its start when the
3753
+ * setting goes and a finite one paused where its clock stopped, so once it is
3754
+ * let go it turns from there, as it did. Unmarked, the arc came back at the
3755
+ * angle its clock stood at, which is `0deg` for an endless light.
3756
+ */
3757
+ .plass-anim-lighting[data-plass-held]::before {
3758
+ background: var(--p-anim-glow-to);
3759
+ }
3760
+
3761
+ /*
3762
+ * A strip held the same way keeps the one copy the setting draws, in the box
3763
+ * that scrolls along it, so what the reader scrolled to stays where it is.
3764
+ * Unmarked, the copies came back and the box clipped them while the strip was
3765
+ * still paused. Its keyframe is left as it is underneath, which already stands
3766
+ * where the setting showed it, so once it is let go the strip goes on as it
3767
+ * would have without the hold. The child combinator leaves a strip nested
3768
+ * inside it alone.
3769
+ */
3770
+ .plass-marquee[data-plass-held] {
3771
+ overflow-x: auto;
3772
+ overflow-y: hidden;
3773
+ }
3774
+
3775
+ .plass-marquee-vertical[data-plass-held] {
3776
+ overflow-x: hidden;
3777
+ overflow-y: auto;
3778
+ }
3779
+
3780
+ .plass-marquee[data-plass-held] > .plass-marquee-track + .plass-marquee-track {
3781
+ display: none;
3782
+ }
3783
+
3784
+ /*
3785
+ * A strip or a light that landed under reduced motion, marked on its root, has
3786
+ * its keyframe taken off until it runs again: the strip, every copy of it,
3787
+ * stands where it started, where the setting showed it, and the arc where a
3788
+ * turn ends, which is where it begins. Played again from the start, a finite
3789
+ * marquee or light set off on its whole run once more.
3790
+ */
3791
+ .plass-marquee[data-plass-landed] > .plass-marquee-track,
3792
+ .plass-anim-lighting[data-plass-landed]::before {
3793
+ animation-name: none;
3076
3794
  }