layout-style-css 2.1.1 → 3.0.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 (81) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +127 -143
  3. package/dist/core.css +2 -1
  4. package/dist/foundation.css +194 -0
  5. package/dist/layout-style-css.css +527 -984
  6. package/dist/layout-style-css.min.css +1 -1
  7. package/dist/personalities/bauhaus.css +13 -42
  8. package/dist/personalities/bento.css +16 -40
  9. package/dist/personalities/brutalism.css +13 -33
  10. package/dist/personalities/cyberpunk.css +12 -32
  11. package/dist/personalities/f-pattern.css +16 -45
  12. package/dist/personalities/maximalist.css +16 -48
  13. package/dist/personalities/minimal-saas.css +7 -33
  14. package/dist/personalities/mondrian.css +12 -40
  15. package/dist/personalities/neumorphism.css +15 -39
  16. package/dist/personalities/retro-glass.css +14 -42
  17. package/dist/personalities/retrofuturism.css +12 -32
  18. package/dist/personalities/split-screen.css +24 -36
  19. package/dist/personalities/synthwave.css +13 -41
  20. package/dist/personalities/tactile.css +15 -32
  21. package/dist/personalities/y2k.css +13 -33
  22. package/dist/personalities/z-pattern.css +16 -46
  23. package/dist/personalities.css +1 -1
  24. package/dist/primitives.css +27 -63
  25. package/dist/recipes.css +92 -175
  26. package/dist/utilities.css +39 -104
  27. package/dist/wrappers.css +28 -108
  28. package/docs/wiki/Contributing.md +3 -1
  29. package/docs/wiki/Demo-And-GitHub-Pages.md +24 -33
  30. package/docs/wiki/Getting-Started.md +39 -27
  31. package/docs/wiki/Home.md +21 -27
  32. package/docs/wiki/Installation-And-CDN.md +47 -42
  33. package/docs/wiki/Layout-Primitives.md +48 -34
  34. package/docs/wiki/Layout-Recipes.md +42 -33
  35. package/docs/wiki/Layout-Styles.md +60 -26
  36. package/docs/wiki/Migrating-To-3.0.md +205 -0
  37. package/docs/wiki/Release-And-Publishing.md +36 -51
  38. package/docs/wiki/Security-And-Support.md +18 -22
  39. package/docs/wiki/UI-Style-Kit-Compatibility.md +21 -30
  40. package/docs/wiki/_Sidebar.md +12 -15
  41. package/manifest.json +98 -0
  42. package/package.json +33 -28
  43. package/personalities.json +147 -0
  44. package/CONTRIBUTING.md +0 -55
  45. package/SECURITY.md +0 -50
  46. package/demo/assets/apple-touch-icon.svg +0 -7
  47. package/demo/assets/favicon.svg +0 -7
  48. package/demo/assets/social-card.png +0 -0
  49. package/demo/browserconfig.xml +0 -9
  50. package/demo/demo.css +0 -523
  51. package/demo/demo.js +0 -605
  52. package/demo/index.html +0 -325
  53. package/demo/robots.txt +0 -4
  54. package/demo/site.webmanifest +0 -23
  55. package/demo/sitemap.xml +0 -9
  56. package/dist/integrations/ui-style-kit.css +0 -175
  57. package/dist/legacy.css +0 -822
  58. package/styles/core.css +0 -6
  59. package/styles/integrations/ui-style-kit.css +0 -175
  60. package/styles/legacy.css +0 -173
  61. package/styles/personalities/bauhaus.css +0 -49
  62. package/styles/personalities/bento.css +0 -46
  63. package/styles/personalities/brutalism.css +0 -39
  64. package/styles/personalities/cyberpunk.css +0 -39
  65. package/styles/personalities/f-pattern.css +0 -51
  66. package/styles/personalities/maximalist.css +0 -54
  67. package/styles/personalities/minimal-saas.css +0 -39
  68. package/styles/personalities/mondrian.css +0 -47
  69. package/styles/personalities/neumorphism.css +0 -46
  70. package/styles/personalities/retro-glass.css +0 -47
  71. package/styles/personalities/retrofuturism.css +0 -39
  72. package/styles/personalities/split-screen.css +0 -41
  73. package/styles/personalities/synthwave.css +0 -48
  74. package/styles/personalities/tactile.css +0 -39
  75. package/styles/personalities/y2k.css +0 -39
  76. package/styles/personalities/z-pattern.css +0 -52
  77. package/styles/personalities.css +0 -18
  78. package/styles/primitives.css +0 -219
  79. package/styles/recipes.css +0 -278
  80. package/styles/utilities.css +0 -162
  81. package/styles/wrappers.css +0 -174
package/dist/wrappers.css CHANGED
@@ -1,127 +1,45 @@
1
- @layer ly.reset, ly.tokens, ly.wrappers, ly.primitives, ly.recipes, ly.utilities, ly.personalities, ly.integrations, ly.legacy;
1
+ @layer ly.reset, ly.tokens, ly.wrappers, ly.primitives, ly.recipes, ly.utilities, ly.personalities;
2
2
 
