layout-style-css 1.1.2 → 2.0.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 (110) hide show
  1. package/CHANGELOG.md +33 -8
  2. package/CONTRIBUTING.md +12 -7
  3. package/README.md +231 -636
  4. package/SECURITY.md +11 -6
  5. package/demo/demo.css +523 -0
  6. package/demo/demo.js +520 -0
  7. package/demo/index.html +323 -976
  8. package/demo/site.webmanifest +1 -1
  9. package/demo/sitemap.xml +1 -1
  10. package/dist/core.css +6 -0
  11. package/dist/{layout-ui-style-kit-bridge.css → integrations/ui-style-kit.css} +13 -8
  12. package/dist/layout-style-css.css +1473 -1903
  13. package/dist/layout-style-css.min.css +1 -1
  14. package/dist/legacy.css +787 -0
  15. package/dist/personalities/bauhaus.css +46 -0
  16. package/dist/personalities/bento.css +43 -0
  17. package/dist/personalities/brutalism.css +36 -0
  18. package/dist/personalities/cyberpunk.css +36 -0
  19. package/dist/personalities/f-pattern.css +48 -0
  20. package/dist/personalities/maximalist.css +51 -0
  21. package/dist/personalities/minimal-saas.css +37 -0
  22. package/dist/personalities/mondrian.css +44 -0
  23. package/dist/personalities/neumorphism.css +46 -0
  24. package/dist/personalities/retro-glass.css +44 -0
  25. package/dist/personalities/retrofuturism.css +36 -0
  26. package/dist/personalities/split-screen.css +41 -0
  27. package/dist/personalities/synthwave.css +48 -0
  28. package/dist/personalities/tactile.css +39 -0
  29. package/dist/personalities/y2k.css +36 -0
  30. package/dist/personalities/z-pattern.css +49 -0
  31. package/dist/personalities.css +18 -0
  32. package/dist/primitives.css +219 -0
  33. package/dist/recipes.css +270 -0
  34. package/dist/utilities.css +162 -0
  35. package/dist/wrappers.css +174 -0
  36. package/docs/wiki/Contributing.md +36 -30
  37. package/docs/wiki/Demo-And-GitHub-Pages.md +53 -39
  38. package/docs/wiki/Getting-Started.md +51 -68
  39. package/docs/wiki/Home.md +33 -48
  40. package/docs/wiki/Installation-And-CDN.md +73 -58
  41. package/docs/wiki/Layout-Primitives.md +48 -57
  42. package/docs/wiki/Layout-Recipes.md +49 -80
  43. package/docs/wiki/Layout-Styles.md +33 -43
  44. package/docs/wiki/Migrating-To-2.0.md +186 -0
  45. package/docs/wiki/Release-And-Publishing.md +75 -69
  46. package/docs/wiki/Security-And-Support.md +36 -34
  47. package/docs/wiki/UI-Style-Kit-Compatibility.md +50 -54
  48. package/docs/wiki/_Sidebar.md +15 -14
  49. package/package.json +36 -45
  50. package/styles/core.css +6 -0
  51. package/styles/{layout-ui-style-kit-bridge.css → integrations/ui-style-kit.css} +13 -8
  52. package/styles/legacy.css +173 -0
  53. package/styles/personalities/bauhaus.css +46 -0
  54. package/styles/personalities/bento.css +43 -0
  55. package/styles/personalities/brutalism.css +36 -0
  56. package/styles/personalities/cyberpunk.css +36 -0
  57. package/styles/personalities/f-pattern.css +48 -0
  58. package/styles/personalities/maximalist.css +51 -0
  59. package/styles/personalities/minimal-saas.css +37 -0
  60. package/styles/personalities/mondrian.css +44 -0
  61. package/styles/personalities/neumorphism.css +46 -0
  62. package/styles/personalities/retro-glass.css +44 -0
  63. package/styles/personalities/retrofuturism.css +36 -0
  64. package/styles/personalities/split-screen.css +41 -0
  65. package/styles/personalities/synthwave.css +48 -0
  66. package/styles/personalities/tactile.css +39 -0
  67. package/styles/personalities/y2k.css +36 -0
  68. package/styles/personalities/z-pattern.css +49 -0
  69. package/styles/personalities.css +18 -0
  70. package/styles/primitives.css +219 -0
  71. package/styles/recipes.css +270 -0
  72. package/styles/utilities.css +162 -0
  73. package/styles/wrappers.css +174 -0
  74. package/dist/layout-all-with-ui-kit-and-interactive-surface.css +0 -3
  75. package/dist/layout-all-with-ui-kit.css +0 -2
  76. package/dist/layout-all.css +0 -18
  77. package/dist/layout-base.css +0 -539
  78. package/dist/layout-style-bauhaus.css +0 -70
  79. package/dist/layout-style-bento.css +0 -76
  80. package/dist/layout-style-brutalism.css +0 -70
  81. package/dist/layout-style-cyberpunk.css +0 -70
  82. package/dist/layout-style-f-pattern.css +0 -76
  83. package/dist/layout-style-maximalist.css +0 -93
  84. package/dist/layout-style-minimal-saas.css +0 -67
  85. package/dist/layout-style-mondrian.css +0 -77
  86. package/dist/layout-style-neumorphism.css +0 -72
  87. package/dist/layout-style-retro-glass.css +0 -82
  88. package/dist/layout-style-retrofuturism.css +0 -71
  89. package/dist/layout-style-split-screen.css +0 -62
  90. package/dist/layout-style-synthwave.css +0 -88
  91. package/dist/layout-style-tactile.css +0 -70
  92. package/dist/layout-style-y2k.css +0 -72
  93. package/dist/layout-style-z-pattern.css +0 -76
  94. package/styles/layout-base.css +0 -539
  95. package/styles/layout-style-bauhaus.css +0 -70
  96. package/styles/layout-style-bento.css +0 -76
  97. package/styles/layout-style-brutalism.css +0 -70
  98. package/styles/layout-style-cyberpunk.css +0 -70
  99. package/styles/layout-style-f-pattern.css +0 -76
  100. package/styles/layout-style-maximalist.css +0 -93
  101. package/styles/layout-style-minimal-saas.css +0 -67
  102. package/styles/layout-style-mondrian.css +0 -77
  103. package/styles/layout-style-neumorphism.css +0 -72
  104. package/styles/layout-style-retro-glass.css +0 -82
  105. package/styles/layout-style-retrofuturism.css +0 -71
  106. package/styles/layout-style-split-screen.css +0 -62
  107. package/styles/layout-style-synthwave.css +0 -88
  108. package/styles/layout-style-tactile.css +0 -70
  109. package/styles/layout-style-y2k.css +0 -72
  110. package/styles/layout-style-z-pattern.css +0 -76
