layout-style-css 3.0.0 → 3.0.2

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.
@@ -34,11 +34,11 @@
34
34
  }
35
35
 
36
36
  .ly-section--compact {
37
- --ly-section-padding-block: var(--ly-space-7);
37
+ padding-block: var(--ly-section-padding-block-compact);
38
38
  }
39
39
 
40
40
  .ly-section--flush {
41
- --ly-section-padding-block: 0;
41
+ padding-block: 0;
42
42
  }
43
43
 
44
44
  .ly-readable {
package/dist/recipes.css CHANGED
@@ -42,7 +42,7 @@
42
42
  "main"
43
43
  "aside"
44
44
  "footer";
45
- grid-template-rows: auto auto minmax(0, 1fr) auto auto;
45
+ grid-template-rows: var(--ly-app-shell-base-rows);
46
46
  }
47
47
 
48
48
  [data-ly-recipe="dashboard"],
@@ -173,6 +173,7 @@
173
173
  [data-ly-recipe="app-shell"]:not([data-ly-responsive="manual"]) {
174
174
  grid-template-areas: var(--ly-app-shell-medium-areas);
175
175
  grid-template-columns: var(--ly-app-shell-medium-columns);
176
+ grid-template-rows: var(--ly-app-shell-medium-rows);
176
177
  }
177
178
 
