@zazz-ui/core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE +21 -0
  3. package/README.md +61 -0
  4. package/dist/sri.json +75 -0
  5. package/dist/zazz.css +1 -0
  6. package/dist/zazz.js +1 -0
  7. package/examples/about.html +590 -0
  8. package/examples/components.html +1040 -0
  9. package/examples/forms.html +511 -0
  10. package/examples/index.html +268 -0
  11. package/examples/layout.html +320 -0
  12. package/examples/products.html +846 -0
  13. package/examples/responsive.html +339 -0
  14. package/package.json +85 -0
  15. package/src/base/_layers.css +12 -0
  16. package/src/base/_layout.css +568 -0
  17. package/src/base/_reset.css +515 -0
  18. package/src/base/_typography.css +495 -0
  19. package/src/base/_utilities.css +6628 -0
  20. package/src/base/_variables.css +682 -0
  21. package/src/base/_view-transitions.css +103 -0
  22. package/src/base/command-score.d.ts +12 -0
  23. package/src/base/command-score.d.ts.map +1 -0
  24. package/src/base/command-score.js +151 -0
  25. package/src/base/command-score.ts +192 -0
  26. package/src/base/dialog-lifecycle.d.ts +11 -0
  27. package/src/base/dialog-lifecycle.d.ts.map +1 -0
  28. package/src/base/dialog-lifecycle.js +65 -0
  29. package/src/base/dialog-lifecycle.ts +80 -0
  30. package/src/base/embla.d.ts +90 -0
  31. package/src/base/embla.d.ts.map +1 -0
  32. package/src/base/embla.js +643 -0
  33. package/src/base/embla.ts +791 -0
  34. package/src/base/hotkeys.d.ts +82 -0
  35. package/src/base/hotkeys.d.ts.map +1 -0
  36. package/src/base/hotkeys.js +141 -0
  37. package/src/base/hotkeys.ts +195 -0
  38. package/src/base/navigation.d.ts +2 -0
  39. package/src/base/navigation.d.ts.map +1 -0
  40. package/src/base/navigation.js +136 -0
  41. package/src/base/navigation.ts +151 -0
  42. package/src/base/reveal.d.ts +80 -0
  43. package/src/base/reveal.d.ts.map +1 -0
  44. package/src/base/reveal.js +305 -0
  45. package/src/base/reveal.ts +379 -0
  46. package/src/base/signals.d.ts +89 -0
  47. package/src/base/signals.d.ts.map +1 -0
  48. package/src/base/signals.js +134 -0
  49. package/src/base/signals.ts +164 -0
  50. package/src/base/typeahead.d.ts +105 -0
  51. package/src/base/typeahead.d.ts.map +1 -0
  52. package/src/base/typeahead.js +411 -0
  53. package/src/base/typeahead.ts +500 -0
  54. package/src/base/utils.d.ts +56 -0
  55. package/src/base/utils.d.ts.map +1 -0
  56. package/src/base/utils.js +88 -0
  57. package/src/base/utils.ts +98 -0
  58. package/src/base/zazz-element.d.ts +44 -0
  59. package/src/base/zazz-element.d.ts.map +1 -0
  60. package/src/base/zazz-element.js +59 -0
  61. package/src/base/zazz-element.ts +73 -0
  62. package/src/globals.d.ts +148 -0
  63. package/src/head.d.ts +95 -0
  64. package/src/head.d.ts.map +1 -0
  65. package/src/head.js +311 -0
  66. package/src/head.ts +433 -0
  67. package/src/index.css +71 -0
  68. package/src/index.d.ts +36 -0
  69. package/src/index.d.ts.map +1 -0
  70. package/src/index.js +35 -0
  71. package/src/index.ts +36 -0
  72. package/src/manifest.d.ts +90 -0
  73. package/src/manifest.d.ts.map +1 -0
  74. package/src/manifest.js +614 -0
  75. package/src/manifest.ts +667 -0
  76. package/src/primitives/accordion/accordion.css +104 -0
  77. package/src/primitives/accordion/accordion.html +69 -0
  78. package/src/primitives/alert-dialog/alert-dialog.css +38 -0
  79. package/src/primitives/alert-dialog/alert-dialog.html +53 -0
  80. package/src/primitives/autocomplete/autocomplete-groups.html +77 -0
  81. package/src/primitives/autocomplete/autocomplete.css +114 -0
  82. package/src/primitives/autocomplete/autocomplete.d.ts +30 -0
  83. package/src/primitives/autocomplete/autocomplete.d.ts.map +1 -0
  84. package/src/primitives/autocomplete/autocomplete.html +66 -0
  85. package/src/primitives/autocomplete/autocomplete.js +41 -0
  86. package/src/primitives/autocomplete/autocomplete.ts +46 -0
  87. package/src/primitives/avatar/avatar.html +44 -0
  88. package/src/primitives/badge/badge-icon.html +36 -0
  89. package/src/primitives/badge/badge.css +251 -0
  90. package/src/primitives/badge/badge.html +7 -0
  91. package/src/primitives/breadcrumbs/breadcrumbs.html +9 -0
  92. package/src/primitives/button/button-icon-only.html +84 -0
  93. package/src/primitives/button/button-icon.html +82 -0
  94. package/src/primitives/button/button.css +319 -0
  95. package/src/primitives/button/button.html +8 -0
  96. package/src/primitives/button-group/button-group-vertical.html +6 -0
  97. package/src/primitives/button-group/button-group.css +94 -0
  98. package/src/primitives/button-group/button-group.html +64 -0
  99. package/src/primitives/card/card-subgrid.html +118 -0
  100. package/src/primitives/card/card.html +53 -0
  101. package/src/primitives/carousel/carousel.css +61 -0
  102. package/src/primitives/carousel/carousel.d.ts +16 -0
  103. package/src/primitives/carousel/carousel.d.ts.map +1 -0
  104. package/src/primitives/carousel/carousel.html +315 -0
  105. package/src/primitives/carousel/carousel.js +73 -0
  106. package/src/primitives/carousel/carousel.ts +84 -0
  107. package/src/primitives/checkbox/checkbox-tasklist.html +71 -0
  108. package/src/primitives/checkbox/checkbox.css +82 -0
  109. package/src/primitives/checkbox/checkbox.d.ts +21 -0
  110. package/src/primitives/checkbox/checkbox.d.ts.map +1 -0
  111. package/src/primitives/checkbox/checkbox.html +17 -0
  112. package/src/primitives/checkbox/checkbox.js +190 -0
  113. package/src/primitives/checkbox/checkbox.ts +219 -0
  114. package/src/primitives/combobox/combobox-multiselect.html +91 -0
  115. package/src/primitives/combobox/combobox.css +307 -0
  116. package/src/primitives/combobox/combobox.d.ts +100 -0
  117. package/src/primitives/combobox/combobox.d.ts.map +1 -0
  118. package/src/primitives/combobox/combobox.html +73 -0
  119. package/src/primitives/combobox/combobox.js +503 -0
  120. package/src/primitives/combobox/combobox.ts +559 -0
  121. package/src/primitives/command/command-actions.d.ts +31 -0
  122. package/src/primitives/command/command-actions.d.ts.map +1 -0
  123. package/src/primitives/command/command-actions.html +89 -0
  124. package/src/primitives/command/command-actions.js +70 -0
  125. package/src/primitives/command/command-actions.ts +77 -0
  126. package/src/primitives/command/command-dialog.html +77 -0
  127. package/src/primitives/command/command.css +151 -0
  128. package/src/primitives/command/command.d.ts +52 -0
  129. package/src/primitives/command/command.d.ts.map +1 -0
  130. package/src/primitives/command/command.html +119 -0
  131. package/src/primitives/command/command.js +146 -0
  132. package/src/primitives/command/command.ts +157 -0
  133. package/src/primitives/dialog/dialog-with-form.html +200 -0
  134. package/src/primitives/dialog/dialog.css +229 -0
  135. package/src/primitives/dialog/dialog.html +90 -0
  136. package/src/primitives/fields/fields.css +278 -0
  137. package/src/primitives/input/input-icon-leading.html +19 -0
  138. package/src/primitives/input/input-icon-trailing.html +18 -0
  139. package/src/primitives/input/input.css +114 -0
  140. package/src/primitives/input/input.html +61 -0
  141. package/src/primitives/input-group/input-group-password-group.html +108 -0
  142. package/src/primitives/input-group/input-group.css +215 -0
  143. package/src/primitives/input-group/input-group.html +132 -0
  144. package/src/primitives/kbd/kbd-group.html +18 -0
  145. package/src/primitives/kbd/kbd.css +87 -0
  146. package/src/primitives/kbd/kbd.html +7 -0
  147. package/src/primitives/lightbox/lightbox.css +459 -0
  148. package/src/primitives/lightbox/lightbox.d.ts +7 -0
  149. package/src/primitives/lightbox/lightbox.d.ts.map +1 -0
  150. package/src/primitives/lightbox/lightbox.html +665 -0
  151. package/src/primitives/lightbox/lightbox.js +96 -0
  152. package/src/primitives/lightbox/lightbox.ts +113 -0
  153. package/src/primitives/menu/menu-interest.html +52 -0
  154. package/src/primitives/menu/menu.css +55 -0
  155. package/src/primitives/menu/menu.d.ts +38 -0
  156. package/src/primitives/menu/menu.d.ts.map +1 -0
  157. package/src/primitives/menu/menu.html +70 -0
  158. package/src/primitives/menu/menu.js +117 -0
  159. package/src/primitives/menu/menu.ts +131 -0
  160. package/src/primitives/menubar/menubar-help-search.html +103 -0
  161. package/src/primitives/menubar/menubar.html +166 -0
  162. package/src/primitives/meter/meter.css +178 -0
  163. package/src/primitives/meter/meter.html +38 -0
  164. package/src/primitives/mobile-menu/mobile-menu.css +145 -0
  165. package/src/primitives/mobile-menu/mobile-menu.html +614 -0
  166. package/src/primitives/navigation-menu/navigation-menu-featured.html +76 -0
  167. package/src/primitives/navigation-menu/navigation-menu-icon-grid.html +158 -0
  168. package/src/primitives/navigation-menu/navigation-menu-interest.html +103 -0
  169. package/src/primitives/navigation-menu/navigation-menu-megamenu.html +141 -0
  170. package/src/primitives/navigation-menu/navigation-menu-simple.html +96 -0
  171. package/src/primitives/navigation-menu/navigation-menu.css +295 -0
  172. package/src/primitives/navigation-menu/navigation-menu.html +576 -0
  173. package/src/primitives/otp/otp.css +126 -0
  174. package/src/primitives/otp/otp.d.ts +89 -0
  175. package/src/primitives/otp/otp.d.ts.map +1 -0
  176. package/src/primitives/otp/otp.html +22 -0
  177. package/src/primitives/otp/otp.js +226 -0
  178. package/src/primitives/otp/otp.ts +279 -0
  179. package/src/primitives/password-group/password-group.css +238 -0
  180. package/src/primitives/password-group/password-group.d.ts +25 -0
  181. package/src/primitives/password-group/password-group.d.ts.map +1 -0
  182. package/src/primitives/password-group/password-group.html +109 -0
  183. package/src/primitives/password-group/password-group.js +76 -0
  184. package/src/primitives/password-group/password-group.ts +95 -0
  185. package/src/primitives/popover/popover.css +233 -0
  186. package/src/primitives/progress/progress-indeterminate.html +1 -0
  187. package/src/primitives/progress/progress.css +105 -0
  188. package/src/primitives/progress/progress.html +7 -0
  189. package/src/primitives/prose/prose.html +65 -0
  190. package/src/primitives/radio/radio.css +84 -0
  191. package/src/primitives/radio/radio.html +17 -0
  192. package/src/primitives/reveal/reveal.css +167 -0
  193. package/src/primitives/select/multiselect.d.ts +43 -0
  194. package/src/primitives/select/multiselect.d.ts.map +1 -0
  195. package/src/primitives/select/multiselect.js +147 -0
  196. package/src/primitives/select/multiselect.ts +188 -0
  197. package/src/primitives/select/select-align.html +49 -0
  198. package/src/primitives/select/select-multiple.html +12 -0
  199. package/src/primitives/select/select-sides.html +65 -0
  200. package/src/primitives/select/select.css +481 -0
  201. package/src/primitives/select/select.html +16 -0
  202. package/src/primitives/separator/separator.css +49 -0
  203. package/src/primitives/separator/separator.html +16 -0
  204. package/src/primitives/slider/slider.css +122 -0
  205. package/src/primitives/slider/slider.html +1 -0
  206. package/src/primitives/switch/switch.css +126 -0
  207. package/src/primitives/switch/switch.html +13 -0
  208. package/src/primitives/table/table-alternating.html +36 -0
  209. package/src/primitives/table/table-grid.html +30 -0
  210. package/src/primitives/table/table-size-sm.html +26 -0
  211. package/src/primitives/table/table.css +158 -0
  212. package/src/primitives/table/table.html +45 -0
  213. package/src/primitives/tabs/tabs.css +328 -0
  214. package/src/primitives/tabs/tabs.d.ts +35 -0
  215. package/src/primitives/tabs/tabs.d.ts.map +1 -0
  216. package/src/primitives/tabs/tabs.html +75 -0
  217. package/src/primitives/tabs/tabs.js +84 -0
  218. package/src/primitives/tabs/tabs.ts +93 -0
  219. package/src/primitives/textarea/textarea.css +78 -0
  220. package/src/primitives/textarea/textarea.html +10 -0
  221. package/src/primitives/toaster/toaster.css +309 -0
  222. package/src/primitives/toaster/toaster.d.ts +138 -0
  223. package/src/primitives/toaster/toaster.d.ts.map +1 -0
  224. package/src/primitives/toaster/toaster.html +77 -0
  225. package/src/primitives/toaster/toaster.js +736 -0
  226. package/src/primitives/toaster/toaster.ts +823 -0
  227. package/src/primitives/toggle/toggle.css +295 -0
  228. package/src/primitives/toggle/toggle.html +68 -0
  229. package/src/primitives/toggle-group/toggle-group-multiple.html +14 -0
  230. package/src/primitives/toggle-group/toggle-group-vertical.html +14 -0
  231. package/src/primitives/toggle-group/toggle-group.css +73 -0
  232. package/src/primitives/toggle-group/toggle-group.html +53 -0
  233. package/src/primitives/toolbar/toolbar.html +45 -0
  234. package/src/primitives/tooltip/tooltip-disabled.html +19 -0
  235. package/src/primitives/tooltip/tooltip-sides.html +57 -0
  236. package/src/primitives/tooltip/tooltip-with-kbd.html +31 -0
  237. package/src/primitives/tooltip/tooltip.css +235 -0
  238. package/src/primitives/tooltip/tooltip.html +12 -0
  239. package/src/primitives/utilities/aspect-ratio.html +17 -0
  240. package/src/primitives/utilities/basis.html +27 -0
  241. package/src/primitives/utilities/col-span.html +23 -0
  242. package/src/primitives/utilities/compose.html +19 -0
  243. package/src/primitives/utilities/flex-align.html +26 -0
  244. package/src/primitives/utilities/flex-direction.html +36 -0
  245. package/src/primitives/utilities/flex-grow.html +17 -0
  246. package/src/primitives/utilities/gap.html +62 -0
  247. package/src/primitives/utilities/grid-cols.html +20 -0
  248. package/src/primitives/utilities/grid-pile.html +5 -0
  249. package/src/primitives/utilities/grid-responsive.html +31 -0
  250. package/src/primitives/utilities/margin-auto.html +13 -0
  251. package/src/primitives/utilities/object-fit.html +41 -0
  252. package/src/primitives/utilities/order.html +17 -0
  253. package/src/primitives/utilities/overflow.html +26 -0
  254. package/src/primitives/utilities/padding-compose.html +23 -0
  255. package/src/primitives/utilities/padding.html +30 -0
  256. package/src/primitives/utilities/position.html +13 -0
  257. package/src/primitives/utilities/responsive-flex.html +22 -0
  258. package/src/primitives/utilities/responsive-grid.html +31 -0
  259. package/src/primitives/utilities/size.html +22 -0
  260. package/src/primitives/utilities/width.html +22 -0
