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.
- package/CHANGELOG.md +47 -0
- package/README.md +127 -143
- package/dist/core.css +2 -1
- package/dist/foundation.css +194 -0
- package/dist/layout-style-css.css +527 -984
- package/dist/layout-style-css.min.css +1 -1
- package/dist/personalities/bauhaus.css +13 -42
- package/dist/personalities/bento.css +16 -40
- package/dist/personalities/brutalism.css +13 -33
- package/dist/personalities/cyberpunk.css +12 -32
- package/dist/personalities/f-pattern.css +16 -45
- package/dist/personalities/maximalist.css +16 -48
- package/dist/personalities/minimal-saas.css +7 -33
- package/dist/personalities/mondrian.css +12 -40
- package/dist/personalities/neumorphism.css +15 -39
- package/dist/personalities/retro-glass.css +14 -42
- package/dist/personalities/retrofuturism.css +12 -32
- package/dist/personalities/split-screen.css +24 -36
- package/dist/personalities/synthwave.css +13 -41
- package/dist/personalities/tactile.css +15 -32
- package/dist/personalities/y2k.css +13 -33
- package/dist/personalities/z-pattern.css +16 -46
- package/dist/personalities.css +1 -1
- package/dist/primitives.css +27 -63
- package/dist/recipes.css +92 -175
- package/dist/utilities.css +39 -104
- package/dist/wrappers.css +28 -108
- package/docs/wiki/Contributing.md +3 -1
- package/docs/wiki/Demo-And-GitHub-Pages.md +24 -33
- package/docs/wiki/Getting-Started.md +39 -27
- package/docs/wiki/Home.md +21 -27
- package/docs/wiki/Installation-And-CDN.md +47 -42
- package/docs/wiki/Layout-Primitives.md +48 -34
- package/docs/wiki/Layout-Recipes.md +42 -33
- package/docs/wiki/Layout-Styles.md +60 -26
- package/docs/wiki/Migrating-To-3.0.md +205 -0
- package/docs/wiki/Release-And-Publishing.md +36 -51
- package/docs/wiki/Security-And-Support.md +18 -22
- package/docs/wiki/UI-Style-Kit-Compatibility.md +21 -30
- package/docs/wiki/_Sidebar.md +12 -15
- package/manifest.json +98 -0
- package/package.json +33 -28
- package/personalities.json +147 -0
- package/CONTRIBUTING.md +0 -55
- package/SECURITY.md +0 -50
- package/demo/assets/apple-touch-icon.svg +0 -7
- package/demo/assets/favicon.svg +0 -7
- package/demo/assets/social-card.png +0 -0
- package/demo/browserconfig.xml +0 -9
- package/demo/demo.css +0 -523
- package/demo/demo.js +0 -605
- package/demo/index.html +0 -325
- package/demo/robots.txt +0 -4
- package/demo/site.webmanifest +0 -23
- package/demo/sitemap.xml +0 -9
- package/dist/integrations/ui-style-kit.css +0 -175
- package/dist/legacy.css +0 -822
- package/styles/core.css +0 -6
- package/styles/integrations/ui-style-kit.css +0 -175
- package/styles/legacy.css +0 -173
- package/styles/personalities/bauhaus.css +0 -49
- package/styles/personalities/bento.css +0 -46
- package/styles/personalities/brutalism.css +0 -39
- package/styles/personalities/cyberpunk.css +0 -39
- package/styles/personalities/f-pattern.css +0 -51
- package/styles/personalities/maximalist.css +0 -54
- package/styles/personalities/minimal-saas.css +0 -39
- package/styles/personalities/mondrian.css +0 -47
- package/styles/personalities/neumorphism.css +0 -46
- package/styles/personalities/retro-glass.css +0 -47
- package/styles/personalities/retrofuturism.css +0 -39
- package/styles/personalities/split-screen.css +0 -41
- package/styles/personalities/synthwave.css +0 -48
- package/styles/personalities/tactile.css +0 -39
- package/styles/personalities/y2k.css +0 -39
- package/styles/personalities/z-pattern.css +0 -52
- package/styles/personalities.css +0 -18
- package/styles/primitives.css +0 -219
- package/styles/recipes.css +0 -278
- package/styles/utilities.css +0 -162
- 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
|
|
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
|
-
|
|
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:
|
|
30
|
+
--ly-wrapper-max: var(--ly-wrapper-compact);
|
|
113
31
|
}
|
|
114
32
|
|
|
115
33
|
.ly-wrapper--prose {
|
|
116
|
-
--ly-wrapper-max:
|
|
34
|
+
--ly-wrapper-max: var(--ly-wrapper-prose);
|
|
117
35
|
}
|
|
118
36
|
|
|
119
37
|
.ly-wrapper--content {
|
|
120
|
-
--ly-wrapper-max:
|
|
38
|
+
--ly-wrapper-max: var(--ly-wrapper-content);
|
|
121
39
|
}
|
|
122
40
|
|
|
123
41
|
.ly-wrapper--wide {
|
|
124
|
-
--ly-wrapper-max:
|
|
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 `
|
|
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
|
|
3
|
+
The v3 demo is an intrinsic responsive workbench, not a fixed-device screenshot gallery.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Controls
|
|
6
6
|
|
|
7
|
-
|
|
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
|
-
|
|
10
|
-
npm run test:demo:quick
|
|
11
|
-
```
|
|
14
|
+
Device presets cover the release allocations:
|
|
12
15
|
|
|
13
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
35
|
+
## GitHub Pages
|
|
45
36
|
|
|
46
37
|
```bash
|
|
47
38
|
npm run pages:build
|
|
48
|
-
|
|
39
|
+
npm run test:pages
|
|
49
40
|
```
|
|
50
41
|
|
|
51
|
-
The
|
|
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
|
-
|
|
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
|
-
|
|
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@
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
## First Recipe
|
|
13
|
+
## First Automatic Layout
|
|
22
14
|
|
|
23
|
-
|
|
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
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
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
|
|
27
|
+
The recipe stays stacked below `42rem` and enhances automatically when its nearest `ly-scope` container has enough room.
|
|
40
28
|
|
|
41
|
-
##
|
|
29
|
+
## Optional Wrapper
|
|
42
30
|
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
56
|
+
Keep mobile DOM order authoritative. The package never changes reading or focus order.
|
|
48
57
|
|
|
49
|
-
##
|
|
58
|
+
## Next
|
|
50
59
|
|
|
51
|
-
|
|
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
|
|
1
|
+
# Layout Style CSS v3
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
##
|
|
5
|
+
## Contract
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
15
|
+
Layout owns structure. UI Style Kit owns paint. Interactive Surface owns interaction styling.
|
|
22
16
|
|
|
23
|
-
|
|
17
|
+
## Documentation
|
|
24
18
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
3
|
+
## Requirements
|
|
4
4
|
|
|
5
|
-
|
|
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@
|
|
12
|
+
npm install layout-style-css@3.0.1
|
|
9
13
|
```
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
```js
|
|
16
|
+
import "layout-style-css";
|
|
17
|
+
```
|
|
12
18
|
|
|
13
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
34
|
+
`core.css` contains Foundation, Wrappers, Primitives, Recipes, and Utilities. The default bundle adds all personality profiles.
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
import "layout-style-css";
|
|
35
|
-
```
|
|
36
|
+
## CDN
|
|
36
37
|
|
|
37
|
-
|
|
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
|
-
```
|
|
40
|
-
|
|
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
|
-
|
|
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
|
-
|
|
59
|
+
Layout owns structure. UI Style Kit owns paint. Interactive Surface owns interaction styling.
|
|
54
60
|
|
|
55
|
-
##
|
|
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
|
-
|
|
63
|
+
The module order is:
|
|
65
64
|
|
|
66
|
-
|
|
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
|
-
|
|
73
|
+
Application styles can override public custom properties without reordering the package modules.
|
|
69
74
|
|
|
70
|
-
##
|
|
75
|
+
## Clean-Break Note
|
|
71
76
|
|
|
72
|
-
|
|
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
|
-
|
|
3
|
+
## Foundation And Containment
|
|
4
4
|
|
|
5
|
-
|
|
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
|
-
|
|
7
|
+
Every primitive applies `min-inline-size: 0` and `min-block-size: 0` where tracks or children need to shrink.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Wrappers
|
|
10
10
|
|
|
11
|
-
|
|
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
|
-
|
|
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
|
-
|
|
20
|
+
Breakout children select clamped lanes with `data-ly-lane="content"`, `data-ly-lane="feature"`, or `data-ly-lane="full"`.
|
|
23
21
|
|
|
24
|
-
|
|
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
|
-
|
|
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
|
-
|
|
29
|
+
## Adaptive Tracks
|
|
43
30
|
|
|
44
|
-
|
|
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
|
-
|
|
38
|
+
## Frame And Overflow
|
|
47
39
|
|
|
48
|
-
|
|
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.
|