package/README.md CHANGED
@@ -1,636 +1,231 @@
1
- # layout-style-css
2
-
3
- Responsive CSS layout primitives for shell-first interfaces.
4
-
5
- `layout-style-css` gives applications a small, predictable composition layer: wrappers, app shells, grids, panes, sidebars, split sections, spacing utilities, and switchable layout personalities. It is designed to pair with `ui-style-kit-css@2.0.1`, while keeping layout decisions independent from visual theme decisions.
6
-
7
- ## Documentation And Wiki
8
-
9
- The versioned wiki source lives in this repository so docs can be reviewed with code changes and shipped with the npm package:
10
-
11
- | Resource | Use it for |
12
- | --- | --- |
13
- | [Wiki home](docs/wiki/Home.md) | Release overview and navigation. |
14
- | [Getting started](docs/wiki/Getting-Started.md) | First install, first shell, and switching layouts. |
15
- | [Installation and CDN](docs/wiki/Installation-And-CDN.md) | npm, bundler, CDN, and package entrypoint guidance. |
16
- | [Layout primitives](docs/wiki/Layout-Primitives.md) | Wrapper, shell, grid, pane, frame, and utility contracts. |
17
- | [Layout recipes](docs/wiki/Layout-Recipes.md) | Copyable app shell, button group, card grid, gallery, and carousel patterns. |
18
- | [Layout styles](docs/wiki/Layout-Styles.md) | All layout personalities, including F-Pattern, Z-Pattern, Split-Screen, Mondrian, and Synthwave. |
19
- | [UI Style Kit compatibility](docs/wiki/UI-Style-Kit-Compatibility.md) | Prefix aliases and the boundary between structure and visual styling. |
20
- | [Demo and GitHub Pages](docs/wiki/Demo-And-GitHub-Pages.md) | Demo QA, Pages artifact behavior, and deployment setup. |
21
- | [Release and publishing](docs/wiki/Release-And-Publishing.md) | v1.1.2 release checklist, npm verification, and tag guidance. |
22
- | [Security and support](docs/wiki/Security-And-Support.md) | Security model, supported versions, and reporting path. |
23
- | [Contributing](docs/wiki/Contributing.md) | Local development, CSS rules, and review expectations. |
24
- | [Wiki sidebar source](docs/wiki/_Sidebar.md) | Navigation file for a GitHub Wiki mirror. |
25
- | [Changelog](CHANGELOG.md) | Version history. |
26
- | [Project contributing guide](CONTRIBUTING.md) | Repository-level contribution workflow. |
27
- | [Security policy](SECURITY.md) | Repository-level security policy. |
28
-
29
- ## Why It Exists
30
-
31
- Modern UI systems often mix two concerns:
32
-
33
- - visual design: color, typography, borders, shadows, native controls, focus states, and modes
34
- - spatial design: wrappers, page width, shell regions, pane ratios, sidebar placement, grid behavior, and responsive collapse
35
-
36
- This package owns the spatial layer only. That separation lets you change layout personality without rewriting markup or duplicating your theme system.
37
-
38
- ## Install
39
-
40
- Use as a standalone layout system with all styles or just one layout personality.
41
-
42
- ```bash
43
- # Install the full layout system
44
- npm install layout-style-css@1.1.2
45
- ```
46
-
47
- Then import whichever CSS entrypoints you need:
48
-
49
- ```js
50
- import "layout-style-css/base.css";
51
- import "layout-style-css/minimal-saas.css";
52
- ```
53
-
54
- Pair with UI Style Kit CSS for a complete layout and visual system. Themes and layouts can mix and match UI styles. Set the vibe with color schemes that offer a range of moods, from minimal to maximal, from Bauhaus to Brutalism.
55
-
56
- ```bash
57
- npm install layout-style-css@1.1.2 ui-style-kit-css@2.0.1
58
- ```
59
-
60
- Additionally installing Interactive Surface CSS sets you up with a complete reactive layout and surface system.
61
-
62
- ```bash
63
- npm install layout-style-css@1.1.2 ui-style-kit-css@2.0.1 interactive-surface-css@1.2.5
64
- ```
65
-
66
- ## Quick Start
67
-
68
- Import UI Style Kit first, then the layout CSS:
69
-
70
- ```js
71
- import "interactive-surface-css/interactive-surface.css";
72
- import "ui-style-kit-css/with-bridge.css";
73
- import "layout-style-css/bridge.css";
74
- ```
75
-
76
- For a direct three-library setup, import each CSS entrypoint explicitly:
77
-
78
- ```js
79
- import "ui-style-kit-css/with-bridge.css";
80
- import "interactive-surface-css/interactive-surface.css";
81
- import "layout-style-css/bridge.css";
82
- import "layout-style-css";
83
- ```
84
-
85
- Use one root element for UI style, layout style, theme, and mode:
86
-
87
- ```html
88
- <body
89
- class="ly-root"
90
- data-ui="retro-glass"
91
- data-layout="cyberpunk"
92
- data-theme="ocean-steel"
93
- data-mode="auto"
94
- >
95
- <div class="ly-app-shell">
96
- <aside class="ly-app-sidebar ly-pad-6">Navigation</aside>
97
- <header class="ly-app-header ly-pad-4">Toolbar</header>
98
- <main class="ly-app-main">
99
- <section class="ly-wrapper ly-wrapper--wide ly-section ly-stack">
100
- <h1>Dashboard</h1>
101
- <div class="ly-grid ly-grid--auto">
102
- <article class="ly-surface ly-pad-6">Revenue</article>
103
- <article class="ly-surface ly-pad-6">Pipeline</article>
104
- <article class="ly-surface ly-pad-6">Retention</article>
105
- </div>
106
- </section>
107
- </main>
108
- </div>
109
- </body>
110
- ```
111
-
112
- ## CDN Usage
113
-
114
- Layout-only CDN entry:
115
-
116
- ```html
117
- <link rel="stylesheet" href="https://unpkg.com/layout-style-css@1/dist/layout-style-css.min.css">
118
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layout-style-css@1/dist/layout-style-css.min.css">
119
- ```
120
-
121
- Recommended CDN pairing with UI Style Kit and Interactive Surface:
122
-
123
- ```html
124
- <link rel="stylesheet" href="https://unpkg.com/ui-style-kit-css@2.0.1/dist/ui-style-kit.with-bridge.min.css">
125
- <link rel="stylesheet" href="https://unpkg.com/layout-style-css@1/dist/layout-style-css.min.css">
126
- <link rel="stylesheet" href="https://unpkg.com/interactive-surface-css@1.2.5/dist/interactive-surface.min.css">
127
- ```
128
-
129
- ## Import Options
130
-
131
- | Import | Use case |
132
- | --- | --- |
133
- | `import "layout-style-css";` | Full flattened layout-only CSS. |
134
- | `import "layout-style-css/min.css";` | Minified layout-only CSS. |
135
- | `import "layout-style-css/all.css";` | Import-based bundle for all layout files. |
136
- | `import "layout-style-css/base.css";` | Base primitives only. |
137
- | `import "layout-style-css/minimal-saas.css";` | One layout personality; the same pattern works for every layout style export. |
138
- | `import "layout-style-css/all-with-ui-kit.css";` | UI Style Kit plus all layouts. |
139
- | `import "layout-style-css/all-with-ui-kit-and-interactive-surface.css";` | UI Style Kit, Interactive Surface, and all layouts. |
140
-
141
- The three-library aggregate imports in this order:
142
-
143
- ```css
144
- @import url("ui-style-kit-css/with-bridge.css");
145
- @import url("interactive-surface-css/interactive-surface.css");
146
- @import url("./layout-all.css");
147
- ```
148
-
149
- ## UI Style Kit Naming Compatibility
150
-
151
- Use the aggregate import when a project wants UI Style Kit visuals and Layout Style CSS structure from one package entry:
152
-
153
- ```js
154
- import "layout-style-css/all-with-ui-kit.css";
155
- ```
156
-
157
- The bridge intentionally aliases structural classes and layout recipes only. UI Style Kit still owns component paint, typography, borders, shadows, native controls, focus states, themes, and modes.
158
-
159
- Supported UI-style prefixes are `saas`, `bento`, `max`, `bau`, `tactile`, `neo`, `retro`, `brutal`, `cyber`, `y2k`, and `rg`.
160
-
161
- | Alias pattern | Maps to |
162
- | --- | --- |
163
- | `<prefix>-container` | `.ly-wrapper` |
164
- | `<prefix>-section` | `.ly-section` |
165
- | `<prefix>-stack` | `.ly-stack` |
166
- | `<prefix>-cluster` | `.ly-cluster` |
167
- | `<prefix>-grid` | `.ly-grid` |
168
- | `<prefix>-split` | `.ly-split` |
169
- | `<prefix>-button-group` | `.ly-button-group` |
170
- | `<prefix>-card-grid` | `.ly-card-grid` |
171
- | `<prefix>-card-sm`, `<prefix>-card-md`, `<prefix>-card-lg` | `.ly-card-sm`, `.ly-card-md`, `.ly-card-lg` |
172
- | `<prefix>-gallery` | `.ly-gallery` |
173
- | `<prefix>-carousel` | `.ly-carousel` |
174
-
175
- Example:
176
-
177
- ```html
178
- <section class="saas-container saas-section">
179
- <div class="saas-card-grid">
180
- <article class="saas-card ly-card-md">Metric</article>
181
- <article class="saas-card ly-card-md">Metric</article>
182
- <article class="saas-card ly-card-md">Metric</article>
183
- </div>
184
-
185
- <div class="saas-button-group">
186
- <button class="saas-button">Save</button>
187
- <button class="saas-button-secondary">Export</button>
188
- </div>
189
- </section>
190
- ```
191
-
192
- ## Responsive Wrapper API
193
-
194
- Use `.ly-wrapper` for new markup. `.ly-container` remains supported for compatibility.
195
-
196
- | Class | Purpose |
197
- | --- | --- |
198
- | `.ly-wrapper` / `.ly-container` | Responsive centered content wrapper. |
199
- | `.ly-wrapper--sm` / `.ly-container--sm` | Small wrapper, up to `40rem`. |
200
- | `.ly-wrapper--md` / `.ly-container--md` | Medium wrapper, up to `56rem`. |
201
- | `.ly-wrapper--lg` / `.ly-container--lg` | Large wrapper, up to `72rem`. |
202
- | `.ly-wrapper--xl` / `.ly-container--xl` | Extra-large wrapper, up to `88rem`. |
203
- | `.ly-wrapper--wide` / `.ly-container--wide` | Wide wrapper, up to `112rem`. |
204
- | `.ly-wrapper--fluid` / `.ly-container--fluid` | Full-width wrapper with responsive inline padding. |
205
- | `.ly-wrapper--readable` | Readable content wrapper based on `68ch`. |
206
-
207
- Wrappers are mobile-first and tested against:
208
-
209
- - mobile portrait and landscape
210
- - tablet portrait and landscape
211
- - desktop resize behavior
212
- - wide desktop
213
-
214
- ## Layout Recipes
215
-
216
- Recipes are recommended class combinations, not separate theme files. They keep the public API small while making common layouts easy to copy.
217
-
218
- ### App Shell
219
-
220
- Use for dashboards, admin tools, and multi-region product screens.
221
-
222
- ```html
223
- <div class="ly-app-shell">
224
- <aside class="ly-app-sidebar ly-pad-6">Navigation</aside>
225
- <header class="ly-app-header ly-pad-4">Toolbar</header>
226
- <main class="ly-app-main">
227
- <section class="ly-wrapper ly-wrapper--wide ly-section">Workspace</section>
228
- </main>
229
- </div>
230
- ```
231
-
232
- ### Content Page
233
-
234
- Use for docs, articles, policy pages, and focused editorial content.
235
-
236
- ```html
237
- <main class="ly-main">
238
- <article class="ly-wrapper ly-wrapper--readable ly-section ly-stack">
239
- <h1>Documentation</h1>
240
- <p>Readable content stays centered and responsive.</p>
241
- </article>
242
- </main>
243
- ```
244
-
245
- ### Dashboard Grid
246
-
247
- Use for metric cards and repeated operational surfaces.
248
-
249
- ```html
250
- <section class="ly-wrapper ly-wrapper--wide ly-section">
251
- <div class="ly-grid ly-grid--auto">
252
- <article class="ly-surface ly-pad-6">Metric</article>
253
- <article class="ly-surface ly-pad-6">Metric</article>
254
- <article class="ly-surface ly-pad-6">Metric</article>
255
- </div>
256
- </section>
257
- ```
258
-
259
- ### Split Hero
260
-
261
- Use when a message needs a supporting panel, preview, form, or media frame.
262
-
263
- ```html
264
- <section class="ly-wrapper ly-wrapper--xl ly-section">
265
- <div class="ly-split">
266
- <div class="ly-stack">
267
- <h1>Primary message</h1>
268
- <p>Supporting copy.</p>
269
- </div>
270
- <aside class="ly-frame ly-surface ly-pad-6">Preview</aside>
271
- </div>
272
- </section>
273
- ```
274
-
275
- ### Docs Sidebar
276
-
277
- Use for local filters, table of contents, and secondary navigation.
278
-
279
- ```html
280
- <section class="ly-wrapper ly-wrapper--wide ly-section">
281
- <div class="ly-sidebar-layout">
282
- <aside class="ly-sidebar ly-surface ly-pad-5">Contents</aside>
283
- <article class="ly-content ly-surface ly-pad-6">Documentation body</article>
284
- </div>
285
- </section>
286
- ```
287
-
288
- ### List Detail
289
-
290
- Use for inboxes, editors, queues, and preview workflows.
291
-
292
- ```html
293
- <section class="ly-wrapper ly-wrapper--wide ly-section">
294
- <div class="ly-panes ly-panes--two">
295
- <aside class="ly-surface ly-pad-5 ly-scroll-area">List</aside>
296
- <article class="ly-surface ly-pad-6">Detail</article>
297
- </div>
298
- </section>
299
- ```
300
-
301
- ### Button Group
302
-
303
- Use for responsive action rows that should wrap without forcing buttons to full-width.
304
-
305
- ```html
306
- <div class="ly-button-group">
307
- <button class="saas-button">Save</button>
308
- <button class="saas-button-secondary">Preview</button>
309
- <button class="saas-button-secondary">Export</button>
310
- </div>
311
- ```
312
-
313
- ### Card Grid
314
-
315
- Use for repeated cards that need a resilient auto-fit layout.
316
-
317
- ```html
318
- <div class="ly-card-grid">
319
- <article class="saas-card ly-card-md">Plan</article>
320
- <article class="saas-card ly-card-md">Plan</article>
321
- <article class="saas-card ly-card-md">Plan</article>
322
- </div>
323
- ```
324
-
325
- The same structure can use UI-prefix aliases such as `.saas-card-grid`:
326
-
327
- ```html
328
- <div class="saas-card-grid">
329
- <article class="saas-card saas-card-md">Plan</article>
330
- <article class="saas-card saas-card-md">Plan</article>
331
- </div>
332
- ```
333
-
334
- ### Card Size
335
-
336
- Use card size helpers when a repeated surface needs consistent minimum block sizing.
337
-
338
- ```html
339
- <article class="ly-surface ly-card-sm">Compact card</article>
340
- <article class="ly-surface ly-card-md">Standard card</article>
341
- <article class="ly-surface ly-card-lg">Feature card</article>
342
- ```
343
-
344
- ### Gallery
345
-
346
- Use for responsive media or object grids. Pair it with `.ly-frame` to keep ratios stable.
347
-
348
- ```html
349
- <div class="ly-gallery">
350
- <figure class="ly-frame ly-frame-4x3">Media</figure>
351
- <figure class="ly-frame ly-frame-4x3">Media</figure>
352
- <figure class="ly-frame ly-frame-4x3">Media</figure>
353
- </div>
354
- ```
355
-
356
- ### Carousel
357
-
358
- Use for horizontal groups that need scroll snapping without adding visual chrome.
359
-
360
- ```html
361
- <div class="ly-carousel">
362
- <article class="ly-surface ly-card-md">Step one</article>
363
- <article class="ly-surface ly-card-md">Step two</article>
364
- <article class="ly-surface ly-card-md">Step three</article>
365
- </div>
366
- ```
367
-
368
- ### Frame And Scroll
369
-
370
- Use frames for predictable media ratios and scroll areas for bounded panes.
371
-
372
- ```html
373
- <div class="ly-frame ly-frame-16x9">Preview</div>
374
- <aside class="ly-scroll-area ly-overflow-auto">Scrollable content</aside>
375
- ```
376
-
377
- ## Base Primitives
378
-
379
- | Class | Purpose |
380
- | --- | --- |
381
- | `.ly-root` | Scope root for layout variables and resets. |
382
- | `.ly-page` | Full-height page wrapper. |
383
- | `.ly-header`, `.ly-footer`, `.ly-main` | Basic document regions. |
384
- | `.ly-wrapper`, `.ly-container` | Responsive content wrappers. |
385
- | `.ly-section` | Vertical section spacing. |
386
- | `.ly-stack` | Vertical rhythm. |
387
- | `.ly-cluster` | Wrapping horizontal group. |
388
- | `.ly-grid` | CSS Grid foundation. |
389
- | `.ly-grid--auto` | Responsive auto-fit grid. |
390
- | `.ly-button-group` | Wrapping action group with stable child sizing. |
391
- | `.ly-card-grid` | Auto-fit card grid recipe. |
392
- | `.ly-card-sm`, `.ly-card-md`, `.ly-card-lg` | Consistent minimum card block sizes. |
393
- | `.ly-gallery` | Responsive gallery grid recipe. |
394
- | `.ly-carousel` | Horizontal scroll-snap recipe. |
395
- | `.ly-row`, `.ly-col`, `.ly-col-*` | Flex row and column utilities. |
396
- | `.ly-app-shell` | Header/sidebar/main shell. |
397
- | `.ly-app-header`, `.ly-app-sidebar`, `.ly-app-main` | App shell regions. |
398
- | `.ly-sidebar-layout` | Local content/sidebar layout. |
399
- | `.ly-split` | Responsive two-part split. |
400
- | `.ly-panes`, `.ly-panes--two`, `.ly-panes--three` | Adaptive pane layouts. |
401
- | `.ly-surface` | Layout wrapper surface; paint remains owned by the UI system. |
402
- | `.ly-frame` | Aspect-ratio media or content frame. |
403
-
404
- ## Utility API
405
-
406
- Utilities are composition-only. They set layout variables, spacing, flow, visibility, overflow, or frame ratios without introducing colors, fonts, shadows, borders, or theme-specific visuals.
407
-
408
- ### Grid Columns And Spans
409
-
410
- | Class group | Purpose |
411
- | --- | --- |
412
- | `.ly-cols-1` through `.ly-cols-12`, `.ly-cols-16` | Set the base grid column count. |
413
- | `.ly-md-cols-{1,2,3,4,6,8,12,16}` | Change grid column count from the tablet breakpoint up. |
414
- | `.ly-lg-cols-{1,2,3,4,6,8,12,16}` | Change grid column count from the desktop breakpoint up. |
415
- | `.ly-span-1` through `.ly-span-16` | Span a grid item across a fixed number of tracks. |
416
- | `.ly-span-full` | Span a grid item across the full grid. |
417
-
418
- ### Flex Columns
419
-
420
- | Class group | Purpose |
421
- | --- | --- |
422
- | `.ly-row` | Flex row with wrapped columns and negative gutter compensation. |
423
- | `.ly-col` | Flexible column that shares available space. |
424
- | `.ly-col-1` through `.ly-col-12` | Percentage-based column widths on the 12-column scale. |
425
-
426
- ### Spacing
427
-
428
- | Class group | Purpose |
429
- | --- | --- |
430
- | `.ly-gap-0` through `.ly-gap-9` | Set shared layout, grid, stack, and cluster gaps. |
431
- | `.ly-pad-0` through `.ly-pad-9` | Set all-side padding from the layout spacing scale. |
432
- | `.ly-px-4`, `.ly-px-6`, `.ly-px-8` | Set inline padding. |
433
- | `.ly-py-4`, `.ly-py-6`, `.ly-py-8` | Set block padding. |
434
- | `.ly-mx-auto` | Center with automatic inline margins. |
435
-
436
- ### Sizing, Overflow, And Alignment
437
-
438
- | Class group | Purpose |
439
- | --- | --- |
440
- | `.ly-w-full`, `.ly-h-full` | Force full inline or block size. |
441
- | `.ly-min-h-screen` | Set minimum viewport-height section sizing with `100svh`. |
442
- | `.ly-bleed` | Break a section out to viewport width. |
443
- | `.ly-overflow-auto`, `.ly-overflow-hidden` | Control overflow behavior. |
444
- | `.ly-items-start`, `.ly-items-center`, `.ly-items-end`, `.ly-items-stretch` | Align children on the cross axis. |
445
- | `.ly-justify-start`, `.ly-justify-center`, `.ly-justify-end`, `.ly-justify-between` | Distribute children on the main axis. |
446
-
447
- ### Frames And Visibility
448
-
449
- | Class group | Purpose |
450
- | --- | --- |
451
- | `.ly-frame-1x1`, `.ly-frame-2x1`, `.ly-frame-3x2`, `.ly-frame-4x3`, `.ly-frame-16x9`, `.ly-frame-21x9` | Set common media/content aspect ratios. |
452
- | `.ly-hidden` | Hide an element. |
453
- | `.ly-show-md-up` | Reveal an element from the tablet breakpoint up. |
454
- | `.ly-show-lg-up` | Reveal an element from the desktop breakpoint up. |
455
- | `.ly-visually-hidden` | Hide content visually while keeping it available to assistive technology. |
456
-
457
- ## Layout Styles
458
-
459
- Each layout style file targets layout selectors only. It does not key off `data-ui`, so `data-ui="cyberpunk"` can pair with `data-layout="maximalist"` without forcing a cyberpunk shell.
460
-
461
- | Layout style | File | Shell behavior |
462
- | --- | --- | --- |
463
- | `minimal-saas` | `layout-style-minimal-saas.css` | Steady left-rail SaaS shell with compact content bands and predictable pane ratios. |
464
- | `bento` | `layout-style-bento.css` | Modular dashboard shell with staged mosaic zones, dense grids, and tile-like support panels. |
465
- | `maximalist` | `layout-style-maximalist.css` | Editorial shell with oversized hero splits, offset support rails, and staggered regions. |
466
- | `bauhaus` | `layout-style-bauhaus.css` | Strict framed column shell with visible structural rails, square surfaces, and modular panes. |
467
- | `tactile` | `layout-style-tactile.css` | Instrument-panel shell with a heavier support dock, control-deck panes, and chunky spacing. |
468
- | `neumorphism` | `layout-style-neumorphism.css` | Centered island shell with detached support regions and roomy split composition. |
469
- | `retrofuturism` | `layout-style-retrofuturism.css` | Panoramic bridge shell with wide stages, symmetric pods, and horizontal workspace flow. |
470
- | `brutalism` | `layout-style-brutalism.css` | Full-bleed slab shell with hard sectional breaks, abrupt pane cuts, and raw support rails. |
471
- | `cyberpunk` | `layout-style-cyberpunk.css` | Narrow utility rail with dense command workspace, compact gutters, and clipped panels. |
472
- | `y2k` | `layout-style-y2k.css` | Centered hub shell with floating window rhythm and dock-like support regions. |
473
- | `retro-glass` | `layout-style-retro-glass.css` | Top-framed glass shell with a floating right utility rail and layered panes. |
474
- | `f-pattern` | `layout-style-f-pattern.css` | F-Pattern scan path with a top band, persistent left rail, and heavier early content rows. |
475
- | `z-pattern` | `layout-style-z-pattern.css` | Z-Pattern scan path that leads from a broad header into primary content and a right support rail. |
476
- | `split-screen` | `layout-style-split-screen.css` | Split-Screen shell that gives main and support regions equal competing weight. |
477
- | `mondrian` | `layout-style-mondrian.css` | Mondrian block composition with asymmetrical rectangular spans and compact gaps. |
478
- | `synthwave` | `layout-style-synthwave.css` | Synthwave stage composition with wide cinematic content, dock-like support areas, and horizontal preview rhythm. |
479
-
480
- ## Mix And Match Contract
481
-
482
- Matching UI and layout names are good defaults:
483
-
484
- ```html
485
- data-ui="bento" data-layout="bento"
486
- ```
487
-
488
- Mixed combinations are supported:
489
-
490
- ```html
491
- data-ui="cyberpunk" data-layout="maximalist" data-theme="arctic-indigo" data-mode="dark"
492
- data-ui="bauhaus" data-layout="retro-glass" data-theme="graphite-cyan" data-mode="dark"
493
- data-ui="minimal-saas" data-layout="bento" data-theme="ocean-steel" data-mode="light"
494
- data-ui="brutalism" data-layout="cyberpunk" data-theme="midnight-gold" data-mode="contrast"
495
- data-ui="cyberpunk" data-layout="synthwave" data-theme="cyber-lime" data-mode="dark"
496
- data-ui="bauhaus" data-layout="mondrian" data-theme="graphite-cyan" data-mode="contrast"
497
- ```
498
-
499
- Supported layout selectors:
500
-
501
- ```html
502
- data-layout="maximalist"
503
- layout-style="maximalist"
504
- class="ly-layout-maximalist"
505
- class="ly-style-maximalist"
506
- ```
507
-
508
- Runtime switching:
509
-
510
- ```js
511
- const root = document.body;
512
-
513
- root.dataset.ui = "cyberpunk";
514
- root.dataset.layout = "maximalist";
515
- root.setAttribute("layout-style", "maximalist");
516
- root.dataset.theme = "arctic-indigo";
517
- root.dataset.mode = "dark";
518
- ```
519
-
520
- ## Demo And GitHub Pages
521
-
522
- The demo lives in `demo/index.html` for local development and package distribution.
523
-
524
- Build the GitHub Pages artifact:
525
-
526
- ```bash
527
- npm run pages:build
528
- ```
529
-
530
- The artifact is written to `output/github-pages/` and contains:
531
-
532
- - `index.html` at the Pages root
533
- - copied demo assets and metadata
534
- - generated `dist/` CSS
535
- - `.nojekyll`
536
-
537
- Before the workflow can deploy, enable GitHub Pages in repository Settings > Pages and set the source to GitHub Actions.
538
-
539
- The repository includes a GitHub Actions workflow that verifies the package, builds the artifact, uploads it, and deploys it to GitHub Pages from `main` or `workflow_dispatch`.
540
-
541
- ## Package Files
542
-
543
- ```txt
544
- styles/
545
- layout-base.css
546
- layout-ui-style-kit-bridge.css
547
- layout-style-*.css
548
- dist/
549
- layout-style-css.css
550
- layout-style-css.min.css
551
- layout-all.css
552
- layout-all-with-ui-kit.css
553
- layout-all-with-ui-kit-and-interactive-surface.css
554
- layout-base.css
555
- layout-ui-style-kit-bridge.css
556
- layout-style-*.css
557
- demo/
558
- index.html
559
- assets/
560
- scripts/
561
- build.mjs
562
- build-pages.mjs
563
- docs/wiki/
564
- Home.md
565
- *.md
566
- CHANGELOG.md
567
- CONTRIBUTING.md
568
- SECURITY.md
569
- ```
570
-
571
- `styles/` is the authored source. `dist/` and `output/github-pages/` are generated.
572
-
573
- ## Development
574
-
575
- ```bash
576
- npm install
577
- npm run build
578
- npm run lint
579
- npm test
580
- ```
581
-
582
- Run the complete release gate:
583
-
584
- ```bash
585
- npm run check
586
- ```
587
-
588
- The check command builds `dist/`, runs Stylelint, runs contract tests, runs responsive Playwright smoke checks against `demo/index.html`, validates the GitHub Pages artifact, and performs an npm pack dry-run.
589
-
590
- ## Publishing
591
-
592
- Before publishing:
593
-
594
- ```bash
595
- npm view layout-style-css@1.1.2 version --json
596
- npm run release:verify
597
- npm audit --audit-level=moderate
598
- ```
599
-
600
- Publish and verify:
601
-
602
- ```bash
603
- npm login
604
- npm publish --access public
605
- npm view layout-style-css@1.1.2
606
- ```
607
-
608
- After publish, verify these CDN URLs:
609
-
610
- ```txt
611
- https://unpkg.com/layout-style-css@1/dist/layout-style-css.min.css
612
- https://cdn.jsdelivr.net/npm/layout-style-css@1/dist/layout-style-css.min.css
613
- ```
614
-
615
- Tag the release as `v1.1.2` in `Foscat/layout-style-css`. The npm publish workflow runs when that release is published and can be recovered manually from Actions with `release_tag` set to `v1.1.2`.
616
-
617
- ## Compatibility
618
-
619
- - `ui-style-kit-css`: pinned peer at `2.0.1`
620
- - `interactive-surface-css`: optional peer at `1.2.5`
621
- - default npm and CDN entries: layout-only
622
-
623
- ## Extension Rules
624
-
625
- 1. Keep public layout classes prefixed with `ly-`.
626
- 2. Let `ui-style-kit-css` own colors, native controls, component look, focus states, typography, borders, shadows, and modes.
627
- 3. Put shared composition behavior in `styles/layout-base.css`.
628
- 4. Put layout-style-specific shell behavior in the matching `styles/layout-style-*.css` file.
629
- 5. Prefer changing layout variables before adding new public classes.
630
- 6. Treat recipes as documentation and demo patterns unless a repeated production need justifies a new class.
631
- 7. Test mobile portrait, mobile landscape, tablet portrait, tablet landscape, desktop resize, and wide desktop before promoting a new layout pattern.
632
-
633
- ## References
634
-
635
- - UI Style Kit CSS: https://github.com/Foscat/ui-style-kit-css
636
- - Interactive Surface CSS: https://github.com/Foscat/Interactive-Surface-CSS/
1
+ # layout-style-css
2
+
3
+ Container-first, dependency-free structural CSS for responsive application layouts.
4
+
5
+ `layout-style-css@2.0.0` provides semantic wrappers, composition primitives, seven functional recipes, ordering escape hatches, and sixteen spatial personalities. It owns layout only; color, typography, borders, shadows, component paint, and interactive states belong to other libraries.
6
+
7
+ ## Requirements
8
+
9
+ - Node.js 20 or newer for development and package scripts
10
+ - Current evergreen Chromium, Firefox, or WebKit for consumers
11
+ - No runtime or peer dependencies
12
+
13
+ `ui-style-kit-css@2.0.1` and `interactive-surface-css@1.4.0` are exact development and integration fixtures. They are not installed for consumers. A separate UI Style Kit revision is a follow-up and is not part of this release.
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ npm install layout-style-css@2.0.0
19
+ ```
20
+
21
+ Standalone use needs one import:
22
+
23
+ ```js
24
+ import "layout-style-css";
25
+ ```
26
+
27
+ The default and minified bundles contain the v2 core plus all personalities. Import focused modules when an application needs a smaller surface.
28
+
29
+ ## Ecosystem Imports
30
+
31
+ Layout Style never imports companion packages. Install and import each layer explicitly.
32
+
33
+ Layout plus UI Style Kit:
34
+
35
+ ```js
36
+ import "ui-style-kit-css/with-bridge.css";
37
+ import "layout-style-css/integrations/ui-style-kit.css";
38
+ import "layout-style-css";
39
+ ```
40
+
41
+ Layout plus UI Style Kit and Interactive Surface must use this order:
42
+
43
+ ```js
44
+ import "ui-style-kit-css/with-bridge.css";
45
+ import "interactive-surface-css/state-core.css";
46
+ import "layout-style-css/integrations/ui-style-kit.css";
47
+ import "layout-style-css";
48
+ ```
49
+
50
+ The UI Style Kit bridge establishes its visual tokens, Interactive Surface contributes interaction states, the Layout integration maps structural UI aliases, and Layout core applies spatial behavior.
51
+
52
+ ## Public Exports
53
+
54
+ | Import | Contents |
55
+ | --- | --- |
56
+ | `layout-style-css` | Full v2 core plus all personalities. |
57
+ | `layout-style-css/min.css` | Minified full v2 bundle. |
58
+ | `layout-style-css/core.css` | Wrappers, primitives, recipes, and utilities. |
59
+ | `layout-style-css/wrappers.css` | Tokens, reset, and semantic wrappers. |
60
+ | `layout-style-css/primitives.css` | Composition primitives. |
61
+ | `layout-style-css/recipes.css` | Seven named responsive recipes. |
62
+ | `layout-style-css/utilities.css` | Structural utilities and ordering escape hatches. |
63
+ | `layout-style-css/personalities.css` | All sixteen personalities. |
64
+ | `layout-style-css/personalities/minimal-saas.css` | One personality; substitute any public personality name. |
65
+ | `layout-style-css/integrations/ui-style-kit.css` | Import-free structural bridge for UI Style Kit names. |
66
+ | `layout-style-css/legacy.css` | Full v2 bundle plus v1 compatibility aliases. |
67
+
68
+ The old root-level personality files and `all-with-ui-kit*` aggregates were removed. See [Migrating To 2.0](docs/wiki/Migrating-To-2.0.md) for exact mappings.
69
+
70
+ ## Container-First Wrappers
71
+
72
+ Every `.ly-wrapper` has fluid logical gutters, safe-area compensation, and `container-type: inline-size`. The default is the `72rem` content measure. Personalities may change only the plain-wrapper default; an explicit semantic wrapper variant always retains its documented measure.
73
+
74
+ | Wrapper | Measure |
75
+ | --- | --- |
76
+ | `.ly-wrapper--compact` | `40rem` |
77
+ | `.ly-wrapper--prose` | `68ch` |
78
+ | `.ly-wrapper--content` | `72rem` and the default |
79
+ | `.ly-wrapper--wide` | `112rem` |
80
+ | `.ly-wrapper--full` | Full available inline size |
81
+ | `.ly-wrapper--breakout` | Content, feature, and full-width grid lanes |
82
+
83
+ ```html
84
+ <main class="ly-wrapper ly-wrapper--breakout">
85
+ <article data-ly-lane="content">Readable content</article>
86
+ <figure data-ly-lane="feature">Feature media</figure>
87
+ <section data-ly-lane="full">Full-width stage</section>
88
+ </main>
89
+ ```
90
+
91
+ Wrappers and recipe roots respond to the nearest container. The mobile single-column fallback is authoritative; core recipes and primitives enhance at the `48rem` and `64rem` core thresholds, not viewport widths. Personalities may introduce personality-specific thresholds to create a distinct spatial rhythm while preserving source order.
92
+
93
+ ## Recipes And Areas
94
+
95
+ Use `data-ly-recipe` as the semantic public hook. Each value is independently functional without a matching class; matching classes remain available as an equivalent direct-composition API.
96
+
97
+ - `app-shell`
98
+ - `dashboard`
99
+ - `docs`
100
+ - `list-detail`
101
+ - `split-hero`
102
+ - `gallery`
103
+ - `card-grid`
104
+
105
+ Named regions use `data-ly-area`: `header`, `nav`, `main`, `aside`, `footer`, `content`, `media`, `actions`, `primary`, and `secondary`.
106
+
107
+ ```html
108
+ <section class="ly-wrapper ly-wrapper--wide">
109
+ <div class="ly-dashboard" data-ly-recipe="dashboard">
110
+ <header data-ly-area="header">Dashboard</header>
111
+ <nav data-ly-area="nav" aria-label="Dashboard">Navigation</nav>
112
+ <main data-ly-area="main">Primary workspace</main>
113
+ <aside data-ly-area="aside">Supporting details</aside>
114
+ <footer data-ly-area="footer">Status</footer>
115
+ </div>
116
+ </section>
117
+ ```
118
+
119
+ Keep markup in the correct mobile DOM, reading, and focus order. Built-in recipes rearrange named grid areas at wider container sizes and never use CSS `order`.
120
+
121
+ ## Composition Primitives
122
+
123
+ The v2 composition layer includes:
124
+
125
+ | Primitive | Purpose |
126
+ | --- | --- |
127
+ | `.ly-stack`, `.ly-cluster`, `.ly-center`, `.ly-cover` | Flow, grouping, centering, and full-height composition. |
128
+ | `.ly-switcher`, `.ly-sidebar`, `.ly-grid`, `.ly-split` | Adaptive multi-item layouts. |
129
+ | `.ly-panes`, `.ly-media` | Workspaces and media-object arrangements. |
130
+ | `.ly-reel`, `.ly-frame`, `.ly-scroll` | Horizontal flow, stable ratios, and bounded scrolling. |
131
+
132
+ All primitives are structural. Pair them with a paint library or application CSS for visuals.
133
+
134
+ ## Layout Personalities
135
+
136
+ Set one canonical `data-ly-layout` value on `.ly-root`:
137
+
138
+ ```html
139
+ <body class="ly-root" data-ly-layout="synthwave">
140
+ <!-- recipes and primitives -->
141
+ </body>
142
+ ```
143
+
144
+ | Family | Personalities |
145
+ | --- | --- |
146
+ | Left-rail applications | Minimal SaaS, Bauhaus, Tactile, Cyberpunk, F-Pattern |
147
+ | Right-rail workspaces | Brutalism, Neumorphism, Y2K, Retro Glass, Z-Pattern |
148
+ | Three-zone layouts | Retrofuturism, Mondrian, Synthwave |
149
+ | Full-width mosaics | Bento, Maximalist |
150
+ | Equal split | Split Screen |
151
+
152
+ Each personality changes at least two spatial characteristics while leaving UI paint and DOM order unchanged.
153
+
154
+ ## Ordering Utilities And Accessibility
155
+
156
+ The base, `ly-md-*`, and `ly-lg-*` families expose `order-first`, `order-normal`, `order-last`, and numeric order `1` through `6`. For example: `.ly-order-first`, `.ly-md-order-3`, and `.ly-lg-order-last`.
157
+
158
+ These are escape hatches. Visual reordering can diverge from screen-reader reading order and keyboard focus order. Prefer correct source order plus recipe named areas; verify assistive-technology and keyboard behavior whenever an order utility is used. Built-in recipes never use order utilities.
159
+
160
+ ## UI Style Kit Naming Compatibility
161
+
162
+ Import `layout-style-css/integrations/ui-style-kit.css` after the UI and interaction layers. The bridge maps structural aliases such as `.saas-container`, `.bento-grid`, and `.cyber-split` without importing packages or redefining visual tokens.
163
+
164
+ Supported UI prefixes are `saas`, `bento`, `max`, `bau`, `tactile`, `neo`, `retro`, `brutal`, `cyber`, `y2k`, and `rg`.
165
+
166
+ ## Legacy Compatibility
167
+
168
+ Applications that cannot migrate all selectors at once may temporarily use:
169
+
170
+ ```js
171
+ import "layout-style-css/legacy.css";
172
+ ```
173
+
174
+ This one import includes the full v2 bundle and aliases for v1 containers, size names, root personality hooks, columns, carousel, button group, sidebar, pane, card, scroll recipes, `.ly-content` shrink safety, and structural `.ly-divider` spacing. It is supported for the v2 line only, with removal in v3. New code should use canonical v2 exports and hooks.
175
+
176
+ The v1 `.ly-surface--raised` selector is intentionally removed, including from `legacy.css`: raised radius, border, background, and shadow treatment belongs to UI Style Kit or application theme styling. See [Migrating To 2.0](docs/wiki/Migrating-To-2.0.md) for the complete selector mapping.
177
+
178
+ ## CDN
179
+
180
+ ```html
181
+ <link rel="stylesheet" href="https://unpkg.com/layout-style-css@2.0.0/dist/layout-style-css.min.css">
182
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layout-style-css@2.0.0/dist/layout-style-css.min.css">
183
+ ```
184
+
185
+ Companion CDN styles must appear in the same order as the package imports: UI Style Kit bridge, Interactive Surface `state-core.css`, Layout integration bridge, then Layout core.
186
+
187
+ ## Development And Verification
188
+
189
+ ```bash
190
+ npm ci
191
+ npm run build
192
+ npm run lint
193
+ npm run check:demo-js
194
+ npm run test:demo:quick
195
+ npm test
196
+ ```
197
+
198
+ `npm test` is the local Chromium gate. `npm run test:demo:all` runs Chromium, Firefox, and WebKit. `npm run release:verify` runs the full build, lint, static, Pages, cross-browser, tarball, `npm audit --audit-level=moderate`, and publish-dry-run checks. It does not publish.
199
+
200
+ ## Documentation And Wiki
201
+
202
+ | Resource | Purpose |
203
+ | --- | --- |
204
+ | [Wiki home](docs/wiki/Home.md) | Versioned documentation navigation. |
205
+ | [Getting Started](docs/wiki/Getting-Started.md) | First v2 wrapper and recipe. |
206
+ | [Installation And CDN](docs/wiki/Installation-And-CDN.md) | Exact exports and import order. |
207
+ | [Layout Primitives](docs/wiki/Layout-Primitives.md) | Wrapper and composition contracts. |
208
+ | [Layout Recipes](docs/wiki/Layout-Recipes.md) | Recipe and area markup. |
209
+ | [Layout Styles](docs/wiki/Layout-Styles.md) | Sixteen personality families. |
210
+ | [UI Style Kit Compatibility](docs/wiki/UI-Style-Kit-Compatibility.md) | Ownership and bridge rules. |
211
+ | [Migrating To 2.0](docs/wiki/Migrating-To-2.0.md) | Complete 1.x-to-2.0 mapping. |
212
+ | [Demo And GitHub Pages](docs/wiki/Demo-And-GitHub-Pages.md) | Rendered QA and Pages artifact. |
213
+ | [Release And Publishing](docs/wiki/Release-And-Publishing.md) | Local verification and separately approved release steps. |
214
+ | [Security And Support](docs/wiki/Security-And-Support.md) | Supported versions and reporting. |
215
+ | [Contributing](docs/wiki/Contributing.md) | Source, generated output, and review rules. |
216
+ | [Wiki sidebar source](docs/wiki/_Sidebar.md) | Navigation source for a GitHub Wiki mirror. |
217
+ | [Changelog](CHANGELOG.md) | Release history. |
218
+ | [Repository contributing guide](CONTRIBUTING.md) | Contribution workflow. |
219
+ | [Security policy](SECURITY.md) | Security policy. |
220
+
221
+ ## Ownership Boundary
222
+
223
+ - `layout-style-css` owns wrappers, flow, grids, areas, measures, spans, containment, and structural responsiveness.
224
+ - `ui-style-kit-css` owns theme and component paint.
225
+ - `interactive-surface-css` owns interaction-state styling.
226
+
227
+ Authored CSS lives in `styles/`; `dist/` is generated. Keep public layout classes prefixed with `ly-`, add tests before changing contracts, and never edit generated CSS directly.
228
+
229
+ ## License
230
+
231
+ MIT