layout-style-css 1.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.
- package/LICENSE +21 -0
- package/README.md +447 -0
- package/demo/assets/apple-touch-icon.svg +7 -0
- package/demo/assets/favicon.svg +7 -0
- package/demo/assets/social-card.svg +17 -0
- package/demo/browserconfig.xml +9 -0
- package/demo/index.html +700 -0
- package/demo/robots.txt +4 -0
- package/demo/site.webmanifest +23 -0
- package/demo/sitemap.xml +9 -0
- package/dist/layout-all-with-ui-kit-and-interactive-surface.css +3 -0
- package/dist/layout-all-with-ui-kit.css +2 -0
- package/dist/layout-all.css +13 -0
- package/dist/layout-base.css +472 -0
- package/dist/layout-style-bauhaus.css +70 -0
- package/dist/layout-style-bento.css +76 -0
- package/dist/layout-style-brutalism.css +70 -0
- package/dist/layout-style-css.css +1367 -0
- package/dist/layout-style-css.min.css +1 -0
- package/dist/layout-style-cyberpunk.css +70 -0
- package/dist/layout-style-maximalist.css +93 -0
- package/dist/layout-style-minimal-saas.css +67 -0
- package/dist/layout-style-neumorphism.css +72 -0
- package/dist/layout-style-retro-glass.css +82 -0
- package/dist/layout-style-retrofuturism.css +71 -0
- package/dist/layout-style-tactile.css +70 -0
- package/dist/layout-style-y2k.css +72 -0
- package/dist/layout-ui-style-kit-bridge.css +55 -0
- package/package.json +97 -0
- package/styles/layout-base.css +472 -0
- package/styles/layout-style-bauhaus.css +70 -0
- package/styles/layout-style-bento.css +76 -0
- package/styles/layout-style-brutalism.css +70 -0
- package/styles/layout-style-cyberpunk.css +70 -0
- package/styles/layout-style-maximalist.css +93 -0
- package/styles/layout-style-minimal-saas.css +67 -0
- package/styles/layout-style-neumorphism.css +72 -0
- package/styles/layout-style-retro-glass.css +82 -0
- package/styles/layout-style-retrofuturism.css +71 -0
- package/styles/layout-style-tactile.css +70 -0
- package/styles/layout-style-y2k.css +72 -0
- package/styles/layout-ui-style-kit-bridge.css +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Foscat
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
# layout-style-css
|
|
2
|
+
|
|
3
|
+
Responsive CSS layout primitives for shell-first interfaces.
|
|
4
|
+
|
|
5
|
+
`layout-style-css` gives applications a small, predictable composition layer: wrappers, app shells, grids, panes, sidebars, split sections, spacing utilities, and switchable layout personalities. It is designed to pair with `ui-style-kit-css@2.0.1`, while keeping layout decisions independent from visual theme decisions.
|
|
6
|
+
|
|
7
|
+
## Why It Exists
|
|
8
|
+
|
|
9
|
+
Modern UI systems often mix two concerns:
|
|
10
|
+
|
|
11
|
+
- visual design: color, typography, borders, shadows, native controls, focus states, and modes
|
|
12
|
+
- spatial design: wrappers, page width, shell regions, pane ratios, sidebar placement, grid behavior, and responsive collapse
|
|
13
|
+
|
|
14
|
+
This package owns the spatial layer only. That separation lets you change layout personality without rewriting markup or duplicating your theme system.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install layout-style-css ui-style-kit-css@2.0.1
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Install Interactive Surface CSS only when you want the optional three-library bundle:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install interactive-surface-css@1.2.5
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Quick Start
|
|
29
|
+
|
|
30
|
+
Import UI Style Kit first, then the layout CSS:
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import "ui-style-kit-css/dist/ui-style-kit.css";
|
|
34
|
+
import "layout-style-css";
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Use one root element for UI style, layout style, theme, and mode:
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<body
|
|
41
|
+
class="ly-root"
|
|
42
|
+
data-ui="minimal-saas"
|
|
43
|
+
data-layout="minimal-saas"
|
|
44
|
+
data-theme="arctic-indigo"
|
|
45
|
+
data-mode="light"
|
|
46
|
+
>
|
|
47
|
+
<div class="ly-app-shell">
|
|
48
|
+
<aside class="ly-app-sidebar ly-pad-6">Navigation</aside>
|
|
49
|
+
<header class="ly-app-header ly-pad-4">Toolbar</header>
|
|
50
|
+
<main class="ly-app-main">
|
|
51
|
+
<section class="ly-wrapper ly-wrapper--wide ly-section ly-stack">
|
|
52
|
+
<h1>Dashboard</h1>
|
|
53
|
+
<div class="ly-grid ly-grid--auto">
|
|
54
|
+
<article class="ly-surface ly-pad-6">Revenue</article>
|
|
55
|
+
<article class="ly-surface ly-pad-6">Pipeline</article>
|
|
56
|
+
<article class="ly-surface ly-pad-6">Retention</article>
|
|
57
|
+
</div>
|
|
58
|
+
</section>
|
|
59
|
+
</main>
|
|
60
|
+
</div>
|
|
61
|
+
</body>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## CDN Usage
|
|
65
|
+
|
|
66
|
+
Layout-only CDN entry:
|
|
67
|
+
|
|
68
|
+
```html
|
|
69
|
+
<link rel="stylesheet" href="https://unpkg.com/layout-style-css@1/dist/layout-style-css.min.css">
|
|
70
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layout-style-css@1/dist/layout-style-css.min.css">
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Recommended CDN pairing with UI Style Kit:
|
|
74
|
+
|
|
75
|
+
```html
|
|
76
|
+
<link rel="stylesheet" href="https://unpkg.com/ui-style-kit-css@2.0.1/dist/ui-style-kit.min.css">
|
|
77
|
+
<link rel="stylesheet" href="https://unpkg.com/layout-style-css@1/dist/layout-style-css.min.css">
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Import Options
|
|
81
|
+
|
|
82
|
+
| Import | Use case |
|
|
83
|
+
| --- | --- |
|
|
84
|
+
| `import "layout-style-css";` | Full flattened layout-only CSS. |
|
|
85
|
+
| `import "layout-style-css/min.css";` | Minified layout-only CSS. |
|
|
86
|
+
| `import "layout-style-css/all.css";` | Import-based bundle for all layout files. |
|
|
87
|
+
| `import "layout-style-css/base.css";` | Base primitives only. |
|
|
88
|
+
| `import "layout-style-css/minimal-saas.css";` | One layout personality. |
|
|
89
|
+
| `import "layout-style-css/all-with-ui-kit.css";` | UI Style Kit plus all layouts. |
|
|
90
|
+
| `import "layout-style-css/all-with-ui-kit-and-interactive-surface.css";` | UI Style Kit, Interactive Surface, and all layouts. |
|
|
91
|
+
|
|
92
|
+
The three-library aggregate imports in this order:
|
|
93
|
+
|
|
94
|
+
```css
|
|
95
|
+
@import url("ui-style-kit-css/with-bridge.css");
|
|
96
|
+
@import url("interactive-surface-css/interactive-surface.css");
|
|
97
|
+
@import url("./layout-all.css");
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Responsive Wrapper API
|
|
101
|
+
|
|
102
|
+
Use `.ly-wrapper` for new markup. `.ly-container` remains supported for compatibility.
|
|
103
|
+
|
|
104
|
+
| Class | Purpose |
|
|
105
|
+
| --- | --- |
|
|
106
|
+
| `.ly-wrapper` / `.ly-container` | Responsive centered content wrapper. |
|
|
107
|
+
| `.ly-wrapper--sm` / `.ly-container--sm` | Small wrapper, up to `40rem`. |
|
|
108
|
+
| `.ly-wrapper--md` / `.ly-container--md` | Medium wrapper, up to `56rem`. |
|
|
109
|
+
| `.ly-wrapper--lg` / `.ly-container--lg` | Large wrapper, up to `72rem`. |
|
|
110
|
+
| `.ly-wrapper--xl` / `.ly-container--xl` | Extra-large wrapper, up to `88rem`. |
|
|
111
|
+
| `.ly-wrapper--wide` / `.ly-container--wide` | Wide wrapper, up to `112rem`. |
|
|
112
|
+
| `.ly-wrapper--fluid` / `.ly-container--fluid` | Full-width wrapper with responsive inline padding. |
|
|
113
|
+
| `.ly-wrapper--readable` | Readable content wrapper based on `68ch`. |
|
|
114
|
+
|
|
115
|
+
Wrappers are mobile-first and tested against:
|
|
116
|
+
|
|
117
|
+
- mobile portrait and landscape
|
|
118
|
+
- tablet portrait and landscape
|
|
119
|
+
- desktop resize behavior
|
|
120
|
+
- wide desktop
|
|
121
|
+
|
|
122
|
+
## Layout Recipes
|
|
123
|
+
|
|
124
|
+
Recipes are recommended class combinations, not separate theme files. They keep the public API small while making common layouts easy to copy.
|
|
125
|
+
|
|
126
|
+
### App Shell
|
|
127
|
+
|
|
128
|
+
Use for dashboards, admin tools, and multi-region product screens.
|
|
129
|
+
|
|
130
|
+
```html
|
|
131
|
+
<div class="ly-app-shell">
|
|
132
|
+
<aside class="ly-app-sidebar ly-pad-6">Navigation</aside>
|
|
133
|
+
<header class="ly-app-header ly-pad-4">Toolbar</header>
|
|
134
|
+
<main class="ly-app-main">
|
|
135
|
+
<section class="ly-wrapper ly-wrapper--wide ly-section">Workspace</section>
|
|
136
|
+
</main>
|
|
137
|
+
</div>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Content Page
|
|
141
|
+
|
|
142
|
+
Use for docs, articles, policy pages, and focused editorial content.
|
|
143
|
+
|
|
144
|
+
```html
|
|
145
|
+
<main class="ly-main">
|
|
146
|
+
<article class="ly-wrapper ly-wrapper--readable ly-section ly-stack">
|
|
147
|
+
<h1>Documentation</h1>
|
|
148
|
+
<p>Readable content stays centered and responsive.</p>
|
|
149
|
+
</article>
|
|
150
|
+
</main>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Dashboard Grid
|
|
154
|
+
|
|
155
|
+
Use for metric cards and repeated operational surfaces.
|
|
156
|
+
|
|
157
|
+
```html
|
|
158
|
+
<section class="ly-wrapper ly-wrapper--wide ly-section">
|
|
159
|
+
<div class="ly-grid ly-grid--auto">
|
|
160
|
+
<article class="ly-surface ly-pad-6">Metric</article>
|
|
161
|
+
<article class="ly-surface ly-pad-6">Metric</article>
|
|
162
|
+
<article class="ly-surface ly-pad-6">Metric</article>
|
|
163
|
+
</div>
|
|
164
|
+
</section>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Split Hero
|
|
168
|
+
|
|
169
|
+
Use when a message needs a supporting panel, preview, form, or media frame.
|
|
170
|
+
|
|
171
|
+
```html
|
|
172
|
+
<section class="ly-wrapper ly-wrapper--xl ly-section">
|
|
173
|
+
<div class="ly-split">
|
|
174
|
+
<div class="ly-stack">
|
|
175
|
+
<h1>Primary message</h1>
|
|
176
|
+
<p>Supporting copy.</p>
|
|
177
|
+
</div>
|
|
178
|
+
<aside class="ly-frame ly-surface ly-pad-6">Preview</aside>
|
|
179
|
+
</div>
|
|
180
|
+
</section>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Docs Sidebar
|
|
184
|
+
|
|
185
|
+
Use for local filters, table of contents, and secondary navigation.
|
|
186
|
+
|
|
187
|
+
```html
|
|
188
|
+
<section class="ly-wrapper ly-wrapper--wide ly-section">
|
|
189
|
+
<div class="ly-sidebar-layout">
|
|
190
|
+
<aside class="ly-sidebar ly-surface ly-pad-5">Contents</aside>
|
|
191
|
+
<article class="ly-content ly-surface ly-pad-6">Documentation body</article>
|
|
192
|
+
</div>
|
|
193
|
+
</section>
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### List Detail
|
|
197
|
+
|
|
198
|
+
Use for inboxes, editors, queues, and preview workflows.
|
|
199
|
+
|
|
200
|
+
```html
|
|
201
|
+
<section class="ly-wrapper ly-wrapper--wide ly-section">
|
|
202
|
+
<div class="ly-panes ly-panes--two">
|
|
203
|
+
<aside class="ly-surface ly-pad-5 ly-scroll-area">List</aside>
|
|
204
|
+
<article class="ly-surface ly-pad-6">Detail</article>
|
|
205
|
+
</div>
|
|
206
|
+
</section>
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Base Primitives
|
|
210
|
+
|
|
211
|
+
| Class | Purpose |
|
|
212
|
+
| --- | --- |
|
|
213
|
+
| `.ly-root` | Scope root for layout variables and resets. |
|
|
214
|
+
| `.ly-page` | Full-height page wrapper. |
|
|
215
|
+
| `.ly-header`, `.ly-footer`, `.ly-main` | Basic document regions. |
|
|
216
|
+
| `.ly-wrapper`, `.ly-container` | Responsive content wrappers. |
|
|
217
|
+
| `.ly-section` | Vertical section spacing. |
|
|
218
|
+
| `.ly-stack` | Vertical rhythm. |
|
|
219
|
+
| `.ly-cluster` | Wrapping horizontal group. |
|
|
220
|
+
| `.ly-grid` | CSS Grid foundation. |
|
|
221
|
+
| `.ly-grid--auto` | Responsive auto-fit grid. |
|
|
222
|
+
| `.ly-row`, `.ly-col`, `.ly-col-*` | Flex row and column utilities. |
|
|
223
|
+
| `.ly-app-shell` | Header/sidebar/main shell. |
|
|
224
|
+
| `.ly-app-header`, `.ly-app-sidebar`, `.ly-app-main` | App shell regions. |
|
|
225
|
+
| `.ly-sidebar-layout` | Local content/sidebar layout. |
|
|
226
|
+
| `.ly-split` | Responsive two-part split. |
|
|
227
|
+
| `.ly-panes`, `.ly-panes--two`, `.ly-panes--three` | Adaptive pane layouts. |
|
|
228
|
+
| `.ly-surface` | Layout wrapper surface; paint remains owned by the UI system. |
|
|
229
|
+
| `.ly-frame` | Aspect-ratio media or content frame. |
|
|
230
|
+
|
|
231
|
+
## Utility API
|
|
232
|
+
|
|
233
|
+
Utilities are composition-only. They set layout variables, spacing, flow, visibility, overflow, or frame ratios without introducing colors, fonts, shadows, borders, or theme-specific visuals.
|
|
234
|
+
|
|
235
|
+
### Grid Columns And Spans
|
|
236
|
+
|
|
237
|
+
| Class group | Purpose |
|
|
238
|
+
| --- | --- |
|
|
239
|
+
| `.ly-cols-1` through `.ly-cols-12`, `.ly-cols-16` | Set the base grid column count. |
|
|
240
|
+
| `.ly-md-cols-1`, `2`, `3`, `4`, `6`, `8`, `12`, `16` | Change grid column count from the tablet breakpoint up. |
|
|
241
|
+
| `.ly-lg-cols-1`, `2`, `3`, `4`, `6`, `8`, `12`, `16` | Change grid column count from the desktop breakpoint up. |
|
|
242
|
+
| `.ly-span-1` through `.ly-span-16` | Span a grid item across a fixed number of tracks. |
|
|
243
|
+
| `.ly-span-full` | Span a grid item across the full grid. |
|
|
244
|
+
|
|
245
|
+
### Flex Columns
|
|
246
|
+
|
|
247
|
+
| Class group | Purpose |
|
|
248
|
+
| --- | --- |
|
|
249
|
+
| `.ly-row` | Flex row with wrapped columns and negative gutter compensation. |
|
|
250
|
+
| `.ly-col` | Flexible column that shares available space. |
|
|
251
|
+
| `.ly-col-1` through `.ly-col-12` | Percentage-based column widths on the 12-column scale. |
|
|
252
|
+
|
|
253
|
+
### Spacing
|
|
254
|
+
|
|
255
|
+
| Class group | Purpose |
|
|
256
|
+
| --- | --- |
|
|
257
|
+
| `.ly-gap-0` through `.ly-gap-9` | Set shared layout, grid, stack, and cluster gaps. |
|
|
258
|
+
| `.ly-pad-0` through `.ly-pad-9` | Set all-side padding from the layout spacing scale. |
|
|
259
|
+
| `.ly-px-4`, `.ly-px-6`, `.ly-px-8` | Set inline padding. |
|
|
260
|
+
| `.ly-py-4`, `.ly-py-6`, `.ly-py-8` | Set block padding. |
|
|
261
|
+
| `.ly-mx-auto` | Center with automatic inline margins. |
|
|
262
|
+
|
|
263
|
+
### Sizing, Overflow, And Alignment
|
|
264
|
+
|
|
265
|
+
| Class group | Purpose |
|
|
266
|
+
| --- | --- |
|
|
267
|
+
| `.ly-w-full`, `.ly-h-full` | Force full inline or block size. |
|
|
268
|
+
| `.ly-min-h-screen` | Set minimum viewport-height section sizing with `100svh`. |
|
|
269
|
+
| `.ly-bleed` | Break a section out to viewport width. |
|
|
270
|
+
| `.ly-overflow-auto`, `.ly-overflow-hidden` | Control overflow behavior. |
|
|
271
|
+
| `.ly-items-start`, `.ly-items-center`, `.ly-items-end`, `.ly-items-stretch` | Align children on the cross axis. |
|
|
272
|
+
| `.ly-justify-start`, `.ly-justify-center`, `.ly-justify-end`, `.ly-justify-between` | Distribute children on the main axis. |
|
|
273
|
+
|
|
274
|
+
### Frames And Visibility
|
|
275
|
+
|
|
276
|
+
| Class group | Purpose |
|
|
277
|
+
| --- | --- |
|
|
278
|
+
| `.ly-frame-1x1`, `.ly-frame-2x1`, `.ly-frame-3x2`, `.ly-frame-4x3`, `.ly-frame-16x9`, `.ly-frame-21x9` | Set common media/content aspect ratios. |
|
|
279
|
+
| `.ly-hidden` | Hide an element. |
|
|
280
|
+
| `.ly-show-md-up` | Reveal an element from the tablet breakpoint up. |
|
|
281
|
+
| `.ly-show-lg-up` | Reveal an element from the desktop breakpoint up. |
|
|
282
|
+
| `.ly-visually-hidden` | Hide content visually while keeping it available to assistive technology. |
|
|
283
|
+
|
|
284
|
+
## Layout Styles
|
|
285
|
+
|
|
286
|
+
Each layout style file targets layout selectors only. It does not key off `data-ui`, so `data-ui="cyberpunk"` can pair with `data-layout="maximalist"` without forcing a cyberpunk shell.
|
|
287
|
+
|
|
288
|
+
| Layout style | File | Shell behavior |
|
|
289
|
+
| --- | --- | --- |
|
|
290
|
+
| `minimal-saas` | `layout-style-minimal-saas.css` | Steady left-rail SaaS shell with compact content bands and predictable pane ratios. |
|
|
291
|
+
| `bento` | `layout-style-bento.css` | Modular dashboard shell with staged mosaic zones, dense grids, and tile-like support panels. |
|
|
292
|
+
| `maximalist` | `layout-style-maximalist.css` | Editorial shell with oversized hero splits, offset support rails, and staggered regions. |
|
|
293
|
+
| `bauhaus` | `layout-style-bauhaus.css` | Strict framed column shell with visible structural rails, square surfaces, and modular panes. |
|
|
294
|
+
| `tactile` | `layout-style-tactile.css` | Instrument-panel shell with a heavier support dock, control-deck panes, and chunky spacing. |
|
|
295
|
+
| `neumorphism` | `layout-style-neumorphism.css` | Centered island shell with detached support regions and roomy split composition. |
|
|
296
|
+
| `retrofuturism` | `layout-style-retrofuturism.css` | Panoramic bridge shell with wide stages, symmetric pods, and horizontal workspace flow. |
|
|
297
|
+
| `brutalism` | `layout-style-brutalism.css` | Full-bleed slab shell with hard sectional breaks, abrupt pane cuts, and raw support rails. |
|
|
298
|
+
| `cyberpunk` | `layout-style-cyberpunk.css` | Narrow utility rail with dense command workspace, compact gutters, and clipped panels. |
|
|
299
|
+
| `y2k` | `layout-style-y2k.css` | Centered hub shell with floating window rhythm and dock-like support regions. |
|
|
300
|
+
| `retro-glass` | `layout-style-retro-glass.css` | Top-framed glass shell with a floating right utility rail and layered panes. |
|
|
301
|
+
|
|
302
|
+
## Mix And Match Contract
|
|
303
|
+
|
|
304
|
+
Matching UI and layout names are good defaults:
|
|
305
|
+
|
|
306
|
+
```html
|
|
307
|
+
data-ui="bento" data-layout="bento"
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
Mixed combinations are supported:
|
|
311
|
+
|
|
312
|
+
```html
|
|
313
|
+
data-ui="cyberpunk" data-layout="maximalist" data-theme="arctic-indigo" data-mode="dark"
|
|
314
|
+
data-ui="bauhaus" data-layout="retro-glass" data-theme="graphite-cyan" data-mode="dark"
|
|
315
|
+
data-ui="minimal-saas" data-layout="bento" data-theme="ocean-steel" data-mode="light"
|
|
316
|
+
data-ui="brutalism" data-layout="cyberpunk" data-theme="midnight-gold" data-mode="contrast"
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
Supported layout selectors:
|
|
320
|
+
|
|
321
|
+
```html
|
|
322
|
+
data-layout="maximalist"
|
|
323
|
+
layout-style="maximalist"
|
|
324
|
+
class="ly-layout-maximalist"
|
|
325
|
+
class="ly-style-maximalist"
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
Runtime switching:
|
|
329
|
+
|
|
330
|
+
```js
|
|
331
|
+
const root = document.body;
|
|
332
|
+
|
|
333
|
+
root.dataset.ui = "cyberpunk";
|
|
334
|
+
root.dataset.layout = "maximalist";
|
|
335
|
+
root.setAttribute("layout-style", "maximalist");
|
|
336
|
+
root.dataset.theme = "arctic-indigo";
|
|
337
|
+
root.dataset.mode = "dark";
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
## Demo And GitHub Pages
|
|
341
|
+
|
|
342
|
+
The demo lives in `demo/index.html` for local development and package distribution.
|
|
343
|
+
|
|
344
|
+
Build the GitHub Pages artifact:
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
npm run pages:build
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
The artifact is written to `output/github-pages/` and contains:
|
|
351
|
+
|
|
352
|
+
- `index.html` at the Pages root
|
|
353
|
+
- copied demo assets and metadata
|
|
354
|
+
- generated `dist/` CSS
|
|
355
|
+
- `.nojekyll`
|
|
356
|
+
|
|
357
|
+
The repository includes a GitHub Actions workflow that verifies the package, builds the artifact, uploads it, and deploys it to GitHub Pages from `main` or `workflow_dispatch`.
|
|
358
|
+
|
|
359
|
+
## Package Files
|
|
360
|
+
|
|
361
|
+
```txt
|
|
362
|
+
styles/
|
|
363
|
+
layout-base.css
|
|
364
|
+
layout-ui-style-kit-bridge.css
|
|
365
|
+
layout-style-*.css
|
|
366
|
+
dist/
|
|
367
|
+
layout-style-css.css
|
|
368
|
+
layout-style-css.min.css
|
|
369
|
+
layout-all.css
|
|
370
|
+
layout-all-with-ui-kit.css
|
|
371
|
+
layout-all-with-ui-kit-and-interactive-surface.css
|
|
372
|
+
layout-base.css
|
|
373
|
+
layout-ui-style-kit-bridge.css
|
|
374
|
+
layout-style-*.css
|
|
375
|
+
demo/
|
|
376
|
+
index.html
|
|
377
|
+
assets/
|
|
378
|
+
scripts/
|
|
379
|
+
build.mjs
|
|
380
|
+
build-pages.mjs
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
`styles/` is the authored source. `dist/` and `output/github-pages/` are generated.
|
|
384
|
+
|
|
385
|
+
## Development
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
npm install
|
|
389
|
+
npm run build
|
|
390
|
+
npm run lint
|
|
391
|
+
npm test
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
Run the complete release gate:
|
|
395
|
+
|
|
396
|
+
```bash
|
|
397
|
+
npm run check
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
The check command builds `dist/`, runs Stylelint, runs contract tests, runs responsive Playwright smoke checks against `demo/index.html`, validates the GitHub Pages artifact, and performs an npm pack dry-run.
|
|
401
|
+
|
|
402
|
+
## Publishing
|
|
403
|
+
|
|
404
|
+
Before publishing:
|
|
405
|
+
|
|
406
|
+
```bash
|
|
407
|
+
npm view layout-style-css@1.0.0 version --json
|
|
408
|
+
npm run release:verify
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
Publish and verify:
|
|
412
|
+
|
|
413
|
+
```bash
|
|
414
|
+
npm login
|
|
415
|
+
npm publish --access public
|
|
416
|
+
npm view layout-style-css@1.0.0
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
After publish, verify these CDN URLs:
|
|
420
|
+
|
|
421
|
+
```txt
|
|
422
|
+
https://unpkg.com/layout-style-css@1/dist/layout-style-css.min.css
|
|
423
|
+
https://cdn.jsdelivr.net/npm/layout-style-css@1/dist/layout-style-css.min.css
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
Tag the release as `v1.0.0` in `Foscat/layout-style-css`.
|
|
427
|
+
|
|
428
|
+
## Compatibility
|
|
429
|
+
|
|
430
|
+
- `ui-style-kit-css`: pinned peer at `2.0.1`
|
|
431
|
+
- `interactive-surface-css`: optional peer at `1.2.5`
|
|
432
|
+
- default npm and CDN entries: layout-only
|
|
433
|
+
|
|
434
|
+
## Extension Rules
|
|
435
|
+
|
|
436
|
+
1. Keep public layout classes prefixed with `ly-`.
|
|
437
|
+
2. Let `ui-style-kit-css` own colors, native controls, component look, focus states, typography, borders, shadows, and modes.
|
|
438
|
+
3. Put shared composition behavior in `styles/layout-base.css`.
|
|
439
|
+
4. Put layout-style-specific shell behavior in the matching `styles/layout-style-*.css` file.
|
|
440
|
+
5. Prefer changing layout variables before adding new public classes.
|
|
441
|
+
6. Treat recipes as documentation and demo patterns unless a repeated production need justifies a new class.
|
|
442
|
+
7. Test mobile portrait, mobile landscape, tablet portrait, tablet landscape, desktop resize, and wide desktop before promoting a new layout pattern.
|
|
443
|
+
|
|
444
|
+
## References
|
|
445
|
+
|
|
446
|
+
- UI Style Kit CSS: https://github.com/Foscat/ui-style-kit-css
|
|
447
|
+
- Interactive Surface CSS: https://github.com/Foscat/Interactive-Surface-CSS/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 180 180" role="img" aria-labelledby="title">
|
|
2
|
+
<title id="title">layout-style-css app icon</title>
|
|
3
|
+
<rect width="180" height="180" rx="40" fill="#111827"/>
|
|
4
|
+
<rect x="30" y="34" width="40" height="112" rx="12" fill="#7dd3fc"/>
|
|
5
|
+
<rect x="88" y="34" width="62" height="44" rx="12" fill="#fbbf24"/>
|
|
6
|
+
<rect x="88" y="100" width="62" height="46" rx="12" fill="#f472b6"/>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-labelledby="title">
|
|
2
|
+
<title id="title">layout-style-css favicon</title>
|
|
3
|
+
<rect width="64" height="64" rx="14" fill="#111827"/>
|
|
4
|
+
<rect x="10" y="12" width="14" height="40" rx="4" fill="#7dd3fc"/>
|
|
5
|
+
<rect x="30" y="12" width="24" height="16" rx="4" fill="#fbbf24"/>
|
|
6
|
+
<rect x="30" y="36" width="24" height="16" rx="4" fill="#f472b6"/>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 630" role="img" aria-labelledby="title desc">
|
|
2
|
+
<title id="title">layout-style-css social card</title>
|
|
3
|
+
<desc id="desc">A shell-first CSS layout card showing independent UI and layout tracks.</desc>
|
|
4
|
+
<rect width="1200" height="630" fill="#111827"/>
|
|
5
|
+
<rect x="72" y="72" width="210" height="486" rx="36" fill="#7dd3fc"/>
|
|
6
|
+
<rect x="330" y="72" width="798" height="180" rx="36" fill="#fbbf24"/>
|
|
7
|
+
<rect x="330" y="306" width="360" height="252" rx="36" fill="#f472b6"/>
|
|
8
|
+
<rect x="750" y="306" width="378" height="252" rx="36" fill="#a7f3d0"/>
|
|
9
|
+
<text x="116" y="154" fill="#111827" font-family="Arial, sans-serif" font-size="38" font-weight="700">Layout</text>
|
|
10
|
+
<text x="116" y="204" fill="#111827" font-family="Arial, sans-serif" font-size="38" font-weight="700">Style</text>
|
|
11
|
+
<text x="116" y="254" fill="#111827" font-family="Arial, sans-serif" font-size="38" font-weight="700">Library</text>
|
|
12
|
+
<text x="378" y="162" fill="#111827" font-family="Arial, sans-serif" font-size="56" font-weight="700">Shells without visual ownership</text>
|
|
13
|
+
<text x="378" y="414" fill="#111827" font-family="Arial, sans-serif" font-size="34">UI Style Kit controls</text>
|
|
14
|
+
<text x="378" y="462" fill="#111827" font-family="Arial, sans-serif" font-size="34">color, type, borders</text>
|
|
15
|
+
<text x="798" y="414" fill="#111827" font-family="Arial, sans-serif" font-size="34">Layout Library controls</text>
|
|
16
|
+
<text x="798" y="462" fill="#111827" font-family="Arial, sans-serif" font-size="34">size, shape, position</text>
|
|
17
|
+
</svg>
|