3
- /*
4
- Shared structural tokens and wrapper geometry. Theme, type, borders, shadows,
5
- and interactive states remain outside Layout Style's ownership boundary.
6
- */
7
-
8
- @layer ly.tokens {
9
- :where(.ly-root) {
10
- --ly-space-0: 0;
11
- --ly-space-1: 0.25rem;
12
- --ly-space-2: 0.5rem;
13
- --ly-space-3: 0.75rem;
14
- --ly-space-4: 1rem;
15
- --ly-space-5: 1.5rem;
16
- --ly-space-6: 2rem;
17
- --ly-space-7: 3rem;
18
- --ly-space-8: 4rem;
19
- --ly-space-9: 6rem;
20
-
21
- --ly-wrapper-compact: 40rem;
22
- --ly-wrapper-prose: 68ch;
23
- --ly-wrapper-content: 72rem;
24
- --ly-wrapper-wide: 112rem;
25
- --ly-wrapper-max: var(--ly-wrapper-content);
26
- --ly-page-padding-inline: clamp(1rem, 4vw, 3rem);
27
- --ly-safe-area-inline: max(
28
- env(safe-area-inset-left, 0px),
29
- env(safe-area-inset-right, 0px)
30
- );
31
- --ly-wrapper-gutter: max(var(--ly-page-padding-inline), var(--ly-safe-area-inline));
32
-
33
- --ly-section-padding-block: clamp(3rem, 7vw, 6rem);
34
- --ly-gap: var(--ly-space-5);
35
- --ly-grid-gap: var(--ly-gap);
36
- --ly-stack-gap: var(--ly-space-4);
37
- --ly-cluster-gap: var(--ly-space-3);
38
- --ly-cover-min: 100svh;
39
- --ly-switcher-threshold: 42rem;
40
- --ly-sidebar-size: 18rem;
41
- --ly-sidebar-content-min: 50%;
42
- --ly-grid-columns: 12;
43
- --ly-grid-min: 16rem;
44
- --ly-pane-size: 22rem;
45
- --ly-media-size: 14rem;
46
- --ly-reel-item-min: 16rem;
47
- --ly-reel-item-max: 28rem;
48
- --ly-scroll-max: 70svh;
49
- --ly-frame-ratio: 16 / 9;
50
-
51
- --ly-recipe-rail: 18rem;
52
- --ly-recipe-aside: 22rem;
53
- --ly-card-grid-min: 16rem;
54
- --ly-gallery-min: 12rem;
55
- --ly-card-size-sm: 10rem;
56
- --ly-card-size-md: 14rem;
57
- --ly-card-size-lg: 18rem;
58
- --ly-header-height: 4.5rem;
59
- --ly-z-header: 20;
60
-
61
- /* V1 token aliases remain available so legacy selectors can preserve sizing. */
62
- --ly-container-sm: var(--ly-wrapper-compact);
63
- --ly-container-md: 56rem;
64
- --ly-container-lg: var(--ly-wrapper-content);
65
- --ly-container-xl: 88rem;
66
- --ly-container-wide: var(--ly-wrapper-wide);
67
- --ly-container-max: var(--ly-container-lg);
68
- --ly-content-readable: var(--ly-wrapper-prose);
69
- --ly-carousel-item-min: var(--ly-reel-item-min);
70
- --ly-carousel-item-max: var(--ly-reel-item-max);
71
- --ly-sidebar-min: 14rem;
72
- --ly-sidebar-width: var(--ly-recipe-rail);
73
- --ly-sidebar-max: var(--ly-recipe-aside);
74
- --ly-pane-fixed: var(--ly-pane-size);
75
- --ly-z-sidebar: 10;
76
- }
77
- }
78
-
79
- @layer ly.reset {
80
- :where(.ly-root),
81
- :where(.ly-root *) {
82
- box-sizing: border-box;
83
- }
84
-
85
- :where(.ly-root) {
86
- min-inline-size: 0;
87
- margin: 0;
88
- }
89
-
90
- :where(.ly-root img),
91
- :where(.ly-root svg),
92
- :where(.ly-root video),
93
- :where(.ly-root canvas) {
94
- max-inline-size: 100%;
95
- }
96
- }
3
+ /* Wrappers provide fluid measures and become the nearest responsive scope. */
97
4
 
