layout-style-css 2.1.1 → 3.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 (79) hide show
  1. package/README.md +124 -145
  2. package/dist/core.css +2 -1
  3. package/dist/foundation.css +194 -0
  4. package/dist/layout-style-css.css +527 -984
  5. package/dist/layout-style-css.min.css +1 -1
  6. package/dist/personalities/bauhaus.css +13 -42
  7. package/dist/personalities/bento.css +16 -40
  8. package/dist/personalities/brutalism.css +13 -33
  9. package/dist/personalities/cyberpunk.css +12 -32
  10. package/dist/personalities/f-pattern.css +16 -45
  11. package/dist/personalities/maximalist.css +16 -48
  12. package/dist/personalities/minimal-saas.css +7 -33
  13. package/dist/personalities/mondrian.css +12 -40
  14. package/dist/personalities/neumorphism.css +15 -39
  15. package/dist/personalities/retro-glass.css +14 -42
  16. package/dist/personalities/retrofuturism.css +12 -32
  17. package/dist/personalities/split-screen.css +24 -36
  18. package/dist/personalities/synthwave.css +13 -41
  19. package/dist/personalities/tactile.css +15 -32
  20. package/dist/personalities/y2k.css +13 -33
  21. package/dist/personalities/z-pattern.css +16 -46
  22. package/dist/personalities.css +1 -1
  23. package/dist/primitives.css +27 -63
  24. package/dist/recipes.css +92 -175
  25. package/dist/utilities.css +39 -104
  26. package/dist/wrappers.css +28 -108
  27. package/package.json +12 -24
  28. package/CHANGELOG.md +0 -107
  29. package/CONTRIBUTING.md +0 -55
  30. package/SECURITY.md +0 -50
  31. package/demo/assets/apple-touch-icon.svg +0 -7
  32. package/demo/assets/favicon.svg +0 -7
  33. package/demo/assets/social-card.png +0 -0
  34. package/demo/browserconfig.xml +0 -9
  35. package/demo/demo.css +0 -523
  36. package/demo/demo.js +0 -605
  37. package/demo/index.html +0 -325
  38. package/demo/robots.txt +0 -4
  39. package/demo/site.webmanifest +0 -23
  40. package/demo/sitemap.xml +0 -9
  41. package/dist/integrations/ui-style-kit.css +0 -175
  42. package/dist/legacy.css +0 -822
  43. package/docs/wiki/Contributing.md +0 -36
  44. package/docs/wiki/Demo-And-GitHub-Pages.md +0 -53
  45. package/docs/wiki/Getting-Started.md +0 -51
  46. package/docs/wiki/Home.md +0 -33
  47. package/docs/wiki/Installation-And-CDN.md +0 -72
  48. package/docs/wiki/Layout-Primitives.md +0 -48
  49. package/docs/wiki/Layout-Recipes.md +0 -49
  50. package/docs/wiki/Layout-Styles.md +0 -33
  51. package/docs/wiki/Migrating-To-2.0.md +0 -186
  52. package/docs/wiki/Release-And-Publishing.md +0 -77
  53. package/docs/wiki/Security-And-Support.md +0 -36
  54. package/docs/wiki/UI-Style-Kit-Compatibility.md +0 -49
  55. package/docs/wiki/_Sidebar.md +0 -15
  56. package/styles/core.css +0 -6
  57. package/styles/integrations/ui-style-kit.css +0 -175
  58. package/styles/legacy.css +0 -173
  59. package/styles/personalities/bauhaus.css +0 -49
  60. package/styles/personalities/bento.css +0 -46
  61. package/styles/personalities/brutalism.css +0 -39
  62. package/styles/personalities/cyberpunk.css +0 -39
  63. package/styles/personalities/f-pattern.css +0 -51
  64. package/styles/personalities/maximalist.css +0 -54
  65. package/styles/personalities/minimal-saas.css +0 -39
  66. package/styles/personalities/mondrian.css +0 -47
  67. package/styles/personalities/neumorphism.css +0 -46
  68. package/styles/personalities/retro-glass.css +0 -47
  69. package/styles/personalities/retrofuturism.css +0 -39
  70. package/styles/personalities/split-screen.css +0 -41
  71. package/styles/personalities/synthwave.css +0 -48
  72. package/styles/personalities/tactile.css +0 -39
  73. package/styles/personalities/y2k.css +0 -39
  74. package/styles/personalities/z-pattern.css +0 -52
  75. package/styles/personalities.css +0 -18
  76. package/styles/primitives.css +0 -219
  77. package/styles/recipes.css +0 -278
  78. package/styles/utilities.css +0 -162
  79. package/styles/wrappers.css +0 -174