178
179
  [data-ly-recipe="dashboard"]:not([data-ly-responsive="manual"]) {
@@ -185,6 +186,7 @@
185
186
  [data-ly-recipe="app-shell"]:not([data-ly-responsive="manual"]) {
186
187
  grid-template-areas: var(--ly-app-shell-wide-areas);
187
188
  grid-template-columns: var(--ly-app-shell-wide-columns);
189
+ grid-template-rows: var(--ly-app-shell-wide-rows);
188
190
  }
189
191
 
190
192
  [data-ly-recipe="dashboard"]:not([data-ly-responsive="manual"]) {
package/dist/wrappers.css CHANGED
@@ -5,7 +5,7 @@
5
5
  @layer ly.wrappers {
6
6
  .ly-wrapper {
7
7
  --ly-wrapper-max: var(--ly-personality-wrapper-max, var(--ly-wrapper-content));
8
- --ly-wrapper-fluid-gutter: clamp(1rem, 3vw, 3rem);
8
+ --ly-wrapper-fluid-gutter: var(--ly-wrapper-gutter);
9
9
  --ly-wrapper-local-gutter: max(
10
10
  var(--ly-wrapper-fluid-gutter),
11
11
  var(--ly-safe-area-inline)
@@ -19,13 +19,6 @@
19
19
  padding-inline: var(--ly-wrapper-local-gutter);
20
20
  }
21
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
- }
27
- }
28
-
29
22
  .ly-wrapper--compact {
30
23
  --ly-wrapper-max: var(--ly-wrapper-compact);
31
24
  }
@@ -0,0 +1,38 @@
1
+ # Contributing
2
+
3
+ Contributions must preserve the package boundary: Layout Style owns structure, UI Style Kit owns visual paint, and Interactive Surface owns interaction states.
4
+
5
+ ## Workflow
6
+
7
+ ```bash
8
+ npm ci
9
+ npm run build
10
+ npm run lint
11
+ npm run check:demo-js
12
+ npm test
13
+ ```
14
+
15
+ Use `npm run test:demo:all` for rendered layout changes and `npm run release:verify` before release-facing work is merged.
16
+
17
+ ## Source And Generated Files
18
+
19
+ - Edit authored modules in `styles/`.
20
+ - Regenerate `dist/` with `npm run build`.
21
+ - Keep the shared cascade-layer prelude in every public entry.
22
+ - Never hand-edit generated CSS or Pages output.
23
+ - Use professional comments for containment, accessibility, cascade, or build-safety decisions.
24
+
25
+ ## Layout Rules
26
+
27
+ - Prefix public classes with `ly-`.
28
+ - Keep the mobile DOM, reading, and focus order authoritative.
29
+ - Use named areas in built-in recipes; never use `order` there.
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.
33
+ - Use `minmax(0, 1fr)` or guarded floors for tracks that receive application content.
34
+ - Do not add colors, typography, borders, shadows, component paint, focus styles, or native control styles.
35
+
36
+ ## Documentation
37
+
38
+ Update README, migration guide, wiki, changelog, demo metadata, and contract tests whenever an export, selector, recipe, compatibility rule, browser baseline, or release command changes.
@@ -0,0 +1,44 @@
1
+ # Demo And GitHub Pages
2
+
3
+ The v3 demo is an intrinsic responsive workbench, not a fixed-device screenshot gallery.
4
+
5
+ ## Controls
6
+
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
13
+
14
+ Device presets cover the release allocations:
15
+
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`
22
+
23
+ Threshold controls also cover one rem below and above `42rem`, `44rem`, `48rem`, `52rem`, and `72rem`, plus the `30rem` and `44rem` height tiers.
24
+
25
+ ## Local Verification
26
+
27
+ ```bash
28
+ npm run build
29
+ npm run test:demo:quick
30
+ npm run test:demo:all
31
+ ```
32
+
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.
34
+
35
+ ## GitHub Pages
36
+
37
+ ```bash
38
+ npm run pages:build
39
+ npm run test:pages
40
+ ```
41
+
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.
43
+
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.
@@ -0,0 +1,63 @@
1
+ # Getting Started
2
+
3
+ Install `layout-style-css@3.0.2` and import the root bundle:
4
+
5
+ ```bash
6
+ npm install layout-style-css@3.0.2
7
+ ```
8
+
9
+ ```js
10
+ import "layout-style-css";
11
+ ```
12
+
13
+ ## First Automatic Layout
14
+
15
+ The zero-configuration path needs only `.ly-root`, a recipe attribute, and semantic areas:
16
+
17
+ ```html
18
+ <body class="ly-root" data-ly-layout="minimal-saas">
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>
23
+ </div>
24
+ </body>
25
+ ```
26
+
27
+ The recipe stays stacked below `42rem` and enhances automatically when its nearest `ly-scope` container has enough room.
28
+
29
+ ## Optional Wrapper
30
+
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
+ }
54
+ ```
55
+
56
+ Keep mobile DOM order authoritative. The package never changes reading or focus order.
57
+
58
+ ## Next
59
+
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)
@@ -0,0 +1,27 @@
1
+ # Layout Style CSS v3
2
+
3
+ `layout-style-css@3.0.2` is a dependency-free, CSS-only structural system for layouts that adapt to available width and height.
4
+
5
+ ## Contract
6
+
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.
14
+
15
+ Layout owns structure. UI Style Kit owns paint. Interactive Surface owns interaction styling.
16
+
17
+ ## Documentation
18
+
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)
@@ -0,0 +1,77 @@
1
+ # Installation And CDN
2
+
3
+ ## Requirements
4
+
5
+ - Node.js 20 or newer for development
6
+ - Evergreen Chromium, Firefox, or WebKit
7
+ - No runtime or peer dependencies
8
+
9
+ ## Package
10
+
11
+ ```bash
12
+ npm install layout-style-css@3.0.2
13
+ ```
14
+
15
+ ```js
16
+ import "layout-style-css";
17
+ ```
18
+
19
+ The root import is the zero-configuration full bundle. Focused exports are:
20
+
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`.
22
+
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`
33
+
34
+ `core.css` contains Foundation, Wrappers, Primitives, Recipes, and Utilities. The default bundle adds all personality profiles.
35
+
36
+ ## CDN
37
+
38
+ ```html
39
+ <link rel="stylesheet" href="https://unpkg.com/layout-style-css@3.0.2/dist/layout-style-css.min.css">
40
+ ```
41
+
42
+ ```html
43
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layout-style-css@3.0.2/dist/layout-style-css.min.css">
44
+ ```
45
+
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:
51
+
52
+ ```js
53
+ import "ui-style-kit-css/visual.css";
54
+ import "ui-style-kit-css/interactive-surface-theme.css";
55
+ import "interactive-surface-css/state-core.css";
56
+ import "layout-style-css";
57
+ ```
58
+
59
+ Layout owns structure. UI Style Kit owns paint. Interactive Surface owns interaction styling.
60
+
61
+ ## Cascade Layers
62
+
63
+ The module order is:
64
+
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`
72
+
73
+ Application styles can override public custom properties without reordering the package modules.
74
+
75
+ ## Clean-Break Note
76
+
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).
@@ -0,0 +1,66 @@
1
+ # Layout Primitives
2
+
3
+ ## Foundation And Containment
4
+
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
+
7
+ Every primitive applies `min-inline-size: 0` and `min-block-size: 0` where tracks or children need to shrink.
8
+
9
+ ## Wrappers
10
+
11
+ Wrappers are optional local responsive scopes:
12
+
13
+ - `.ly-wrapper--compact`
14
+ - `.ly-wrapper--prose`
15
+ - `.ly-wrapper--content`
16
+ - `.ly-wrapper--wide`
17
+ - `.ly-wrapper--full`
18
+ - `.ly-wrapper--breakout`
19
+
20
+ Breakout children select clamped lanes with `data-ly-lane="content"`, `data-ly-lane="feature"`, or `data-ly-lane="full"`.
21
+
22
+ `--ly-page-padding-inline` supplies the default `--ly-wrapper-gutter` value. `--ly-wrapper-gutter` controls rendered Wrapper padding at the scope where it is overridden, while the Wrapper applies safe-area compensation once at its outer edge.
23
+
24
+ ## Flow
25
+
26
+ - `.ly-stack` creates vertical flow.
27
+ - `.ly-cluster` wraps inline groups.
28
+ - `.ly-center` centers a bounded composition.
29
+ - `.ly-cover` fills available block size while preserving reachable normal flow.
30
+
31
+ ## Adaptive Tracks
32
+
33
+ - `.ly-switcher` wraps when its intrinsic threshold is no longer feasible.
34
+ - `.ly-sidebar` keeps a preferred rail while the content can meet its minimum.
35
+ - `.ly-grid` uses auto-fit tracks and `--ly-grid-min`.
36
+ - `.ly-split` creates balanced intrinsic regions.
37
+ - `.ly-panes` creates a preferred workspace rail and flexible pane.
38
+ - `.ly-media` wraps media and content without a viewport breakpoint.
39
+
40
+ ## Frame And Overflow
41
+
42
+ - `.ly-frame` keeps a configurable aspect ratio.
43
+ - `.ly-reel` is the deliberate horizontal-flow primitive.
44
+ - `.ly-scroll` is the deliberate bounded vertical-scroll primitive.
45
+
46
+ 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.
47
+
48
+ ## Height Behavior
49
+
50
+ Page, cover, and bounded scroll behaviors use `vh` fallbacks followed by dynamic viewport units such as `100dvh`.
51
+
52
+ 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.
53
+
54
+ `--ly-section-padding-block` controls normal `.ly-section` spacing. `--ly-section-padding-block-compact` controls `.ly-section--compact` independently and remains smaller than the normal value across regular, short, and shallow viewport heights.
55
+
56
+ ## Public Tuning
57
+
58
+ Advanced consumers can override stable custom properties for:
59
+
60
+ - gaps and spacing
61
+ - wrapper measures and gutters
62
+ - sidebar, pane, media, reel, and grid minimums
63
+ - frame ratios
64
+ - shell, cover, and bounded-scroll sizing
65
+
66
+ These tokens tune behavior without creating a second breakpoint system.
@@ -0,0 +1,60 @@
1
+ # Layout Recipes
2
+
3
+ Recipes are attribute-only semantic layouts. The mobile DOM order is authoritative, and automatic container enhancement is the zero-configuration default.
4
+
5
+ ## Automatic Thresholds
6
+
7
+ | Recipe | Nearest `ly-scope` threshold |
8
+ | --- | --- |
9
+ | `data-ly-recipe="split-hero"` | `42rem` |
10
+ | `data-ly-recipe="list-detail"` | `44rem` |
11
+ | `data-ly-recipe="docs"` | `48rem` |
12
+ | `data-ly-recipe="app-shell"` | medium `52rem`, wide `72rem` |
13
+ | `data-ly-recipe="dashboard"` | medium `52rem`, wide `72rem` |
14
+ | `data-ly-recipe="gallery"` | intrinsic; no topology query |
15
+ | `data-ly-recipe="card-grid"` | intrinsic; no topology query |
16
+
17
+ Recipe roots also establish `ly-scope`, so child compositions can respond without extra setup.
18
+
19
+ App Shell base, medium, and wide topologies own matching row definitions. Header and footer tracks remain intrinsic while the main workspace receives the flexible row, including personality-specific four-row topologies.
20
+
21
+ ## Areas
22
+
23
+ Canonical `data-ly-area` values are:
24
+
25
+ - App shell: `header`, `sidebar`, `main`, `aside`, `footer`
26
+ - Dashboard and Docs: `header`, `nav`, `main`, `aside`, `footer`
27
+ - List detail: `primary`, `secondary`, `actions`
28
+ - Split hero: `content`, `media`, `actions`
29
+
30
+ ```html
31
+ <section data-ly-recipe="docs">
32
+ <header data-ly-area="header">Docs</header>
33
+ <nav data-ly-area="nav" aria-label="Documentation">Navigation</nav>
34
+ <main data-ly-area="main">Article</main>
35
+ <aside data-ly-area="aside">On this page</aside>
36
+ <footer data-ly-area="footer">Next</footer>
37
+ </section>
38
+ ```
39
+
40
+ ## Manual Responsiveness
41
+
42
+ `data-ly-responsive="manual"` disables automatic topology rules while retaining the stacked fallback.
43
+
44
+ ```css
45
+ @container ly-scope (min-width: 56rem) {
46
+ [data-ly-recipe="docs"][data-ly-responsive="manual"] {
47
+ /* Application-owned topology. */
48
+ }
49
+ }
50
+ ```
51
+
52
+ Use the nearest wrapper as the query boundary when a component needs a constrained local allocation. Use a recipe directly in `.ly-root` when no measure wrapper is needed.
53
+
54
+ ## Accessibility
55
+
56
+ Write the source in mobile reading order and keep actions beside the content they control. Named grid areas can change visual placement, but they do not alter DOM, reading, keyboard, or focus order. Visual-order utilities are not part of v3.
57
+
58
+ ## Vertical Responsiveness
59
+
60
+ Recipe gaps and scroll bounds tighten at `44rem` viewport height. At `30rem`, recipe-owned sticky positioning and forced shell height stop so navigation, main content, and actions remain reachable.
@@ -0,0 +1,69 @@
1
+ # Layout Styles
2
+
3
+ The sixteen `data-ly-layout` values are focused token and topology profiles:
4
+
5
+ `minimal-saas`, `bauhaus`, `tactile`, `cyberpunk`, `f-pattern`, `brutalism`, `neumorphism`, `y2k`, `retro-glass`, `z-pattern`, `retrofuturism`, `mondrian`, `synthwave`, `bento`, `maximalist`, and `split-screen`.
6
+
7
+ ```html
8
+ <body class="ly-root" data-ly-layout="bento">
9
+ <main data-ly-recipe="dashboard">...</main>
10
+ </body>
11
+ ```
12
+
13
+ ## Shared Engine
14
+
15
+ Every profile feeds the same wrapper, primitive, and recipe engine. Profiles tune values such as:
16
+
17
+ - wrapper measure
18
+ - base and grid gaps
19
+ - rail, pane, and media preferences
20
+ - gallery and card minimums
21
+ - frame ratio
22
+ - shared recipe area and track templates
23
+
24
+ A profile must remain visibly distinct through at least two spatial characteristics. Personality files may not declare their own `@container`, viewport, or orientation breakpoint systems.
25
+
26
+ When a profile supplies an App Shell area template, its matching row definition must contain the same number of rows and keep the main workspace on the flexible track.
27
+
28
+ ## Ownership
29
+
30
+ Layout owns structure. UI Style Kit owns paint. Interactive Surface owns interaction styling.
31
+
32
+ The personality name does not promise colors, typography, borders, shadows, or interaction states. Pair the same name across libraries when desired, but import each library explicitly and let it own its layer.
33
+
34
+ ## Visual Pairing Guidance
35
+
36
+ [`layout-style-css/personalities.json`](../../personalities.json) is the public, machine-readable pairing source used by the demo. Its entries are recommendations, never dependencies: `data-ly-layout`, `data-ui`, `data-theme`, and `data-mode` are independently selectable on the same document.
37
+
38
+ | Layout personality | Visual pairing guidance |
39
+ | --- | --- |
40
+ | Minimal SaaS | Native match: `minimal-saas` |
41
+ | Bento | Native match: `bento` |
42
+ | Maximalist | Native match: `maximalist` |
43
+ | Bauhaus | Native match: `bauhaus` |
44
+ | Tactile | Native match: `tactile` |
45
+ | Neumorphism | Native match: `neumorphism` |
46
+ | Retrofuturism | Native match: `retrofuturism` |
47
+ | Brutalism | Native match: `brutalism` |
48
+ | Cyberpunk | Native match: `cyberpunk` |
49
+ | Y2K | Native match: `y2k` |
50
+ | Retro Glass | Native match: `retro-glass` |
51
+ | F-pattern | Any visual preset; this is structure only |
52
+ | Z-pattern | Any visual preset; this is structure only |
53
+ | Split Screen | Any visual preset; this is structure only |
54
+ | Mondrian | Any visual preset; this is structure only |
55
+ | Synthwave | Recommended: `cyberpunk` or `retrofuturism`; the browser contract verifies each preset's distinct rendered article shadow while retaining `data-ly-layout="synthwave"` |
56
+
57
+ ## Customization
58
+
59
+ Override public tokens at `.ly-root` or a narrower scope:
60
+
61
+ ```css
62
+ .product-shell {
63
+ --ly-profile-gap: 1.25rem;
64
+ --ly-recipe-rail: 17rem;
65
+ --ly-card-grid-min: 18rem;
66
+ }
67
+ ```
68
+
69
+ Use `data-ly-responsive="manual"` plus an application-owned `@container ly-scope` query when token tuning is not enough.