@@ -0,0 +1,568 @@
1
+ @layer variables {
2
+ @property --_container {
3
+ syntax: "*";
4
+ inherits: false;
5
+ }
6
+
7
+ :root {
8
+ /* Inline space left for the band columns once the two gutters are removed.
9
+ Percentages resolve against the layout region (the grid container), so this
10
+ tracks the region's own width — no container-query units needed. */
11
+ --_layout-available: calc(100% - var(--gutters) * 2);
12
+
13
+ /* Fluid layout grid. Each side band is a clamp() that stays at 0 until the
14
+ inner content has reached its breakpoint width, then grows in up to its
15
+ fixed step. Result: a container caps + centers while there's room beyond it
16
+ and fluidly fills (minus gutters) once there isn't — continuously, with no
17
+ breakpoint snap. xs–xl cap at their matching --breakpoint-* width; --full
18
+ has no cap — its outer minmax(0, 1fr) slack stretches it out to the gutters;
19
+ --bleed spans edge to edge. That 1fr slack is also the first column to
20
+ collapse to 0 as the grid scales down, so bands give up space outer-first. */
21
+ --layout-template-columns: [container-bleed-start] var(--gutters) [container-full-start]
22
+ minmax(0, 1fr) [container-xl-start]
23
+ clamp(
24
+ 0rem,
25
+ calc((var(--_layout-available) - var(--breakpoint-lg)) / 2),
26
+ calc((var(--breakpoint-xl) - var(--breakpoint-lg)) / 2)
27
+ )
28
+ [container-lg-start]
29
+ clamp(
30
+ 0rem,
31
+ calc((var(--_layout-available) - var(--breakpoint-md)) / 2),
32
+ calc((var(--breakpoint-lg) - var(--breakpoint-md)) / 2)
33
+ )
34
+ [container-md-start]
35
+ clamp(
36
+ 0rem,
37
+ calc((var(--_layout-available) - var(--breakpoint-sm)) / 2),
38
+ calc((var(--breakpoint-md) - var(--breakpoint-sm)) / 2)
39
+ )
40
+ [container-sm-start]
41
+ clamp(
42
+ 0rem,
43
+ calc((var(--_layout-available) - var(--breakpoint-xs)) / 2),
44
+ calc((var(--breakpoint-sm) - var(--breakpoint-xs)) / 2)
45
+ )
46
+ [container-xs-start] clamp(0rem, var(--_layout-available), var(--breakpoint-xs))
47
+ [container-xs-end]
48
+ clamp(
49
+ 0rem,
50
+ calc((var(--_layout-available) - var(--breakpoint-xs)) / 2),
51
+ calc((var(--breakpoint-sm) - var(--breakpoint-xs)) / 2)
52
+ )
53
+ [container-sm-end]
54
+ clamp(
55
+ 0rem,
56
+ calc((var(--_layout-available) - var(--breakpoint-sm)) / 2),
57
+ calc((var(--breakpoint-md) - var(--breakpoint-sm)) / 2)
58
+ )
59
+ [container-md-end]
60
+ clamp(
61
+ 0rem,
62
+ calc((var(--_layout-available) - var(--breakpoint-md)) / 2),
63
+ calc((var(--breakpoint-lg) - var(--breakpoint-md)) / 2)
64
+ )
65
+ [container-lg-end]
66
+ clamp(
67
+ 0rem,
68
+ calc((var(--_layout-available) - var(--breakpoint-lg)) / 2),
69
+ calc((var(--breakpoint-xl) - var(--breakpoint-lg)) / 2)
70
+ )
71
+ [container-xl-end] minmax(0, 1fr) [container-full-end] var(--gutters) [container-bleed-end];
72
+ }
73
+ }
74
+
75
+ @layer zazz.utilities {
76
+ /* ---------------------------------------------------------------------------
77
+ The "container set" = the base .container plus its responsive variants
78
+ (.\@md\:container, .\@lg\:container, …). [class*=":container"] matches the escaped
79
+ variant classes (@xs:container … @xl:container) in one shot; .container is named
80
+ explicitly because it carries no colon. The variable wiring and child
81
+ placement below are shared by every variant and stay inert until the grid is
82
+ actually established (grid-column is ignored on a non-grid item), so only the
83
+ subgrid switch itself is gated per breakpoint — see the @container blocks at
84
+ the end of this layer. A responsive variant therefore renders as a plain,
85
+ full-width block below its breakpoint and snaps to a band-aligned subgrid at
86
+ or above it. */
87
+
88
+ /* Named line ranges — published on any region holding a container variant. */
89
+ :where(main, header, footer, section, article):has(
90
+ > :is(.container, [class*=":container"]):not([data-variant="article"])
91
+ ) {
92
+ --container-xs: container-xs-start / container-xs-end;
93
+ --container-sm: container-sm-start / container-sm-end;
94
+ --container-md: container-md-start / container-md-end;
95
+ --container-lg: container-lg-start / container-lg-end;
96
+ --container-xl: container-xl-start / container-xl-end;
97
+ --container-full: container-full-start / container-full-end;
98
+ --container-bleed: container-bleed-start / container-bleed-end;
99
+ }
100
+
101
+ /* The region is the layout grid whenever it holds a container variant. This is
102
+ ungated: the container itself always spans the full region (grid-column below),
103
+ so below a variant's breakpoint it reads as a full-bleed block, and the gated
104
+ subgrid switch aligns its children to the bands at/above it. */
105
+ :where(main, header, footer, section, article):has(
106
+ > :is(.container, [class*=":container"]):not([data-variant="article"])
107
+ ) {
108
+ display: grid;
109
+ grid-template-columns: var(--layout-template-columns);
110
+ }
111
+
112
+ :where(:is(.container, [class*=":container"]):not([data-variant="article"])) {
113
+ /* default container sizes */
114
+ --default-container-grid-column: var(--container-md);
115
+ --default-article-inline-size: var(--article-lg);
116
+
117
+ /* Always span every region column. As a subgrid this re-exposes all bands; as
118
+ a plain block (a responsive variant below its breakpoint) it fills the full
119
+ region width. */
120
+ grid-column: 1 / -1;
121
+ }
122
+
123
+ /* The base .container is a subgrid at every width; responsive variants get the
124
+ same treatment from their breakpoint up (the @container blocks below). */
125
+ :where(.container:not([data-variant="article"])) {
126
+ display: grid;
127
+ place-items: start stretch;
128
+ /* span all of parent's columns */
129
+ grid-template-columns: subgrid;
130
+
131
+ /* The bands are positioned exactly by --layout-template-columns, so an active
132
+ container ignores the gap utilities (--_gap / .gap-*): a column gap would
133
+ push every band off the template, and a row gap isn't part of the band
134
+ system. The gap still applies when the element is NOT an active container —
135
+ e.g. a @max-* variant above its breakpoint, where it's a plain grid-cols-N. */
136
+ column-gap: 0;
137
+
138
+ /* Setting a container context breaks subgrid */
139
+ container-name: none;
140
+ container-type: normal;
141
+ }
142
+
143
+ /* Every container child inherits the container's default band (a harmless
144
+ variable — it only takes effect through the grid-column placement below). */
145
+ :where(:is(.container, [class*=":container"]):not([data-variant="article"])) > * {
146
+ --_default-container: var(--default-container-grid-column);
147
+ }
148
+
149
+ /*
150
+ * Place each child into its band, resolving via the fallback chain:
151
+ * explicit --_container -> the container's default -> global default
152
+ * Base + min variants do this at every width; grid-column is ignored while the
153
+ * parent is a plain block, so it's harmless below a min variant's breakpoint.
154
+ * Max variants are EXCLUDED here: above their breakpoint they become a real grid
155
+ * (e.g. grid-cols-2), and band line names that don't exist there would leak in as
156
+ * phantom implicit tracks. They place their children in the gated blocks below,
157
+ * only while the subgrid is actually live (under their breakpoint).
158
+ */
159
+ :where(:is(.container, [class*=":container"]):not([data-variant="article"]):not([class*="@max-"]))
160
+ > * {
161
+ grid-column: var(--_container, var(--_default-container));
162
+ }
163
+
164
+ /* Per-container default size (set on the container element) */
165
+ :where(:is(.container, [class*=":container"]):not([data-variant="article"]))[data-container="xs"]
166
+ > * {
167
+ --_default-container: var(--container-xs);
168
+ }
169
+
170
+ :where(:is(.container, [class*=":container"]):not([data-variant="article"]))[data-container="sm"]
171
+ > * {
172
+ --_default-container: var(--container-sm);
173
+ }
174
+
175
+ :where(:is(.container, [class*=":container"]):not([data-variant="article"]))[data-container="md"]
176
+ > * {
177
+ --_default-container: var(--container-md);
178
+ }
179
+
180
+ :where(:is(.container, [class*=":container"]):not([data-variant="article"]))[data-container="lg"]
181
+ > * {
182
+ --_default-container: var(--container-lg);
183
+ }
184
+
185
+ :where(:is(.container, [class*=":container"]):not([data-variant="article"]))[data-container="xl"]
186
+ > * {
187
+ --_default-container: var(--container-xl);
188
+ }
189
+
190
+ :where(
191
+ :is(.container, [class*=":container"]):not([data-variant="article"])
192
+ )[data-container="full"]
193
+ > * {
194
+ --_default-container: var(--container-full);
195
+ }
196
+
197
+ :where(
198
+ :is(.container, [class*=":container"]):not([data-variant="article"])
199
+ )[data-container="bleed"]
200
+ > * {
201
+ --_default-container: var(--container-bleed);
202
+ }
203
+
204
+ /* Per-child override (set on the direct child element) */
205
+ :where(:is(.container, [class*=":container"]):not([data-variant="article"]))
206
+ > *[data-container="xs"] {
207
+ --_container: var(--container-xs);
208
+ }
209
+
210
+ :where(:is(.container, [class*=":container"]):not([data-variant="article"]))
211
+ > *[data-container="sm"] {
212
+ --_container: var(--container-sm);
213
+ }
214
+
215
+ :where(:is(.container, [class*=":container"]):not([data-variant="article"]))
216
+ > *[data-container="md"] {
217
+ --_container: var(--container-md);
218
+ }
219
+
220
+ :where(:is(.container, [class*=":container"]):not([data-variant="article"]))
221
+ > *[data-container="lg"] {
222
+ --_container: var(--container-lg);
223
+ }
224
+
225
+ :where(:is(.container, [class*=":container"]):not([data-variant="article"]))
226
+ > *[data-container="xl"] {
227
+ --_container: var(--container-xl);
228
+ }
229
+
230
+ :where(:is(.container, [class*=":container"]):not([data-variant="article"]))
231
+ > *[data-container="full"] {
232
+ --_container: var(--container-full);
233
+ }
234
+
235
+ :where(:is(.container, [class*=":container"]):not([data-variant="article"]))
236
+ > *[data-container="bleed"] {
237
+ --_container: var(--container-bleed);
238
+ }
239
+
240
+ /* ---------------------------------------------------------------------------
241
+ Responsive container variants — switch the variant into a subgrid from its
242
+ breakpoint up. Mobile-first, gated on the global --is-breakpoint-* flags
243
+ (sourced from the body container in _variables.css). The flag is read from the
244
+ variant's container ancestor — the region — which carries it like every body
245
+ descendant, so the variant element gates correctly (the region itself can't:
246
+ its own container ancestor is the body element, which holds no flag). The
247
+ region grid + 1 / -1 span above already apply at every width, so each block
248
+ only flips display + subgrid; below the breakpoint the variant stays a block. */
249
+ @container style(--is-breakpoint-xs: true) {
250
+ :where(.\@xs\:container:not([data-variant="article"])) {
251
+ display: grid;
252
+ grid-template-columns: subgrid;
253
+ column-gap: 0;
254
+ container-name: unset;
255
+ container-type: unset;
256
+ }
257
+ }
258
+
259
+ @container style(--is-breakpoint-sm: true) {
260
+ :where(.\@sm\:container:not([data-variant="article"])) {
261
+ display: grid;
262
+ grid-template-columns: subgrid;
263
+ column-gap: 0;
264
+ container-name: none;
265
+ container-type: normal;
266
+ }
267
+ }
268
+
269
+ @container style(--is-breakpoint-md: true) {
270
+ :where(.\@md\:container:not([data-variant="article"])) {
271
+ display: grid;
272
+ grid-template-columns: subgrid;
273
+ column-gap: 0;
274
+ container-name: none;
275
+ container-type: normal;
276
+ }
277
+ }
278
+
279
+ @container style(--is-breakpoint-lg: true) {
280
+ :where(.\@lg\:container:not([data-variant="article"])) {
281
+ display: grid;
282
+ grid-template-columns: subgrid;
283
+ column-gap: 0;
284
+ container-name: none;
285
+ container-type: normal;
286
+ }
287
+ }
288
+
289
+ @container style(--is-breakpoint-xl: true) {
290
+ :where(.\@xl\:container:not([data-variant="article"])) {
291
+ display: grid;
292
+ grid-template-columns: subgrid;
293
+ column-gap: 0;
294
+ container-name: none;
295
+ container-type: normal;
296
+ }
297
+ }
298
+
299
+ /* Max-breakpoint variants — the inverse of the min variants: a container only
300
+ BELOW its breakpoint, gated on the false state of the flag. Above it the
301
+ element falls back to whatever else it carries (e.g. grid grid-cols-2). Each
302
+ active block also places its children (the global placement rule excludes
303
+ @max-* to keep band line names out of the plain grid it becomes above). */
304
+
305
+ @container style(--is-breakpoint-xs: false) {
306
+ :where(.\@max-xs\:container:not([data-variant="article"])) {
307
+ display: grid;
308
+ grid-template-columns: subgrid;
309
+ column-gap: 0;
310
+ container-name: unset;
311
+ container-type: unset;
312
+ }
313
+ }
314
+
315
+ @container style(--is-breakpoint-sm: false) {
316
+ :where(.\@max-sm\:container:not([data-variant="article"])) {
317
+ display: grid;
318
+ grid-template-columns: subgrid;
319
+ column-gap: 0;
320
+ container-name: none;
321
+ container-type: normal;
322
+ }
323
+
324
+ :where(.\@max-sm\:container:not([data-variant="article"])) > * {
325
+ grid-column: var(--_container, var(--_default-container));
326
+ }
327
+ }
328
+
329
+ @container style(--is-breakpoint-md: false) {
330
+ :where(.\@max-md\:container:not([data-variant="article"])) {
331
+ display: grid;
332
+ grid-template-columns: subgrid;
333
+ column-gap: 0;
334
+ container-name: none;
335
+ container-type: normal;
336
+ }
337
+
338
+ :where(.\@max-md\:container:not([data-variant="article"])) > * {
339
+ grid-column: var(--_container, var(--_default-container));
340
+ }
341
+ }
342
+
343
+ @container style(--is-breakpoint-lg: false) {
344
+ :where(.\@max-lg\:container:not([data-variant="article"])) {
345
+ display: grid;
346
+ grid-template-columns: subgrid;
347
+ column-gap: 0;
348
+ container-name: none;
349
+ container-type: normal;
350
+ }
351
+
352
+ :where(.\@max-lg\:container:not([data-variant="article"])) > * {
353
+ grid-column: var(--_container, var(--_default-container));
354
+ }
355
+ }
356
+
357
+ @container style(--is-breakpoint-xl: false) {
358
+ :where(.\@max-xl\:container:not([data-variant="article"])) {
359
+ display: grid;
360
+ grid-template-columns: subgrid;
361
+ column-gap: 0;
362
+ container-name: none;
363
+ container-type: normal;
364
+ }
365
+
366
+ :where(.\@max-xl\:container:not([data-variant="article"])) > * {
367
+ grid-column: var(--_container, var(--_default-container));
368
+ }
369
+ }
370
+
371
+ /* ===========================================================================
372
+ CONTAINER VARIANTS
373
+ =========================================================================== */
374
+
375
+ :where(:is(.container, [class*=":container"])[data-variant="article"]) {
376
+ --default-article-inline-size: var(--article-lg);
377
+ }
378
+
379
+ /* Base .container — article width at every width; responsive variants gate below. */
380
+ :where(.container[data-variant="article"]) {
381
+ --_article: var(--default-article-inline-size);
382
+ --_container-name: article;
383
+ --_container-type: inline-size;
384
+
385
+ inline-size: min(var(--_article), 100% - var(--gutters) * 2);
386
+ margin-inline: auto;
387
+ container-name: var(--_container-name);
388
+ container-type: var(--_container-type);
389
+ }
390
+
391
+ :where(:is(.container, [class*=":container"])[data-variant="article"])[data-container="xs"] {
392
+ --_article: var(--article-xs);
393
+ }
394
+
395
+ :where(:is(.container, [class*=":container"])[data-variant="article"])[data-container="sm"] {
396
+ --_article: var(--article-sm);
397
+ }
398
+
399
+ :where(:is(.container, [class*=":container"])[data-variant="article"])[data-container="md"] {
400
+ --_article: var(--article-md);
401
+ }
402
+
403
+ :where(:is(.container, [class*=":container"])[data-variant="article"])[data-container="lg"] {
404
+ --_article: var(--article-lg);
405
+ }
406
+
407
+ :where(:is(.container, [class*=":container"])[data-variant="article"])[data-container="xl"] {
408
+ --_article: var(--article-xl);
409
+ }
410
+
411
+ :where(:is(.container, [class*=":container"])[data-variant="article"])[data-container="full"] {
412
+ --_article: var(--article-full);
413
+ }
414
+
415
+ :where(:is(.container, [class*=":container"])[data-variant="article"])[data-container="bleed"] {
416
+ --_article: var(--article-bleed);
417
+ }
418
+
419
+ /* Responsive article variants — reading width from the breakpoint up (min) or only
420
+ below it (max). Below a min variant's breakpoint the element is a plain block;
421
+ above a max variant's breakpoint it falls back to whatever else it carries. */
422
+ @container style(--is-breakpoint-xs: true) {
423
+ :where(.\@xs\:container[data-variant="article"]) {
424
+ inline-size: unset;
425
+ margin-inline: unset;
426
+ container-name: unset;
427
+ container-type: unset;
428
+ --_article: unset;
429
+ --_container-name: unset;
430
+ --_container-type: unset;
431
+ }
432
+ }
433
+
434
+ @container style(--is-breakpoint-sm: true) {
435
+ :where(.\@sm\:container[data-variant="article"]) {
436
+ --_container-name: article;
437
+ --_container-type: inline-size;
438
+
439
+ inline-size: min(
440
+ var(--_article, var(--default-article-inline-size)),
441
+ 100% - var(--gutters) * 2
442
+ );
443
+ margin-inline: auto;
444
+ container-name: var(--_container-name);
445
+ container-type: var(--_container-type);
446
+ }
447
+ }
448
+
449
+ @container style(--is-breakpoint-md: true) {
450
+ :where(.\@md\:container[data-variant="article"]) {
451
+ --_container-name: article;
452
+ --_container-type: inline-size;
453
+
454
+ inline-size: min(
455
+ var(--_article, var(--default-article-inline-size)),
456
+ 100% - var(--gutters) * 2
457
+ );
458
+ margin-inline: auto;
459
+ container-name: var(--_container-name);
460
+ container-type: var(--_container-type);
461
+ }
462
+ }
463
+
464
+ @container style(--is-breakpoint-lg: true) {
465
+ :where(.\@lg\:container[data-variant="article"]) {
466
+ --_container-name: article;
467
+ --_container-type: inline-size;
468
+
469
+ inline-size: min(
470
+ var(--_article, var(--default-article-inline-size)),
471
+ 100% - var(--gutters) * 2
472
+ );
473
+ margin-inline: auto;
474
+ container-name: var(--_container-name);
475
+ container-type: var(--_container-type);
476
+ }
477
+ }
478
+
479
+ @container style(--is-breakpoint-xl: true) {
480
+ :where(.\@xl\:container[data-variant="article"]) {
481
+ --_container-name: article;
482
+ --_container-type: inline-size;
483
+
484
+ inline-size: min(
485
+ var(--_article, var(--default-article-inline-size)),
486
+ 100% - var(--gutters) * 2
487
+ );
488
+ margin-inline: auto;
489
+ container-name: var(--_container-name);
490
+ container-type: var(--_container-type);
491
+ }
492
+ }
493
+
494
+ @container style(--is-breakpoint-xs: false) {
495
+ :where(.\@max-xs\:container[data-variant="article"]) {
496
+ --_container-name: article;
497
+ --_container-type: inline-size;
498
+
499
+ inline-size: min(
500
+ var(--_article, var(--default-article-inline-size)),
501
+ 100% - var(--gutters) * 2
502
+ );
503
+ margin-inline: auto;
504
+ container-name: var(--_container-name);
505
+ container-type: var(--_container-type);
506
+ }
507
+ }
508
+
509
+ @container style(--is-breakpoint-sm: false) {
510
+ :where(.\@max-sm\:container[data-variant="article"]) {
511
+ --_container-name: article;
512
+ --_container-type: inline-size;
513
+
514
+ inline-size: min(
515
+ var(--_article, var(--default-article-inline-size)),
516
+ 100% - var(--gutters) * 2
517
+ );
518
+ margin-inline: auto;
519
+ container-name: var(--_container-name);
520
+ container-type: var(--_container-type);
521
+ }
522
+ }
523
+
524
+ @container style(--is-breakpoint-md: false) {
525
+ :where(.\@max-md\:container[data-variant="article"]) {
526
+ --_container-name: article;
527
+ --_container-type: inline-size;
528
+
529
+ inline-size: min(
530
+ var(--_article, var(--default-article-inline-size)),
531
+ 100% - var(--gutters) * 2
532
+ );
533
+ margin-inline: auto;
534
+ container-name: var(--_container-name);
535
+ container-type: var(--_container-type);
536
+ }
537
+ }
538
+
539
+ @container style(--is-breakpoint-lg: false) {
540
+ :where(.\@max-lg\:container[data-variant="article"]) {
541
+ --_container-name: article;
542
+ --_container-type: inline-size;
543
+
544
+ inline-size: min(
545
+ var(--_article, var(--default-article-inline-size)),
546
+ 100% - var(--gutters) * 2
547
+ );
548
+ margin-inline: auto;
549
+ container-name: var(--_container-name);
550
+ container-type: var(--_container-type);
551
+ }
552
+ }
553
+
554
+ @container style(--is-breakpoint-xl: false) {
555
+ :where(.\@max-xl\:container[data-variant="article"]) {
556
+ --_container-name: article;
557
+ --_container-type: inline-size;
558
+
559
+ inline-size: min(
560
+ var(--_article, var(--default-article-inline-size)),
561
+ 100% - var(--gutters) * 2
562
+ );
563
+ margin-inline: auto;
564
+ container-name: var(--_container-name);
565
+ container-type: var(--_container-type);
566
+ }
567
+ }
568
+ }