@@ -1,36 +0,0 @@
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 below and above `48rem` and `64rem`.
31
- - Use `minmax(0, 1fr)` or guarded floors for tracks that receive application content.
32
- - Do not add colors, typography, borders, shadows, component paint, focus styles, or native control styles.
33
-
34
- ## Documentation
35
-
36
- Update README, migration guide, wiki, changelog, demo metadata, and contract tests whenever an export, selector, recipe, compatibility rule, browser baseline, or release command changes.
@@ -1,53 +0,0 @@
1
- # Demo And GitHub Pages
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/`.
4
-
5
- ## Local Gates
6
-
7
- The quick gate uses Chromium and a representative rendered matrix:
8
-
9
- ```bash
10
- npm run test:demo:quick
11
- ```
12
-
13
- Run one complete engine matrix:
14
-
15
- ```bash
16
- npm run test:demo:chromium
17
- npm run test:demo:firefox
18
- npm run test:demo:webkit
19
- ```
20
-
21
- Run all supported engines:
22
-
23
- ```bash
24
- npm run test:demo:all
25
- ```
26
-
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`.
43
-
44
- ## Pages Artifact
45
-
46
- ```bash
47
- npm run pages:build
48
- node test/pages-artifact.test.mjs
49
- ```
50
-
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.
52
-
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.
@@ -1,51 +0,0 @@
1
- # Getting Started
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.
8
-
9
- ```bash
10
- npm install layout-style-css@2.1.1
11
- ```
12
-
13
- ## Import
14
-
15
- ```js
16
- import "layout-style-css";
17
- ```
18
-
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
22
-
23
- Place the recipe inside a `.ly-wrapper`. The wrapper supplies inline-size containment, fluid logical gutters, and safe-area compensation.
24
-
25
- ```html
26
- <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>
35
- </div>
36
- </body>
37
- ```
38
-
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.
40
-
41
- ## Switch Personality
42
-
43
- ```js
44
- document.querySelector(".ly-root").dataset.lyLayout = "synthwave";
45
- ```
46
-
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.
48
-
49
- ## Migrate Existing Markup
50
-
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.
package/docs/wiki/Home.md DELETED
@@ -1,33 +0,0 @@
1
- # Layout Style CSS Wiki
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.
4
-
5
- ## Start Here
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. |
20
-
21
- ## Ownership
22
-
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.
24
-
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.
@@ -1,72 +0,0 @@
1
- # Installation And CDN
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.
4
-
5
- ## npm
6
-
7
- ```bash
8
- npm install layout-style-css@2.1.1
9
- ```
10
-
11
- ## Focused Exports
12
-
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. |
26
-
27
- The old `all-with-ui-kit*`, `all.css`, `base.css`, `bridge.css`, and root personality exports do not exist in v2.
28
-
29
- ## Import Modes
30
-
31
- Standalone:
32
-
33
- ```js
34
- import "layout-style-css";
35
- ```
36
-
37
- Layout plus UI Style Kit:
38
-
39
- ```js
40
- import "ui-style-kit-css/visual.css";
41
- import "layout-style-css";
42
- ```
43
-
44
- All three libraries, in required order:
45
-
46
- ```js
47
- import "ui-style-kit-css/visual.css";
48
- import "ui-style-kit-css/interactive-surface-theme.css";
49
- import "interactive-surface-css/state-core.css";
50
- import "layout-style-css";
51
- ```
52
-
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.
54
-
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
- ```
63
-
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.
65
-
66
- ## Browser Baseline
67
-
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.
69
-
70
- ## Source Ownership
71
-
72
- `styles/` contains authored CSS. `dist/` is generated. Consumers should use package exports or CDN dist files, never internal source paths.
@@ -1,48 +0,0 @@
1
- # Layout Primitives
2
-
3
- V2 primitives are structural, mobile-first, and safe to use without a visual design system.
4
-
5
- ## Semantic Wrappers
6
-
7
- `.ly-wrapper` defaults to the `72rem` content measure and establishes an inline-size container. Fluid logical gutters include safe-area insets.
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.
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 |
19
-
20
- Breakout children use `.ly-lane--content`, `.ly-lane--feature`, `.ly-lane--full`, or equivalent `data-ly-lane` attributes.
21
-
22
- ## Composition
23
-
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. |
39
-
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.
41
-
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.
43
-
44
- ## Structural Utilities
45
-
46
- The utility module includes grid column variables, spans, gaps, padding, sizing, overflow, alignment, frame ratios, visibility, and explicit order escape hatches.
47
-
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.
@@ -1,49 +0,0 @@
1
- # Layout Recipes
2
-
3
- Recipes are inline-size containers with an authoritative single-column mobile fallback. At the `48rem` and `64rem` core thresholds, named grid areas rearrange without changing DOM, reading, or focus order. Layout personalities can layer personality-specific thresholds over those core recipes.
4
-
5
- ## Public Hooks
6
-
7
- Use `data-ly-recipe` with one of:
8
-
9
- - `app-shell`
10
- - `dashboard`
11
- - `docs`
12
- - `list-detail`
13
- - `split-hero`
14
- - `gallery`
15
- - `card-grid`
16
-
17
- The attribute is the complete recipe API, not metadata for a class. A root with only `data-ly-recipe="docs"` receives the same mobile fallback, containment, named areas, and responsive geometry as `.ly-docs`; the class form remains available as an equivalent option.
18
-
19
- Use `data-ly-area` with `header`, `nav`, `main`, `aside`, `footer`, `content`, `media`, `actions`, `primary`, or `secondary`.
20
-
21
- ## Application Recipe
22
-
23
- ```html
24
- <div class="ly-wrapper ly-wrapper--wide">
25
- <section class="ly-app-shell" data-ly-recipe="app-shell">
26
- <header data-ly-area="header">Toolbar</header>
27
- <nav data-ly-area="nav" aria-label="Application">Navigation</nav>
28
- <main data-ly-area="main">Workspace</main>
29
- <aside data-ly-area="aside">Inspector</aside>
30
- <footer data-ly-area="footer">Status</footer>
31
- </section>
32
- </div>
33
- ```
34
-
35
- Place regions in the order that makes sense on a narrow screen. The recipe uses named areas for wide-container placement and never uses CSS `order`.
36
-
37
- ## Content And Media Recipes
38
-
39
- `docs` creates a documentation shell. At `64rem`, its navigation spans the left column while `header`, `main`, `aside`, and `footer` remain in source order and stack in the right column; Dashboard retains its three-column wide shell. `list-detail` arranges primary, secondary, and action regions. `split-hero` arranges content, media, and actions. `gallery` and `card-grid` create responsive repeated-item grids.
40
-
41
- ```html
42
- <section class="ly-split-hero" data-ly-recipe="split-hero">
43
- <div data-ly-area="content">Primary message</div>
44
- <figure data-ly-area="media">Media</figure>
45
- <div data-ly-area="actions">Actions</div>
46
- </section>
47
- ```
48
-
49
- Built-in recipes never use an order utility. If application-specific visual order is unavoidable, review the warning in [Layout Primitives](Layout-Primitives.md) and test keyboard and assistive-technology behavior.
@@ -1,33 +0,0 @@
1
- # Layout Styles
2
-
3
- V2 calls spatial styles “personalities” and selects them with the canonical `data-ly-layout` hook on `.ly-root`.
4
-
5
- ```html
6
- <body class="ly-root" data-ly-layout="synthwave">...</body>
7
- ```
8
-
9
- ## Sixteen Personalities
10
-
11
- | Family | Personality | Spatial character |
12
- | --- | --- | --- |
13
- | Left rail | `minimal-saas` | Restrained application rail and measured workspace. |
14
- | Left rail | `bauhaus` | Modular columns and assertive structural rhythm. |
15
- | Left rail | `tactile` | Heavier instrument rail and chunky spacing. |
16
- | Left rail | `cyberpunk` | Narrow command rail and dense track rhythm. |
17
- | Left rail | `f-pattern` | Top-and-left scan emphasis. |
18
- | Right rail | `brutalism` | Raw workspace with a strong right support rail. |
19
- | Right rail | `neumorphism` | Roomy central workspace and detached right rail. |
20
- | Right rail | `y2k` | Centered hub with a dock-like support region. |
21
- | Right rail | `retro-glass` | Broad stage with a floating right utility zone. |
22
- | Right rail | `z-pattern` | Diagonal reading path into a right support rail. |
23
- | Three zone | `retrofuturism` | Panoramic bridge with symmetric support zones. |
24
- | Three zone | `mondrian` | Asymmetric block composition. |
25
- | Three zone | `synthwave` | Cinematic center stage with flanking zones. |
26
- | Mosaic | `bento` | Full-width modular tile rhythm. |
27
- | Mosaic | `maximalist` | Staggered editorial spans and broad measure. |
28
- | Equal split | `split-screen` | Two equally weighted primary regions. |
29
-
30
- Every personality changes at least two structural characteristics, such as area placement, shell direction, grid/span rhythm, wrapper measure, or responsive threshold. Enhancements query the nearest inline-size container: grid rhythms retain their authored thresholds, safe two-track application shells retain their authored thresholds, and three- or four-track application shells wait until the local allocation reaches `64rem`. Personalities never set UI paint or change DOM order.
31
-
32
- The v1 `data-layout`, `layout-style`, `.ly-layout-*`, and `.ly-style-*` hooks are available only through `layout-style-css/legacy.css`. New code must use `data-ly-layout`.
33
-
@@ -1,186 +0,0 @@
1
- # Migrating To 2.0
2
-
3
- Version 2.0 rebuilds Layout Style CSS as a container-first, dependency-free structural layout system. This guide maps the complete 1.x public surface to v2 and identifies the compatibility window.
4
-
5
- ## Runtime And Tooling Contract
6
-
7
- - Development and release scripts require Node.js 20 or newer.
8
- - The package has no runtime dependencies and no peer dependencies.
9
- - `ui-style-kit-css@2.1.0` and `interactive-surface-css@1.5.0` are released registry fixtures; neither is a consumer dependency.
10
- - Current evergreen Chromium, Firefox, and WebKit are supported.
11
- - Responsive recipes use core thresholds at `48rem` and `64rem`; personalities may add personality-specific thresholds.
12
-
13
- Install companions explicitly only when the application uses them:
14
-
15
- ```bash
16
- npm install layout-style-css@2.1.1
17
- npm install ui-style-kit-css@2.1.0 interactive-surface-css@1.5.0
18
- ```
19
-
20
- Layout Style CSS 2.1 keeps the v2 layout contract and updates the optional companion fixture path to UI Style Kit visual CSS, its Interactive Surface token bridge, and Interactive Surface 1.5 state core.
21
-
22
- ## Export Changes
23
-
24
- The v2 package exports are focused and companion-free:
25
-
26
- | V2 import | Purpose |
27
- | --- | --- |
28
- | `layout-style-css` | Default full bundle: core plus all personalities. |
29
- | `layout-style-css/min.css` | Minified full bundle. |
30
- | `layout-style-css/core.css` | Wrappers, primitives, recipes, and utilities. |
31
- | `layout-style-css/wrappers.css` | Tokens, reset, safe-area gutters, and wrappers. |
32
- | `layout-style-css/primitives.css` | Composition primitives. |
33
- | `layout-style-css/recipes.css` | Functional recipes and named areas. |
34
- | `layout-style-css/utilities.css` | Structural and order utilities. |
35
- | `layout-style-css/personalities.css` | All personalities. |
36
- | `layout-style-css/personalities/minimal-saas.css` | One personality; replace the filename with any of the sixteen names. |
37
- | `layout-style-css/integrations/ui-style-kit.css` | Import-free UI Style Kit structural bridge. |
38
- | `layout-style-css/legacy.css` | Full v2 bundle plus v1 selector aliases. |
39
-
40
- The following v1 exports were removed from the default contract:
41
-
42
- - `layout-style-css/base.css` and the old `layout-base.css` dist file
43
- - `layout-style-css/bridge.css` and `layout-ui-style-kit-bridge.css`
44
- - `layout-style-css/all.css`
45
- - `layout-style-css/all-with-ui-kit.css`
46
- - `layout-style-css/all-with-ui-kit-and-interactive-surface.css`
47
- - duplicated root personality exports such as `layout-style-css/minimal-saas.css`
48
- - root dist files named `layout-style-*.css`
49
-
50
- Replace a root personality import with its `personalities/` path. Replace old aggregates with explicit companion imports and the v2 default or focused core.
51
-
52
- ## Import Recipes
53
-
54
- Standalone Layout Style CSS:
55
-
56
- ```js
57
- import "layout-style-css";
58
- ```
59
-
60
- Layout plus UI Style Kit:
61
-
62
- ```js
63
- import "ui-style-kit-css/visual.css";
64
- import "layout-style-css/integrations/ui-style-kit.css";
65
- import "layout-style-css";
66
- ```
67
-
68
- All three libraries must be imported in this exact order:
69
-
70
- ```js
71
- import "ui-style-kit-css/visual.css";
72
- import "ui-style-kit-css/interactive-surface-theme.css";
73
- import "interactive-surface-css/state-core.css";
74
- import "layout-style-css";
75
- ```
76
-
77
- The first layer supplies UI paint, the second interaction states, the third structural name mappings, and the fourth the layout system. The Layout integration file contains no package imports.
78
-
79
- ## Wrapper Mapping
80
-
81
- V2 wrapper names communicate intent rather than a generic size tier. `.ly-wrapper` now defaults to the `72rem` content measure and establishes an inline-size container. A personality may change that plain-wrapper default, but an explicit compact, prose, content, wide, full, or breakout variant always wins.
82
-
83
- | 1.x selector | V2 selector | V2 measure or behavior |
84
- | --- | --- | --- |
85
- | `.ly-container`, `.ly-wrapper` | `.ly-wrapper` or `.ly-wrapper--content` | Default `72rem` content wrapper |
86
- | `.ly-container--sm`, `.ly-wrapper--sm` | `.ly-wrapper--compact` | `40rem` |
87
- | `.ly-container--md`, `.ly-wrapper--md` | Local `--ly-wrapper-max: 56rem` override, or temporary `legacy.css` | No canonical v2 tier |
88
- | `.ly-wrapper--readable` | `.ly-wrapper--prose` | `68ch` |
89
- | `.ly-container--lg`, `.ly-wrapper--lg` | `.ly-wrapper--content` | `72rem` |
90
- | `.ly-container--xl`, `.ly-wrapper--xl` | `.ly-wrapper--wide` | `112rem` in the new semantic scale |
91
- | `.ly-container--wide`, `.ly-wrapper--wide` | `.ly-wrapper--wide` | `112rem` |
92
- | `.ly-container--fluid`, `.ly-wrapper--fluid` | `.ly-wrapper--full` | Full available width with safe-area gutters |
93
- | No v1 equivalent | `.ly-wrapper--breakout` | Content, feature, and full-width lanes |
94
-
95
- The v1 medium `56rem` and extra-large `88rem` measures do not have canonical v2 names. Use a local `--ly-wrapper-max` override if those exact measures are product requirements, or load `legacy.css` while migrating.
96
-
97
- Breakout markup defaults to the content lane:
98
-
99
- ```html
100
- <div class="ly-wrapper ly-wrapper--breakout">
101
- <article data-ly-lane="content">Article</article>
102
- <figure data-ly-lane="feature">Feature media</figure>
103
- <section data-ly-lane="full">Full-width stage</section>
104
- </div>
105
- ```
106
-
107
- Every wrapper uses fluid logical gutters and safe-area insets. Test the containing element around the `48rem` and `64rem` core thresholds and around any selected personality threshold; viewport width alone no longer determines layout changes.
108
-
109
- ## Canonical Hooks
110
-
111
- V2 standardizes three attributes:
112
-
113
- - `data-ly-layout` selects one of the sixteen personalities.
114
- - `data-ly-recipe` identifies `app-shell`, `dashboard`, `docs`, `list-detail`, `split-hero`, `gallery`, or `card-grid`.
115
- - `data-ly-area` identifies `header`, `nav`, `main`, `aside`, `footer`, `content`, `media`, `actions`, `primary`, or `secondary`.
116
-
117
- Every `data-ly-recipe` value is a complete alternative to its matching recipe class. For example, `data-ly-recipe="dashboard"` works without `.ly-dashboard`; applications may keep the class API, use the attribute API, or include both during migration.
118
-
119
- ```html
120
- <body class="ly-root" data-ly-layout="minimal-saas">
121
- <div class="ly-dashboard" data-ly-recipe="dashboard">
122
- <header data-ly-area="header">Header</header>
123
- <nav data-ly-area="nav">Navigation</nav>
124
- <main data-ly-area="main">Main</main>
125
- <aside data-ly-area="aside">Aside</aside>
126
- <footer data-ly-area="footer">Footer</footer>
127
- </div>
128
- </body>
129
- ```
130
-
131
- The v1 personality hooks `data-layout`, `layout-style`, `.ly-layout-*`, and `.ly-style-*` are legacy-only. Move the personality value to `data-ly-layout` on `.ly-root`.
132
-
133
- ## Primitive And Recipe Mapping
134
-
135
- The v2 composition set is stack, cluster, center, cover, switcher, sidebar, grid, split, panes, media, reel, frame, and bounded scroll.
136
-
137
- | 1.x API | V2 API |
138
- | --- | --- |
139
- | `.ly-row` plus `.ly-col-*` | `.ly-grid` plus `.ly-cols-*` and `.ly-span-*`, or `.ly-cluster` for wrapping flow |
140
- | `.ly-carousel` | `.ly-reel` |
141
- | `.ly-scroll-area` | `.ly-scroll` |
142
- | `.ly-sidebar-layout` | `.ly-sidebar` or the `docs` recipe |
143
- | `.ly-panes--two` | `.ly-panes--2` |
144
- | `.ly-panes--three` | `.ly-panes--3` |
145
- | Ad hoc shell class combinations | A matching `data-ly-recipe` root with named `data-ly-area` children |
146
- | `.ly-button-group` | `.ly-cluster` |
147
- | `.ly-card-grid` | `data-ly-recipe="card-grid"` or `.ly-card-grid` |
148
- | `.ly-gallery` | `data-ly-recipe="gallery"` or `.ly-gallery` |
149
- | `.ly-content` | V2 primitives and recipe areas already apply shrink safety; `legacy.css` preserves the structural `min-inline-size: 0` alias for ad hoc v1 content regions. |
150
- | `.ly-divider` | Replace spacing with a stack gap or spacing utility and source the visual divider from UI Style Kit or the application theme. `legacy.css` preserves only its `1px` minimum block geometry and block spacing, never paint. |
151
- | `.ly-surface--raised` | Removed. Raised radius, border, background, and shadow treatment belongs to UI Style Kit or application theme styling, so `legacy.css` intentionally does not restore this selector. |
152
-
153
- The v1 column, carousel, button-group, sidebar, pane, card-size, app-area, scroll, content, and structural divider aliases remain functional only through `legacy.css`. The paint-owned `.ly-surface--raised` API is removed rather than aliased.
154
-
155
- ## Mobile Order And Accessibility
156
-
157
- DOM order is authoritative on mobile and must match the intended reading order and focus order. Built-in recipes never use CSS `order`; they rearrange named grid areas at wider containers without changing source order.
158
-
159
- V2 provides `.ly-order-first`, `.ly-order-normal`, `.ly-order-last`, and `.ly-order-1` through `.ly-order-6`. Equivalent `ly-md-order-*` and `ly-lg-order-*` utilities activate at the `48rem` and `64rem` container thresholds.
160
-
161
- These utilities are explicit escape hatches. They can make visual order disagree with assistive-technology reading order or keyboard focus order. Prefer semantic source order. When an escape hatch is unavoidable, test the complete keyboard sequence, screen-reader reading order, and mobile fallback.
162
-
163
- ## Temporary Legacy Bundle
164
-
165
- Use one import during an incremental migration:
166
-
167
- ```js
168
- import "layout-style-css/legacy.css";
169
- ```
170
-
171
- `legacy.css` imports the full v2 bundle and adds functional aliases for old wrapper names, root hooks, layout aliases, 12-column utilities, carousel, button groups, sidebar layouts, pane names, card sizing, app regions, scroll areas, `.ly-content`, and structural `.ly-divider` geometry. It does not restore `.ly-surface--raised`, companion imports, or removed package exports.
172
-
173
- Legacy compatibility is supported for the v2 line only and is scheduled for removal in v3. Treat it as a transition tool: migrate markup and imports before upgrading to the next major version.
174
-
175
- ## Migration Checklist
176
-
177
- 1. Upgrade the development runtime to Node.js 20 or newer.
178
- 2. Remove companion packages from peer assumptions and install only the layers the application uses.
179
- 3. Replace removed aggregate and root personality imports with focused v2 exports.
180
- 4. Change wrapper size names to semantic wrapper names.
181
- 5. Move personality selection to `data-ly-layout`.
182
- 6. Add `data-ly-recipe` and `data-ly-area` hooks while preserving correct mobile source order.
183
- 7. Replace v1 column and recipe aliases, or temporarily switch to `legacy.css`.
184
- 8. Audit every base, `ly-md-*`, and `ly-lg-*` order utility for reading and focus-order impact.
185
- 9. Test below and above both core container thresholds and the selected personality threshold in Chromium, Firefox, and WebKit.
186
- 10. Remove `legacy.css` before the v3 upgrade.
@@ -1,77 +0,0 @@
1
- # Release And Publishing
2
-
3
- This checklist prepares `layout-style-css@2.1.1`. Publishing, tagging, pushing, and creating a GitHub release require separate explicit approval.
4
-
5
- ## Version Contract
6
-
7
- - `package.json` and `package-lock.json` identify `2.1.1`.
8
- - Node.js 20 and 22 pass standalone CI.
9
- - `CHANGELOG.md` contains the dated 2.1.1 release entry.
10
- - README, migration guide, wiki, demo, exports, and tarball describe the same v2 API.
11
- - No peer or runtime dependencies are present.
12
-
13
- ## Local Verification
14
-
15
- Install all Playwright engines once:
16
-
17
- ```bash
18
- npx playwright install chromium firefox webkit
19
- ```
20
-
21
- Then run:
22
-
23
- ```bash
24
- npm run build
25
- npm run lint
26
- npm run check:demo-js
27
- npm run test:static
28
- npm run test:demo:quick
29
- npm run test:demo:all
30
- npm run test:pages
31
- npm run pack:dry-run
32
- npm run release:verify
33
- git diff --check
34
- ```
35
-
36
- `release:verify` runs build, lint, JavaScript syntax, static contracts, the Pages artifact, Chromium, Firefox, WebKit, the intentional tarball listing, `npm audit --audit-level=moderate`, and an npm publish dry run. It does not publish.
37
-
38
- `prepublishOnly` runs `npm run release:verify`, so a direct `npm publish` still has the full release verification gate.
39
-
40
- ## Tag And Version Validation
41
-
42
- The publish workflow checks out the selected tag and fails unless it equals `v${package.version}`. For this release the only valid tag is `v2.1.1`.
43
-
44
- After separate approval, an operator may check registry availability:
45
-
46
- ```bash
47
- npm view layout-style-css@2.1.1 version --json
48
- ```
49
-
50
- The eventual release sequence is:
51
-
52
- ```bash
53
- git tag v2.1.1
54
- git push origin v2.1.1
55
- ```
56
-
57
- Publishing the `v2.1.1` GitHub release triggers the npm workflow. A separately approved recovery run may use `release_tag` set to `v2.1.1`.
58
-
59
- ## Workflow Safety
60
-
61
- Create a GitHub Environment named `npm` and configure required reviewers before enabling the publish job. Environment approval is the final human authorization boundary for npm releases.
62
-
63
- Before `npm ci` can execute package lifecycle code, the workflow:
64
-
65
- 1. rejects release inputs that are not strict `v`-prefixed semantic-version tags;
66
- 2. checks out the exact `refs/tags/<release_tag>` namespace without persisted credentials;
67
- 3. verifies `HEAD` equals the tag's peeled commit;
68
- 4. fetches `origin/main` and requires the tag commit to be reachable from protected main; and
69
- 5. requires the package version to equal the tag.
70
-
71
- The workflow installs Chromium, Firefox, and WebKit, runs full release verification, and publishes with npm provenance. `NODE_AUTH_TOKEN` exists only on the final publish step. Migrating to npm trusted publishing should remove that long-lived secret in a follow-up.
72
-
73
- The workflow actions remain major-version references. Pinning every third-party action to an immutable commit SHA is a documented security follow-up and should be performed with an automated update process. Do not bypass a failed trust, version, browser, audit, tarball, or documentation contract.
74
-
75
- ## Wiki Mirror
76
-
77
- The versioned `docs/wiki/` source is authoritative. If GitHub Wiki is enabled, mirror these Markdown files only after the release documentation has passed the local contract suite.