98
5
  @layer ly.wrappers {
99
6
  .ly-wrapper {
100
- /* Personalities provide only the plain-wrapper default; explicit variants stay authoritative. */
101
7
  --ly-wrapper-max: var(--ly-personality-wrapper-max, var(--ly-wrapper-content));
8
+ --ly-wrapper-fluid-gutter: clamp(1rem, 3vw, 3rem);
9
+ --ly-wrapper-local-gutter: max(
10
+ var(--ly-wrapper-fluid-gutter),
11
+ var(--ly-safe-area-inline)
12
+ );
102
13
 
103
- /* Symmetric safe-area compensation keeps logical gutters stable in either direction. */
104
- container-name: ly-wrapper;
14
+ container-name: ly-scope;
105
15
  container-type: inline-size;
106
- inline-size: min(100%, calc(var(--ly-wrapper-max) + (var(--ly-wrapper-gutter) * 2)));
16
+ inline-size: min(100%, calc(var(--ly-wrapper-max) + (var(--ly-wrapper-local-gutter) * 2)));
17
+ max-inline-size: 100%;
107
18
  margin-inline: auto;
108
- padding-inline: var(--ly-wrapper-gutter);
19
+ padding-inline: var(--ly-wrapper-local-gutter);
20
+ }
21
+
22
+ /* Container-relative gutters enhance the universally valid viewport fallback. */
23
+ @supports (width: 1cqi) {
24
+ .ly-wrapper {
25
+ --ly-wrapper-fluid-gutter: clamp(1rem, 3cqi, 3rem);
26
+ }
109
27
  }
110
28
 
111
29
  .ly-wrapper--compact {
112
- --ly-wrapper-max: 40rem;
30
+ --ly-wrapper-max: var(--ly-wrapper-compact);
113
31
  }
114
32
 
115
33
  .ly-wrapper--prose {
116
- --ly-wrapper-max: 68ch;
34
+ --ly-wrapper-max: var(--ly-wrapper-prose);
117
35
  }
118
36
 
119
37
  .ly-wrapper--content {
120
- --ly-wrapper-max: 72rem;
38
+ --ly-wrapper-max: var(--ly-wrapper-content);
121
39
  }
122
40
 
123
41
  .ly-wrapper--wide {
124
- --ly-wrapper-max: 112rem;
42
+ --ly-wrapper-max: var(--ly-wrapper-wide);
125
43
  }
126
44
 
127
45
  .ly-wrapper--full {
@@ -129,18 +47,19 @@
129
47
  }
130
48
 
131
49
  .ly-wrapper--breakout {
50
+ --ly-wrapper-max: 100%;
132
51
  --ly-breakout-content-size: min(
133
52
  var(--ly-wrapper-content),
134
- calc(100% - (var(--ly-wrapper-gutter) * 2))
53
+ calc(100% - (var(--ly-wrapper-local-gutter) * 2))
135
54
  );
136
55
  --ly-breakout-feature-size: min(
137
56
  var(--ly-wrapper-wide),
138
- calc(100% - (var(--ly-wrapper-gutter) * 2))
57
+ calc(100% - (var(--ly-wrapper-local-gutter) * 2))
139
58
  );
140
59
 
141
60
  display: grid;
142
61
  grid-template-columns:
143
- [full-start] minmax(min(100%, var(--ly-wrapper-gutter)), 1fr)
62
+ [full-start] minmax(min(100%, var(--ly-wrapper-local-gutter)), 1fr)
144
63
  [feature-start] minmax(
145
64
  0,
146
65
  calc((var(--ly-breakout-feature-size) - var(--ly-breakout-content-size)) / 2)
@@ -150,7 +69,7 @@
150
69
  0,
151
70
  calc((var(--ly-breakout-feature-size) - var(--ly-breakout-content-size)) / 2)
152
71
  )
153
- [feature-end] minmax(min(100%, var(--ly-wrapper-gutter)), 1fr) [full-end];
72
+ [feature-end] minmax(min(100%, var(--ly-wrapper-local-gutter)), 1fr) [full-end];
154
73
  inline-size: 100%;
155
74
  padding-inline: 0;
156
75
  }
@@ -158,6 +77,7 @@
158
77
  .ly-wrapper--breakout > * {
159
78
  grid-column: content;
160
79
  min-inline-size: 0;
80
+ max-inline-size: 100%;
161
81
  }
162
82
 
163
83
  .ly-wrapper--breakout > :where(.ly-lane--content, [data-ly-lane="content"]) {
@@ -27,7 +27,9 @@ Use `npm run test:demo:all` for rendered layout changes and `npm run release:ver
27
27
  - Prefix public classes with `ly-`.
28
28
  - Keep the mobile DOM, reading, and focus order authoritative.
29
29
  - Use named areas in built-in recipes; never use `order` there.
30
- - Test nested containers below and above `48rem` and `64rem`.
30
+ - Test nested containers one rem below and above each recipe threshold: `42rem`, `44rem`, `48rem`, `52rem`, and `72rem`.
31
+ - Test viewport heights one rem below and above `30rem` and `44rem`.
32
+ - Keep personality files free of `@container`, viewport, and orientation queries.
31
33
  - Use `minmax(0, 1fr)` or guarded floors for tracks that receive application content.
32
34
  - Do not add colors, typography, borders, shadows, component paint, focus styles, or native control styles.
33
35
 
@@ -1,53 +1,44 @@
1
1
  # Demo And GitHub Pages
2
2
 
3
- The interactive layout lab lives in `demo/index.html`, `demo/demo.css`, and `demo/demo.js`. GitHub Pages serves a generated artifact from `output/github-pages/`.
3
+ The v3 demo is an intrinsic responsive workbench, not a fixed-device screenshot gallery.
4
4
 
5
- ## Local Gates
5
+ ## Controls
6
6
 
7
- The quick gate uses Chromium and a representative rendered matrix:
7
+ - Independent preview width and height
8
+ - Automatic and manual recipe responsiveness
9
+ - Wrapper, recipe, and all sixteen personality profiles
10
+ - Layout-only, Layout plus UI, and all-three ecosystem modes
11
+ - Live rendered dimensions and active topology
12
+ - Copy-ready canonical attribute markup
8
13
 
9
- ```bash
10
- npm run test:demo:quick
11
- ```
14
+ Device presets cover the release allocations:
12
15
 
13
- Run one complete engine matrix:
16
+ - Phone portrait: `360 × 800`
17
+ - Phone landscape: `800 × 360`
18
+ - Tablet portrait: `768 × 1024`
19
+ - Tablet landscape: `1024 × 768`
20
+ - Desktop landscape: `1440 × 900`
21
+ - Desktop portrait: `900 × 1440`
14
22
 
15
- ```bash
16
- npm run test:demo:chromium
17
- npm run test:demo:firefox
18
- npm run test:demo:webkit
19
- ```
23
+ Threshold controls also cover one rem below and above `42rem`, `44rem`, `48rem`, `52rem`, and `72rem`, plus the `30rem` and `44rem` height tiers.
20
24
 
21
- Run all supported engines:
25
+ ## Local Verification
22
26
 
23
27
  ```bash
28
+ npm run build
29
+ npm run test:demo:quick
24
30
  npm run test:demo:all
25
31
  ```
26
32
 
27
- The full matrix exercises current evergreen Chromium, Firefox, and WebKit at 375px, 768px, 1280px, and 1440px, plus nested containers around the `48rem` and `64rem` core thresholds and the personality-specific signatures.
28
-
29
- ## Rendered Contracts
30
-
31
- The smoke suite verifies:
32
-
33
- - all wrappers, recipes, and personalities
34
- - stable DOM and keyboard focus order
35
- - named-area transitions at both container thresholds
36
- - no meaningful horizontal overflow
37
- - bounded scrolling
38
- - accessible mobile controls
39
- - layout-only, Layout plus UI, and all-three ecosystem modes
40
- - pinned `ui-style-kit-css@2.1.0` visual, token bridge, and manifest behavior plus released `interactive-surface-css@1.5.0`
41
-
42
- The demo query parser uses explicit allowlists and writes generated imports and markup with `textContent`.
33
+ The full matrix runs in Chromium, Firefox, and WebKit. It checks meaningful DOM, unchanged source/focus order, automatic and manual topologies, nearest-container behavior, short-height escape hatches, zero-width tracks, overlap, and unintended overflow.
43
34
 
44
- ## Pages Artifact
35
+ ## GitHub Pages
45
36
 
46
37
  ```bash
47
38
  npm run pages:build
48
- node test/pages-artifact.test.mjs
39
+ npm run test:pages
49
40
  ```
50
41
 
51
- The generated root contains the demo, metadata assets, `.nojekyll`, and `dist/`. The build rewrites only known parent-relative Layout Style paths, preserving external companion URLs and canonical metadata.
42
+ The Pages artifact is written to `output/github-pages`, carries a root `index.html`, includes the generated v3 distribution, and rewrites the demo's parent-relative Layout import to the artifact-local `./dist` path.
52
43
 
53
- The Pages workflow installs Chromium, runs the quick package gate, builds and tests the artifact, then uploads it. Repository Pages must be enabled with GitHub Actions as the source before deployment.
44
+ `pages.yml` verifies repository Pages configuration before package work, runs the package check, installs Chromium for the rendered gate, validates the artifact, and deploys the saved artifact. Deployment is separate from local implementation.
@@ -1,51 +1,63 @@
1
1
  # Getting Started
2
2
 
3
- Layout Style CSS 2.0 provides structural layout without prescribing theme or component paint.
4
-
5
- ## Install
6
-
7
- Node.js 20 or newer is required for development scripts.
3
+ Install `layout-style-css@3.0.1` and import the root bundle:
8
4
 
9
5
  ```bash
10
- npm install layout-style-css@2.1.1
6
+ npm install layout-style-css@3.0.1
11
7
  ```
12
8
 
13
- ## Import
14
-
15
9
  ```js
16
10
  import "layout-style-css";
17
11
  ```
18
12
 
19
- The package is dependency-free. Optional UI and interaction layers are installed and imported explicitly; see [Installation And CDN](Installation-And-CDN.md).
20
-
21
- ## First Recipe
13
+ ## First Automatic Layout
22
14
 
23
- Place the recipe inside a `.ly-wrapper`. The wrapper supplies inline-size containment, fluid logical gutters, and safe-area compensation.
15
+ The zero-configuration path needs only `.ly-root`, a recipe attribute, and semantic areas:
24
16
 
25
17
  ```html
26
18
  <body class="ly-root" data-ly-layout="minimal-saas">
27
- <div class="ly-wrapper ly-wrapper--wide">
28
- <section class="ly-dashboard" data-ly-recipe="dashboard">
29
- <header data-ly-area="header">Dashboard</header>
30
- <nav data-ly-area="nav" aria-label="Dashboard">Navigation</nav>
31
- <main data-ly-area="main">Workspace</main>
32
- <aside data-ly-area="aside">Details</aside>
33
- <footer data-ly-area="footer">Status</footer>
34
- </section>
19
+ <div data-ly-recipe="split-hero">
20
+ <main data-ly-area="content">Primary message</main>
21
+ <figure data-ly-area="media">Media</figure>
22
+ <div data-ly-area="actions">Actions</div>
35
23
  </div>
36
24
  </body>
37
25
  ```
38
26
 
39
- The single-column DOM order is authoritative for mobile reading and keyboard focus. Core named grid areas rearrange at `48rem` and `64rem` container widths without changing source order; a selected personality may apply its own personality-specific enhancement threshold.
27
+ The recipe stays stacked below `42rem` and enhances automatically when its nearest `ly-scope` container has enough room.
40
28
 
41
- ## Switch Personality
29
+ ## Optional Wrapper
42
30
 
43
- ```js
44
- document.querySelector(".ly-root").dataset.lyLayout = "synthwave";
31
+ Use wrappers when a composition needs a named measure or local responsive scope:
32
+
33
+ ```html
34
+ <section class="ly-wrapper ly-wrapper--wide">
35
+ <div data-ly-recipe="card-grid">
36
+ <article>One</article>
37
+ <article>Two</article>
38
+ </div>
39
+ </section>
40
+ ```
41
+
42
+ Available measures are `.ly-wrapper--compact`, `.ly-wrapper--prose`, `.ly-wrapper--content`, `.ly-wrapper--wide`, `.ly-wrapper--full`, and `.ly-wrapper--breakout`.
43
+
44
+ ## Manual Topology
45
+
46
+ Use `data-ly-responsive="manual"` only when application CSS must choose the topology:
47
+
48
+ ```css
49
+ @container ly-scope (min-width: 56rem) {
50
+ [data-ly-recipe="docs"][data-ly-responsive="manual"] {
51
+ /* Application-owned topology. */
52
+ }
53
+ }
45
54
  ```
46
55
 
47
- `data-ly-layout` accepts one of the sixteen values listed in [Layout Styles](Layout-Styles.md). UI attributes such as `data-ui`, `data-theme`, and `data-mode` remain independent.
56
+ Keep mobile DOM order authoritative. The package never changes reading or focus order.
48
57
 
49
- ## Migrate Existing Markup
58
+ ## Next
50
59
 
51
- Do not copy v1 root hooks or size-based wrappers into new code. Follow [Migrating To 2.0](Migrating-To-2.0.md), or use `layout-style-css/legacy.css` temporarily while converting an application.
60
+ - [Layout Primitives](Layout-Primitives.md)
61
+ - [Layout Recipes](Layout-Recipes.md)
62
+ - [Layout Styles](Layout-Styles.md)
63
+ - [Migrating To 3.0](Migrating-To-3.0.md)
package/docs/wiki/Home.md CHANGED
@@ -1,33 +1,27 @@
1
- # Layout Style CSS Wiki
1
+ # Layout Style CSS v3
2
2
 
3
- Version 2.1.1 is a container-first, dependency-free layout library. It ships semantic wrappers, composition primitives, seven recipes, sixteen layout personalities, focused exports, a v2-only compatibility bundle, and refreshed ecosystem fixtures for UI Style Kit CSS 2.1 and Interactive Surface CSS 1.5.
3
+ `layout-style-css@3.0.1` is a dependency-free, CSS-only structural system for layouts that adapt to available width and height.
4
4
 
5
- ## Start Here
5
+ ## Contract
6
6
 
7
- | Page | Purpose |
8
- | --- | --- |
9
- | [Getting Started](Getting-Started.md) | First wrapper, recipe, and personality. |
10
- | [Installation And CDN](Installation-And-CDN.md) | Exact package exports and ecosystem import order. |
11
- | [Layout Primitives](Layout-Primitives.md) | Wrappers and composition primitives. |
12
- | [Layout Recipes](Layout-Recipes.md) | Named recipes, areas, and mobile ordering. |
13
- | [Layout Styles](Layout-Styles.md) | Sixteen spatial personalities. |
14
- | [UI Style Kit Compatibility](UI-Style-Kit-Compatibility.md) | Structural bridge and ownership boundaries. |
15
- | [Migrating To 2.0](Migrating-To-2.0.md) | Complete 1.x selector and export mapping. |
16
- | [Demo And GitHub Pages](Demo-And-GitHub-Pages.md) | Interactive lab, browser matrix, and Pages artifact. |
17
- | [Release And Publishing](Release-And-Publishing.md) | Release verification and separately approved publish steps. |
18
- | [Security And Support](Security-And-Support.md) | Supported versions and reporting. |
19
- | [Contributing](Contributing.md) | Source, generated output, testing, and review rules. |
7
+ - `.ly-root` is a usable layout and named `ly-scope` container.
8
+ - Wrappers are optional measure and nesting controls.
9
+ - Seven `data-ly-recipe` values enhance a semantic stacked fallback.
10
+ - `data-ly-responsive="manual"` transfers topology ownership to application CSS.
11
+ - Sixteen `data-ly-layout` profiles tune one shared responsive engine.
12
+ - `100dvh` behavior and the `44rem`/`30rem` height tiers avoid short-screen traps.
13
+ - The mobile DOM order remains the reading, keyboard, and focus order.
20
14
 
21
- ## Ownership
15
+ Layout owns structure. UI Style Kit owns paint. Interactive Surface owns interaction styling.
22
16
 
23
- Layout Style CSS owns spatial behavior: containment, wrappers, flow, grids, areas, spans, sizing, and responsive arrangement. UI Style Kit owns visual paint. Interactive Surface owns interaction-state styling.
17
+ ## Documentation
24
18
 
25
- The package has no runtime or peer dependencies. `ui-style-kit-css@2.1.0` and `interactive-surface-css@1.5.0` are released registry fixtures used to prove optional integration.
26
-
27
- ## Supported Baseline
28
-
29
- - Node.js 20 or newer for package development
30
- - Current evergreen Chromium, Firefox, and WebKit
31
- - Mobile-first DOM order with core thresholds at `48rem` and `64rem`, nearest-container personality overrides, and `64rem` feasibility gates for three- and four-track application shells
32
-
33
- The deprecated UI structural bridge remains available for existing UI-prefixed layout aliases, but canonical 2.1 examples use UI Style Kit visual CSS, the UI token bridge, Interactive Surface `state-core.css`, and Layout core.
19
+ - [Getting Started](Getting-Started.md)
20
+ - [Installation And CDN](Installation-And-CDN.md)
21
+ - [Layout Primitives](Layout-Primitives.md)
22
+ - [Layout Recipes](Layout-Recipes.md)
23
+ - [Layout Styles](Layout-Styles.md)
24
+ - [Migrating To 3.0](Migrating-To-3.0.md)
25
+ - [Demo And GitHub Pages](Demo-And-GitHub-Pages.md)
26
+ - [Release And Publishing](Release-And-Publishing.md)
27
+ - [Security And Support](Security-And-Support.md)
@@ -1,47 +1,53 @@
1
1
  # Installation And CDN
2
2
 
3
- Layout Style CSS 2.0 is dependency-free and has no peer dependency contract. Node.js 20 or newer is required only for package development and verification.
3
+ ## Requirements
4
4
 
5
- ## npm
5
+ - Node.js 20 or newer for development
6
+ - Evergreen Chromium, Firefox, or WebKit
7
+ - No runtime or peer dependencies
8
+
9
+ ## Package
6
10
 
7
11
  ```bash
8
- npm install layout-style-css@2.1.1
12
+ npm install layout-style-css@3.0.1
9
13
  ```
10
14
 
11
- ## Focused Exports
15
+ ```js
16
+ import "layout-style-css";
17
+ ```
12
18
 
13
- | Import | Purpose |
14
- | --- | --- |
15
- | `layout-style-css` | Full v2 core and all personalities. |
16
- | `layout-style-css/min.css` | Minified full bundle. |
17
- | `layout-style-css/core.css` | Wrappers, primitives, recipes, and utilities. |
18
- | `layout-style-css/wrappers.css` | Wrapper tokens and containment. |
19
- | `layout-style-css/primitives.css` | Composition primitives. |
20
- | `layout-style-css/recipes.css` | Seven recipe roots and named areas. |
21
- | `layout-style-css/utilities.css` | Structural utility layer. |
22
- | `layout-style-css/personalities.css` | All personalities. |
23
- | `layout-style-css/personalities/minimal-saas.css` | One personality; replace the name as needed. |
24
- | `layout-style-css/integrations/ui-style-kit.css` | Import-free structural UI bridge. |
25
- | `layout-style-css/legacy.css` | Full v2 bundle with v1 aliases. |
19
+ The root import is the zero-configuration full bundle. Focused exports are:
26
20
 
27
- The old `all-with-ui-kit*`, `all.css`, `base.css`, `bridge.css`, and root personality exports do not exist in v2.
21
+ Package and bundler defaults (`main`, `style`, and the root export) use the readable `dist/layout-style-css.css` file. The `unpkg` and `jsdelivr` convenience fields use `dist/layout-style-css.min.css`; package consumers can select the same minified output explicitly with `layout-style-css/min.css`.
28
22
 
29
- ## Import Modes
23
+ - `layout-style-css/min.css`
24
+ - `layout-style-css/core.css`
25
+ - `layout-style-css/foundation.css`
26
+ - `layout-style-css/wrappers.css`
27
+ - `layout-style-css/primitives.css`
28
+ - `layout-style-css/recipes.css`
29
+ - `layout-style-css/utilities.css`
30
+ - `layout-style-css/personalities.css`
31
+ - `layout-style-css/personalities/minimal-saas.css` and the other fifteen profile names
32
+ - `layout-style-css/package.json`
30
33
 
31
- Standalone:
34
+ `core.css` contains Foundation, Wrappers, Primitives, Recipes, and Utilities. The default bundle adds all personality profiles.
32
35
 
33
- ```js
34
- import "layout-style-css";
35
- ```
36
+ ## CDN
36
37
 
37
- Layout plus UI Style Kit:
38
+ ```html
39
+ <link rel="stylesheet" href="https://unpkg.com/layout-style-css@3.0.1/dist/layout-style-css.min.css">
40
+ ```
38
41
 
39
- ```js
40
- import "ui-style-kit-css/visual.css";
41
- import "layout-style-css";
42
+ ```html
43
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layout-style-css@3.0.1/dist/layout-style-css.min.css">
42
44
  ```
43
45
 
44
- All three libraries, in required order:
46
+ The CDN paths include `/dist/` because CDN clients address files in the published tarball, while package import maps use the public exports.
47
+
48
+ ## Ecosystem Order
49
+
50
+ Layout has no companion imports. When all three libraries are installed, keep ownership explicit:
45
51
 
46
52
  ```js
47
53
  import "ui-style-kit-css/visual.css";
@@ -50,23 +56,22 @@ import "interactive-surface-css/state-core.css";
50
56
  import "layout-style-css";
51
57
  ```
52
58
 
53
- The first import block is deprecated compatibility for legacy UI-prefixed structural aliases. Canonical 2.1 imports use the released `ui-style-kit-css@2.1.0` visual CSS, `ui-style-kit-css/interactive-surface-theme.css`, released `interactive-surface-css@1.5.0` state core, and Layout core.
59
+ Layout owns structure. UI Style Kit owns paint. Interactive Surface owns interaction styling.
54
60
 
55
- ## CDN
56
-
57
- Layout only:
58
-
59
- ```html
60
- <link rel="stylesheet" href="https://unpkg.com/layout-style-css@2.1.1/dist/layout-style-css.min.css">
61
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layout-style-css@2.1.1/dist/layout-style-css.min.css">
62
- ```
61
+ ## Cascade Layers
63
62
 
64
- For optional companions, preserve the same order as the package imports: UI Style Kit visual CSS, UI Style Kit `interactive-surface-theme.css`, Interactive Surface 1.5.0 `state-core.css`, then Layout core. Load `layout-style-css/integrations/ui-style-kit.css` only for deprecated structural aliases.
63
+ The module order is:
65
64
 
66
- ## Browser Baseline
65
+ 1. `ly.reset`
66
+ 2. `ly.tokens`
67
+ 3. `ly.wrappers`
68
+ 4. `ly.primitives`
69
+ 5. `ly.recipes`
70
+ 6. `ly.utilities`
71
+ 7. `ly.personalities`
67
72
 
68
- Current evergreen Chromium, Firefox, and WebKit are supported. Core container-driven enhancements activate at `48rem` and `64rem`; personalities may use personality-specific thresholds. Unsupported container-query environments retain the mobile source-order fallback.
73
+ Application styles can override public custom properties without reordering the package modules.
69
74
 
70
- ## Source Ownership
75
+ ## Clean-Break Note
71
76
 
72
- `styles/` contains authored CSS. `dist/` is generated. Consumers should use package exports or CDN dist files, never internal source paths.
77
+ v3 does not export a compatibility bundle, legacy aliases, the deprecated structural bridge, extensionless aliases, or responsive/order utility families. See [Migrating To 3.0](Migrating-To-3.0.md).
@@ -1,48 +1,62 @@
1
1
  # Layout Primitives
2
2
 
3
- V2 primitives are structural, mobile-first, and safe to use without a visual design system.
3
+ ## Foundation And Containment
4
4
 
5
- ## Semantic Wrappers
5
+ `.ly-root` supplies shared structural tokens, shrink safety, the named `ly-scope` inline-size container, and height-aware defaults. Reset and public tokens live in `layout-style-css/foundation.css`.
6
6
 
7
- `.ly-wrapper` defaults to the `72rem` content measure and establishes an inline-size container. Fluid logical gutters include safe-area insets.
7
+ Every primitive applies `min-inline-size: 0` and `min-block-size: 0` where tracks or children need to shrink.
8
8
 
9
- Layout personalities can provide a distinct measure for the plain `.ly-wrapper`. Explicit semantic wrapper variants always keep the measures below, so changing the demo wrapper control produces a real structural change under every personality.
9
+ ## Wrappers
10
10
 
11
- | Selector | Measure or behavior |
12
- | --- | --- |
13
- | `.ly-wrapper--compact` | `40rem` |
14
- | `.ly-wrapper--prose` | `68ch` |
15
- | `.ly-wrapper--content` | `72rem`, also the default |
16
- | `.ly-wrapper--wide` | `112rem` |
17
- | `.ly-wrapper--full` | Full available inline size |
18
- | `.ly-wrapper--breakout` | Content, feature, and full lanes |
11
+ Wrappers are optional local responsive scopes:
19
12
 
20
- Breakout children use `.ly-lane--content`, `.ly-lane--feature`, `.ly-lane--full`, or equivalent `data-ly-lane` attributes.
13
+ - `.ly-wrapper--compact`
14
+ - `.ly-wrapper--prose`
15
+ - `.ly-wrapper--content`
16
+ - `.ly-wrapper--wide`
17
+ - `.ly-wrapper--full`
18
+ - `.ly-wrapper--breakout`
21
19
 
22
- ## Composition
20
+ Breakout children select clamped lanes with `data-ly-lane="content"`, `data-ly-lane="feature"`, or `data-ly-lane="full"`.
23
21
 
24
- | Primitive | Contract |
25
- | --- | --- |
26
- | `.ly-stack` | Vertical flow with a shared stack gap. |
27
- | `.ly-cluster` | Wrapping inline group. |
28
- | `.ly-center` | Centered element with a bounded measure. |
29
- | `.ly-cover` | Full-height vertical composition with an optional centered child. |
30
- | `.ly-switcher` | Wrapping equal items based on available inline size. |
31
- | `.ly-sidebar` | Side and content regions that wrap safely. |
32
- | `.ly-grid` | Explicit structural grid; `.ly-grid--auto` uses auto-fit. |
33
- | `.ly-split` | One column, then two columns from `48rem`. |
34
- | `.ly-panes` | One column with two- and three-pane variants. |
35
- | `.ly-media` | Media, content, and action areas. |
36
- | `.ly-reel` | Bounded horizontal flow with scroll snapping. |
37
- | `.ly-frame` | Stable aspect-ratio frame. |
38
- | `.ly-scroll` | Bounded scrolling with overscroll containment. |
22
+ ## Flow
39
23
 
40
- Primitives respond to their nearest wrapper or recipe container at the `48rem` and `64rem` core thresholds. They do not set color, typography, borders, shadows, or interaction states.
24
+ - `.ly-stack` creates vertical flow.
25
+ - `.ly-cluster` wraps inline groups.
26
+ - `.ly-center` centers a bounded composition.
27
+ - `.ly-cover` fills available block size while preserving reachable normal flow.
41
28
 
42
- For v1 migrations, `legacy.css` keeps `.ly-content` as `min-inline-size: 0` and preserves only the minimum block size and spacing of `.ly-divider`. A visible divider is paint and must come from UI Style Kit or the application theme; `.ly-surface--raised` is removed for the same ownership reason.
29
+ ## Adaptive Tracks
43
30
 
44
- ## Structural Utilities
31
+ - `.ly-switcher` wraps when its intrinsic threshold is no longer feasible.
32
+ - `.ly-sidebar` keeps a preferred rail while the content can meet its minimum.
33
+ - `.ly-grid` uses auto-fit tracks and `--ly-grid-min`.
34
+ - `.ly-split` creates balanced intrinsic regions.
35
+ - `.ly-panes` creates a preferred workspace rail and flexible pane.
36
+ - `.ly-media` wraps media and content without a viewport breakpoint.
45
37
 
46
- The utility module includes grid column variables, spans, gaps, padding, sizing, overflow, alignment, frame ratios, visibility, and explicit order escape hatches.
38
+ ## Frame And Overflow
47
39
 
48
- Ordering families are available at base, medium container (`ly-md-*`), and large container (`ly-lg-*`) sizes. They include first, normal, last, and numeric values 1 through 6. Visual reordering can conflict with reading and focus order; see [Migrating To 2.0](Migrating-To-2.0.md) before using them.
40
+ - `.ly-frame` keeps a configurable aspect ratio.
41
+ - `.ly-reel` is the deliberate horizontal-flow primitive.
42
+ - `.ly-scroll` is the deliberate bounded vertical-scroll primitive.
43
+
44
+ In normal use, only `.ly-reel` introduces intentional horizontal scrolling, and only `.ly-scroll` introduces intentional vertical scrolling. Other wrappers, primitives, and recipes clamp to their available inline size.
45
+
46
+ ## Height Behavior
47
+
48
+ Page, cover, and bounded scroll behaviors use `vh` fallbacks followed by dynamic viewport units such as `100dvh`.
49
+
50
+ At `44rem` viewport height or less, gaps and scroll maxima tighten. At `30rem` or less, forced cover/shell minimums and recipe-owned sticky positioning are removed. Required regions remain in normal document flow.
51
+
52
+ ## Public Tuning
53
+
54
+ Advanced consumers can override stable custom properties for:
55
+
56
+ - gaps and spacing
57
+ - wrapper measures and gutters
58
+ - sidebar, pane, media, reel, and grid minimums
59
+ - frame ratios
60
+ - shell, cover, and bounded-scroll sizing
61
+
62
+ These tokens tune behavior without creating a second breakpoint system.