@luz-ds/docs 0.0.0-stage → 0.1.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 +93 -2
- package/dist/classes.json +47 -0
- package/dist/components/dodont.css +85 -0
- package/dist/components/dodont.min.css +1 -0
- package/dist/components/example.css +46 -0
- package/dist/components/example.min.css +1 -0
- package/dist/components/page-foot.css +31 -0
- package/dist/components/page-foot.min.css +1 -0
- package/dist/components/page-head.css +99 -0
- package/dist/components/page-head.min.css +1 -0
- package/dist/components/pager.css +70 -0
- package/dist/components/pager.min.css +1 -0
- package/dist/components/rail.css +161 -0
- package/dist/components/rail.min.css +1 -0
- package/dist/components/shell.css +126 -0
- package/dist/components/shell.min.css +1 -0
- package/dist/docs.css +613 -0
- package/dist/docs.min.css +1 -0
- package/package.json +53 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024–2026 Fernando Muñoz
|
|
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
CHANGED
|
@@ -1,3 +1,94 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @luz-ds/docs
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The pieces of a documentation page: the shell (the sidebar, the content and a rail), the page head, the rail ("On this page" and the page's actions), the frame of a live example and its code, do and don't, Previous / Next and the page foot. Each is a class on a native element, on `@luz-ds/core`'s objects and components (`.o-shell`, `.o-main`, `.luz-sidebar`, `.luz-code-block`); docs adds only its layout, its skin and its rhythm. `@luz-ds/site` is optional: its search goes in the header.
|
|
4
|
+
|
|
5
|
+
> **Beta, version 0.x.** Docs has a version of its own, apart from tokens, core and site, and grows in minor versions while it is 0.x: any of them may change a class. Pin an exact version and read the changelog before you upgrade.
|
|
6
|
+
|
|
7
|
+
## When to use it
|
|
8
|
+
|
|
9
|
+
- You write the documentation of a library, a product or an API, one page per thing, with a sidebar of pages.
|
|
10
|
+
- You show live examples with their markup, and say what to do and what not to do.
|
|
11
|
+
- Not for a landing page (`@luz-ds/landing`), a blog (`@luz-ds/cms`) or a web application (`@luz-ds/app`).
|
|
12
|
+
|
|
13
|
+
The shell has three columns from 80 rem (the sidebar 16.5 rem, the content, the rail 14 rem), two from 60 rem (the rail above the content, in its column) and one below, where core's sidebar is a drawer at 768 px and below when it is a popover. The content keeps to a measure of 46 rem (`--luz-docs-measure`).
|
|
14
|
+
|
|
15
|
+
## Prerequisites
|
|
16
|
+
|
|
17
|
+
Requires `@luz-ds/tokens` and `@luz-ds/core`, version `^0.1.0`, declared as peer dependencies, loaded in that order before this package. `@luz-ds/site` (`^0.1.0`) is an optional peer: load it before this package if you use its search; the patterns work without it.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install @luz-ds/tokens @luz-ds/core @luz-ds/site @luz-ds/docs
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
### Via npm/bundler
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
import '@luz-ds/tokens/css'
|
|
31
|
+
import '@luz-ds/core/css'
|
|
32
|
+
import '@luz-ds/site/css'
|
|
33
|
+
import '@luz-ds/docs/css'
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Via CDN
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@luz-ds/tokens@0.1.0/dist/luz-tokens.min.css">
|
|
40
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@luz-ds/core@0.1.0/dist/luz.min.css">
|
|
41
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@luz-ds/site@0.1.0/dist/site.min.css">
|
|
42
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@luz-ds/docs@0.1.0/dist/docs.min.css">
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
There is no script: "On this page" is a native `<details>`, the rail stays in view with native sticky positioning and the drawer is core's popover. Core's script is optional: with it, the sidebar and the rail mark the section in view.
|
|
46
|
+
|
|
47
|
+
## Package exports
|
|
48
|
+
|
|
49
|
+
- **`./css`** → `docs.css` — the patterns, in the cascade layer `luz.docs`, after `luz.app` (`./css/min` for the minified twin)
|
|
50
|
+
- **`./components/*`** → `dist/components/` — one stylesheet per pattern, `<name>.css` and `<name>.min.css`, each in `luz.docs`, for a page that loads only what it uses
|
|
51
|
+
|
|
52
|
+
## Classes included
|
|
53
|
+
|
|
54
|
+
- `.luz-docs-shell` (with `.luz-docs-nav` and `.luz-docs-main`) — The page: core's `.o-shell` with the header, the sidebar, the content, the rail and the footer in three, two or one column; sets `--luz-docs-measure`. [Docs](https://nandovejer.github.io/luz/docs/documentation/shell/)
|
|
55
|
+
- `.luz-docs-page-head` (`__eyebrow`, `__lead`, `__meta`) — The area and group, the h1, one sentence and a row of chips (the files, the script, the modes, the known issues). [Docs](https://nandovejer.github.io/luz/docs/documentation/page-head/)
|
|
56
|
+
- `.luz-docs-rail` (`__inner`, `__onpage`, `__fold`, `__title`, `__list`, `__sub`, `__link`, `__actions`) — "On this page" and the page's actions in one inner box, in view while the page scrolls and never over the footer. [Docs](https://nandovejer.github.io/luz/docs/documentation/rail/)
|
|
57
|
+
- `.luz-docs-example` (`__preview`, `__frame`, `__code`) — A live example and its code in one frame; `--luz-docs-example-w` narrows the frame. [Docs](https://nandovejer.github.io/luz/docs/documentation/example/)
|
|
58
|
+
- `.luz-docs-dodont` (`__item`, `__item--do`, `__item--dont`, `__verdict`, `__stage`) — A Do and a Don't, side by side when there is room, told apart by a word, a mark and the frame. [Docs](https://nandovejer.github.io/luz/docs/documentation/dodont/)
|
|
59
|
+
- `.luz-docs-pager` (`__prev`, `__next`, `__link`, `__label`, `__title`) — Previous and Next as two link blocks. [Docs](https://nandovejer.github.io/luz/docs/documentation/pager/)
|
|
60
|
+
- `.luz-docs-page-foot` — Last updated, Edit this page, Report a problem. [Docs](https://nandovejer.github.io/luz/docs/documentation/page-foot/)
|
|
61
|
+
|
|
62
|
+
<!-- luz:ai-agents:start -->
|
|
63
|
+
## For AI agents
|
|
64
|
+
|
|
65
|
+
`@luz-ds/docs` 0.1.0 is in beta: any release may break anything. Read the breaking changes below before you update, and use only what the files under "Read first" list.
|
|
66
|
+
|
|
67
|
+
### Breaking changes
|
|
68
|
+
|
|
69
|
+
First release of `@luz-ds/docs`. Nothing breaks inside @luz-ds. Coming from `@cai-ds/*`: see the migration note in `CHANGELOG.md`.
|
|
70
|
+
|
|
71
|
+
Older versions: https://github.com/nandovejer/luz/blob/main/packages/docs/CHANGELOG.md
|
|
72
|
+
|
|
73
|
+
### Read first
|
|
74
|
+
|
|
75
|
+
1. `dist/classes.json` in this package: the classes and custom properties its CSS defines. Write only those.
|
|
76
|
+
2. https://nandovejer.github.io/luz/llms.txt: the index of the documentation, short enough for a small context.
|
|
77
|
+
3. https://nandovejer.github.io/luz/llms-full.txt: the same pages in full.
|
|
78
|
+
4. https://nandovejer.github.io/luz/examples/: one standalone page of markup for each component and pattern.
|
|
79
|
+
|
|
80
|
+
### Load order
|
|
81
|
+
|
|
82
|
+
This package needs `@luz-ds/tokens` and `@luz-ds/core` loaded first.
|
|
83
|
+
|
|
84
|
+
`@luz-ds/site` is optional: the CSS of this package works with the packages above alone.
|
|
85
|
+
|
|
86
|
+
### Check what you write
|
|
87
|
+
|
|
88
|
+
Run `npx @luz-ds/check <files>` on every HTML and CSS file you write, and fix what it reports. To copy the accessibility reviewer into your project: `npx @luz-ds/check agent > .claude/agents/luz-accessibility-reviewer.md`.
|
|
89
|
+
|
|
90
|
+
<!-- luz:ai-agents:end -->
|
|
91
|
+
|
|
92
|
+
## License
|
|
93
|
+
|
|
94
|
+
MIT
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": 1,
|
|
3
|
+
"package": "@luz-ds/docs",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"classes": [
|
|
6
|
+
{ "name": "luz-docs-dodont", "kind": "pattern", "layer": "luz.docs", "files": ["components/dodont.css"], "defined": true, "block": "luz-docs-dodont" },
|
|
7
|
+
{ "name": "luz-docs-dodont__item", "kind": "pattern", "layer": "luz.docs", "files": ["components/dodont.css"], "defined": true, "block": "luz-docs-dodont", "part": "item" },
|
|
8
|
+
{ "name": "luz-docs-dodont__item--do", "kind": "pattern", "layer": "luz.docs", "files": ["components/dodont.css"], "defined": true, "block": "luz-docs-dodont", "modifier": "do", "part": "item" },
|
|
9
|
+
{ "name": "luz-docs-dodont__item--dont", "kind": "pattern", "layer": "luz.docs", "files": ["components/dodont.css"], "defined": true, "block": "luz-docs-dodont", "modifier": "dont", "part": "item" },
|
|
10
|
+
{ "name": "luz-docs-dodont__stage", "kind": "pattern", "layer": "luz.docs", "files": ["components/dodont.css"], "defined": true, "block": "luz-docs-dodont", "part": "stage" },
|
|
11
|
+
{ "name": "luz-docs-dodont__verdict", "kind": "pattern", "layer": "luz.docs", "files": ["components/dodont.css"], "defined": true, "block": "luz-docs-dodont", "part": "verdict" },
|
|
12
|
+
{ "name": "luz-docs-example", "kind": "pattern", "layer": "luz.docs", "files": ["components/example.css"], "defined": true, "block": "luz-docs-example" },
|
|
13
|
+
{ "name": "luz-docs-example__code", "kind": "pattern", "layer": "luz.docs", "files": ["components/example.css"], "defined": true, "block": "luz-docs-example", "part": "code" },
|
|
14
|
+
{ "name": "luz-docs-example__frame", "kind": "pattern", "layer": "luz.docs", "files": ["components/example.css"], "defined": true, "block": "luz-docs-example", "part": "frame" },
|
|
15
|
+
{ "name": "luz-docs-example__preview", "kind": "pattern", "layer": "luz.docs", "files": ["components/example.css"], "defined": true, "block": "luz-docs-example", "part": "preview" },
|
|
16
|
+
{ "name": "luz-docs-main", "kind": "pattern", "layer": "luz.docs", "files": ["components/shell.css"], "defined": true, "block": "luz-docs-main" },
|
|
17
|
+
{ "name": "luz-docs-nav", "kind": "pattern", "layer": "luz.docs", "files": ["components/shell.css"], "defined": true, "block": "luz-docs-nav" },
|
|
18
|
+
{ "name": "luz-docs-page-foot", "kind": "pattern", "layer": "luz.docs", "files": ["components/page-foot.css"], "defined": true, "block": "luz-docs-page-foot" },
|
|
19
|
+
{ "name": "luz-docs-page-head", "kind": "pattern", "layer": "luz.docs", "files": ["components/page-head.css"], "defined": true, "block": "luz-docs-page-head" },
|
|
20
|
+
{ "name": "luz-docs-page-head__eyebrow", "kind": "pattern", "layer": "luz.docs", "files": ["components/page-head.css"], "defined": true, "block": "luz-docs-page-head", "part": "eyebrow" },
|
|
21
|
+
{ "name": "luz-docs-page-head__files", "kind": "pattern", "layer": "luz.docs", "files": ["components/page-head.css"], "defined": true, "block": "luz-docs-page-head", "part": "files" },
|
|
22
|
+
{ "name": "luz-docs-page-head__lead", "kind": "pattern", "layer": "luz.docs", "files": ["components/page-head.css"], "defined": true, "block": "luz-docs-page-head", "part": "lead" },
|
|
23
|
+
{ "name": "luz-docs-page-head__meta", "kind": "pattern", "layer": "luz.docs", "files": ["components/page-head.css"], "defined": true, "block": "luz-docs-page-head", "part": "meta" },
|
|
24
|
+
{ "name": "luz-docs-pager", "kind": "pattern", "layer": "luz.docs", "files": ["components/pager.css"], "defined": true, "block": "luz-docs-pager" },
|
|
25
|
+
{ "name": "luz-docs-pager__label", "kind": "pattern", "layer": "luz.docs", "files": ["components/pager.css"], "defined": true, "block": "luz-docs-pager", "part": "label" },
|
|
26
|
+
{ "name": "luz-docs-pager__link", "kind": "pattern", "layer": "luz.docs", "files": ["components/pager.css"], "defined": true, "block": "luz-docs-pager", "part": "link" },
|
|
27
|
+
{ "name": "luz-docs-pager__next", "kind": "pattern", "layer": "luz.docs", "files": ["components/pager.css"], "defined": true, "block": "luz-docs-pager", "part": "next" },
|
|
28
|
+
{ "name": "luz-docs-pager__prev", "kind": "pattern", "layer": "luz.docs", "files": ["components/pager.css"], "defined": true, "block": "luz-docs-pager", "part": "prev" },
|
|
29
|
+
{ "name": "luz-docs-pager__title", "kind": "pattern", "layer": "luz.docs", "files": ["components/pager.css"], "defined": true, "block": "luz-docs-pager", "part": "title" },
|
|
30
|
+
{ "name": "luz-docs-rail", "kind": "pattern", "layer": "luz.docs", "files": ["components/rail.css", "components/shell.css"], "defined": true, "block": "luz-docs-rail" },
|
|
31
|
+
{ "name": "luz-docs-rail__actions", "kind": "pattern", "layer": "luz.docs", "files": ["components/rail.css"], "defined": true, "block": "luz-docs-rail", "part": "actions" },
|
|
32
|
+
{ "name": "luz-docs-rail__fold", "kind": "pattern", "layer": "luz.docs", "files": ["components/rail.css"], "defined": false, "block": "luz-docs-rail", "part": "fold" },
|
|
33
|
+
{ "name": "luz-docs-rail__inner", "kind": "pattern", "layer": "luz.docs", "files": ["components/rail.css"], "defined": true, "block": "luz-docs-rail", "part": "inner" },
|
|
34
|
+
{ "name": "luz-docs-rail__link", "kind": "pattern", "layer": "luz.docs", "files": ["components/rail.css"], "defined": true, "block": "luz-docs-rail", "part": "link" },
|
|
35
|
+
{ "name": "luz-docs-rail__list", "kind": "pattern", "layer": "luz.docs", "files": ["components/rail.css"], "defined": true, "block": "luz-docs-rail", "part": "list" },
|
|
36
|
+
{ "name": "luz-docs-rail__onpage", "kind": "pattern", "layer": "luz.docs", "files": ["components/rail.css"], "defined": false, "block": "luz-docs-rail", "part": "onpage" },
|
|
37
|
+
{ "name": "luz-docs-rail__sub", "kind": "pattern", "layer": "luz.docs", "files": ["components/rail.css"], "defined": true, "block": "luz-docs-rail", "part": "sub" },
|
|
38
|
+
{ "name": "luz-docs-rail__title", "kind": "pattern", "layer": "luz.docs", "files": ["components/rail.css"], "defined": true, "block": "luz-docs-rail", "part": "title" },
|
|
39
|
+
{ "name": "luz-docs-shell", "kind": "pattern", "layer": "luz.docs", "files": ["components/shell.css"], "defined": true, "block": "luz-docs-shell" }
|
|
40
|
+
],
|
|
41
|
+
"properties": [
|
|
42
|
+
{ "name": "--luz-docs-measure", "scope": "component", "layer": "luz.docs", "files": ["components/shell.css"] },
|
|
43
|
+
{ "name": "--luz-docs-nav-w", "scope": "component", "layer": "luz.docs", "files": ["components/shell.css"] },
|
|
44
|
+
{ "name": "--luz-docs-rail-top", "scope": "component", "layer": "luz.docs", "files": ["components/shell.css"] },
|
|
45
|
+
{ "name": "--luz-docs-rail-w", "scope": "component", "layer": "luz.docs", "files": ["components/shell.css"] }
|
|
46
|
+
]
|
|
47
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
@layer luz.tokens, luz.themes, luz.settings, luz.generic, luz.elements, luz.objects, luz.components, luz.utilities, luz.site, luz.landing, luz.cms, luz.app, luz.docs, luz.print;
|
|
2
|
+
@layer luz.docs {
|
|
3
|
+
/* ==========================================================================
|
|
4
|
+
LUZ DOCS: do and don't.
|
|
5
|
+
div.luz-docs-dodont > figure.__item.__item--do, then --dont, each a
|
|
6
|
+
figcaption > strong.__verdict ("Do", "Don't") and its reason, then a
|
|
7
|
+
div.__stage (the example, inert and aria-hidden: the caption says what it
|
|
8
|
+
shows) or a code block. Side by side when there is room, stacked below.
|
|
9
|
+
The verdict is a word; the mark before it (a tick, a cross) and the
|
|
10
|
+
frame (solid, dashed) are extra cues, never the only one, and so is the
|
|
11
|
+
colour (green, red).
|
|
12
|
+
========================================================================== */
|
|
13
|
+
|
|
14
|
+
.luz-docs-dodont {
|
|
15
|
+
display: grid;
|
|
16
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
|
|
17
|
+
gap: var(--luz-space-md);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.luz-docs-dodont__item {
|
|
21
|
+
display: grid;
|
|
22
|
+
grid-template-rows: auto 1fr;
|
|
23
|
+
gap: var(--luz-space-sm);
|
|
24
|
+
min-inline-size: 0;
|
|
25
|
+
margin: 0;
|
|
26
|
+
padding: var(--luz-space-sm);
|
|
27
|
+
border: 2px solid var(--luz-divider);
|
|
28
|
+
border-radius: var(--luz-radius-md);
|
|
29
|
+
background: var(--luz-surface);
|
|
30
|
+
color: var(--luz-text-primary);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.luz-docs-dodont__item--do {
|
|
34
|
+
border-color: var(--luz-color-success);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.luz-docs-dodont__item--dont {
|
|
38
|
+
border-style: dashed;
|
|
39
|
+
border-color: var(--luz-color-danger);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.luz-docs-dodont__item > :where(figcaption) {
|
|
43
|
+
font-style: normal;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.luz-docs-dodont__verdict {
|
|
47
|
+
display: block;
|
|
48
|
+
color: var(--luz-color-success);
|
|
49
|
+
font-family: var(--luz-font-sans);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.luz-docs-dodont__item--dont .luz-docs-dodont__verdict {
|
|
53
|
+
color: var(--luz-color-danger);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* The mark is decoration: the word says it. A browser without alternative
|
|
57
|
+
text for content reads the first value */
|
|
58
|
+
.luz-docs-dodont__verdict::before {
|
|
59
|
+
content: "\2713 ";
|
|
60
|
+
content: "\2713 " / "";
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.luz-docs-dodont__item--dont .luz-docs-dodont__verdict::before {
|
|
64
|
+
content: "\2715 ";
|
|
65
|
+
content: "\2715 " / "";
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.luz-docs-dodont__stage {
|
|
69
|
+
display: grid;
|
|
70
|
+
gap: var(--luz-space-sm);
|
|
71
|
+
align-content: center;
|
|
72
|
+
min-inline-size: 0;
|
|
73
|
+
padding: var(--luz-space-md);
|
|
74
|
+
border: 1px solid var(--luz-divider);
|
|
75
|
+
border-radius: var(--luz-radius-sm);
|
|
76
|
+
background: var(--luz-surface-page);
|
|
77
|
+
color: var(--luz-text-primary);
|
|
78
|
+
overflow-wrap: anywhere;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.luz-docs-dodont__stage > :where(*) {
|
|
82
|
+
margin-block: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer luz.tokens,luz.themes,luz.settings,luz.generic,luz.elements,luz.objects,luz.components,luz.utilities,luz.site,luz.landing,luz.cms,luz.app,luz.docs,luz.print;@layer luz.docs{.luz-docs-dodont{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,17.5rem),1fr));gap:var(--luz-space-md)}.luz-docs-dodont__item{display:grid;grid-template-rows:auto 1fr;gap:var(--luz-space-sm);min-inline-size:0;margin:0;padding:var(--luz-space-sm);border:2px solid var(--luz-divider);border-radius:var(--luz-radius-md);background:var(--luz-surface);color:var(--luz-text-primary)}.luz-docs-dodont__item--do{border-color:var(--luz-color-success)}.luz-docs-dodont__item--dont{border-style:dashed;border-color:var(--luz-color-danger)}.luz-docs-dodont__item>:where(figcaption){font-style:normal}.luz-docs-dodont__verdict{display:block;color:var(--luz-color-success);font-family:var(--luz-font-sans)}.luz-docs-dodont__item--dont .luz-docs-dodont__verdict{color:var(--luz-color-danger)}.luz-docs-dodont__verdict:before{content:"\2713 ";content:"\2713 " / ""}.luz-docs-dodont__item--dont .luz-docs-dodont__verdict:before{content:"\2715 ";content:"\2715 " / ""}.luz-docs-dodont__stage{display:grid;gap:var(--luz-space-sm);align-content:center;min-inline-size:0;padding:var(--luz-space-md);border:1px solid var(--luz-divider);border-radius:var(--luz-radius-sm);background:var(--luz-surface-page);color:var(--luz-text-primary);overflow-wrap:anywhere}.luz-docs-dodont__stage>:where(*){margin-block:0}}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@layer luz.tokens, luz.themes, luz.settings, luz.generic, luz.elements, luz.objects, luz.components, luz.utilities, luz.site, luz.landing, luz.cms, luz.app, luz.docs, luz.print;
|
|
2
|
+
@layer luz.docs {
|
|
3
|
+
/* ==========================================================================
|
|
4
|
+
LUZ DOCS: example.
|
|
5
|
+
figure.luz-docs-example > div.__preview (the live markup, in a
|
|
6
|
+
div.__frame) + an optional div.__code (core's pre.luz-code-block). One
|
|
7
|
+
frame for both: the code sits under the preview, across its width, and a
|
|
8
|
+
long line scrolls inside its own box. The frame is as wide as the
|
|
9
|
+
preview, or as --luz-docs-example-w says (a width selector sets it:
|
|
10
|
+
20rem is a phone), never wider; it is a size container, so what is in it
|
|
11
|
+
answers to the frame.
|
|
12
|
+
========================================================================== */
|
|
13
|
+
|
|
14
|
+
.luz-docs-example {
|
|
15
|
+
display: grid;
|
|
16
|
+
grid-template-columns: minmax(0, 1fr);
|
|
17
|
+
margin: 0;
|
|
18
|
+
padding: 0;
|
|
19
|
+
border: 1px solid var(--luz-divider);
|
|
20
|
+
border-radius: var(--luz-radius-md);
|
|
21
|
+
background: var(--luz-surface);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.luz-docs-example__preview {
|
|
25
|
+
padding: var(--luz-space-md);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.luz-docs-example__frame {
|
|
29
|
+
inline-size: min(100%, var(--luz-docs-example-w, 100%));
|
|
30
|
+
margin-inline: auto;
|
|
31
|
+
container-type: inline-size;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.luz-docs-example__code {
|
|
35
|
+
min-inline-size: 0;
|
|
36
|
+
border-block-start: 1px solid var(--luz-divider);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* The frame draws the edge: the code block keeps only its inner corners */
|
|
40
|
+
.luz-docs-example__code > :where(pre) {
|
|
41
|
+
margin: 0;
|
|
42
|
+
border: 0;
|
|
43
|
+
border-radius: 0 0 calc(var(--luz-radius-md) - 1px) calc(var(--luz-radius-md) - 1px);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer luz.tokens,luz.themes,luz.settings,luz.generic,luz.elements,luz.objects,luz.components,luz.utilities,luz.site,luz.landing,luz.cms,luz.app,luz.docs,luz.print;@layer luz.docs{.luz-docs-example{display:grid;grid-template-columns:minmax(0,1fr);margin:0;padding:0;border:1px solid var(--luz-divider);border-radius:var(--luz-radius-md);background:var(--luz-surface)}.luz-docs-example__preview{padding:var(--luz-space-md)}.luz-docs-example__frame{inline-size:min(100%,var(--luz-docs-example-w, 100%));margin-inline:auto;container-type:inline-size}.luz-docs-example__code{min-inline-size:0;border-block-start:1px solid var(--luz-divider)}.luz-docs-example__code>:where(pre){margin:0;border:0;border-radius:0 0 calc(var(--luz-radius-md) - 1px) calc(var(--luz-radius-md) - 1px)}}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@layer luz.tokens, luz.themes, luz.settings, luz.generic, luz.elements, luz.objects, luz.components, luz.utilities, luz.site, luz.landing, luz.cms, luz.app, luz.docs, luz.print;
|
|
2
|
+
@layer luz.docs {
|
|
3
|
+
/* ==========================================================================
|
|
4
|
+
LUZ DOCS: page foot.
|
|
5
|
+
p.luz-docs-page-foot: "Last updated" and a <time>, then "Edit this page"
|
|
6
|
+
and "Report a problem", separated by a middle dot in the text. Small
|
|
7
|
+
print under the content, after the pager; it wraps on a narrow screen
|
|
8
|
+
and each link is a 28px target.
|
|
9
|
+
========================================================================== */
|
|
10
|
+
|
|
11
|
+
.luz-docs-page-foot {
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding-block-start: var(--luz-space-md);
|
|
14
|
+
border-block-start: 1px solid var(--luz-divider);
|
|
15
|
+
font-family: var(--luz-font-sans);
|
|
16
|
+
font-size: var(--luz-text-sm);
|
|
17
|
+
color: var(--luz-text-secondary);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.luz-docs-page-foot > :where(a) {
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
min-block-size: var(--luz-control-sm);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* The date in the size of the line, not core's smaller <time> */
|
|
27
|
+
.luz-docs-page-foot > :where(time) {
|
|
28
|
+
font-size: inherit;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer luz.tokens,luz.themes,luz.settings,luz.generic,luz.elements,luz.objects,luz.components,luz.utilities,luz.site,luz.landing,luz.cms,luz.app,luz.docs,luz.print;@layer luz.docs{.luz-docs-page-foot{margin:0;padding-block-start:var(--luz-space-md);border-block-start:1px solid var(--luz-divider);font-family:var(--luz-font-sans);font-size:var(--luz-text-sm);color:var(--luz-text-secondary)}.luz-docs-page-foot>:where(a){display:inline-flex;align-items:center;min-block-size:var(--luz-control-sm)}.luz-docs-page-foot>:where(time){font-size:inherit}}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
@layer luz.tokens, luz.themes, luz.settings, luz.generic, luz.elements, luz.objects, luz.components, luz.utilities, luz.site, luz.landing, luz.cms, luz.app, luz.docs, luz.print;
|
|
2
|
+
@layer luz.docs {
|
|
3
|
+
/* ==========================================================================
|
|
4
|
+
LUZ DOCS: page head.
|
|
5
|
+
header.luz-docs-page-head > p.__eyebrow (the area · the group), h1,
|
|
6
|
+
p.__lead (one sentence), ul.__meta (chips: the files, the script or "No
|
|
7
|
+
JavaScript", the modes, whether it is tested, its known issues). A chip
|
|
8
|
+
is a word in a rounded outline; a link in one is a 28px target. A page
|
|
9
|
+
that is not a component says its files in p.__files instead, one quiet
|
|
10
|
+
line ("Files: <code>…</code>"), without the chips.
|
|
11
|
+
========================================================================== */
|
|
12
|
+
|
|
13
|
+
.luz-docs-page-head {
|
|
14
|
+
display: grid;
|
|
15
|
+
grid-template-columns: minmax(0, 1fr);
|
|
16
|
+
gap: var(--luz-space-sm);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.luz-docs-page-head > :where(h1) {
|
|
20
|
+
margin: 0;
|
|
21
|
+
font-size: var(--luz-text-4xl);
|
|
22
|
+
line-height: 1.1;
|
|
23
|
+
text-wrap: balance;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.luz-docs-page-head__eyebrow {
|
|
27
|
+
margin: 0;
|
|
28
|
+
font-family: var(--luz-font-sans);
|
|
29
|
+
font-size: var(--luz-text-xs);
|
|
30
|
+
font-weight: 500;
|
|
31
|
+
letter-spacing: 0.1em;
|
|
32
|
+
text-transform: uppercase;
|
|
33
|
+
color: var(--luz-text-secondary);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* A package name in it keeps its own case: @luz-ds/core */
|
|
37
|
+
.luz-docs-page-head__eyebrow :where(code) {
|
|
38
|
+
letter-spacing: 0;
|
|
39
|
+
text-transform: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Spacing between letters breaks the joins of Arabic script */
|
|
43
|
+
.luz-docs-page-head__eyebrow:lang(ar) {
|
|
44
|
+
letter-spacing: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.luz-docs-page-head__lead {
|
|
48
|
+
margin: 0;
|
|
49
|
+
font-size: var(--luz-text-lg);
|
|
50
|
+
color: var(--luz-text-secondary);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.luz-docs-page-head__meta {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-wrap: wrap;
|
|
56
|
+
gap: var(--luz-space-xs);
|
|
57
|
+
margin: 0;
|
|
58
|
+
padding: 0;
|
|
59
|
+
list-style: none;
|
|
60
|
+
font-family: var(--luz-font-sans);
|
|
61
|
+
font-size: var(--luz-text-xs);
|
|
62
|
+
color: var(--luz-text-secondary);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.luz-docs-page-head__meta > :where(li) {
|
|
66
|
+
display: inline-flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
min-block-size: var(--luz-control-sm);
|
|
69
|
+
padding-inline: var(--luz-space-sm);
|
|
70
|
+
border: 1px solid var(--luz-divider);
|
|
71
|
+
border-radius: var(--luz-radius-full);
|
|
72
|
+
overflow-wrap: anywhere;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.luz-docs-page-head__meta :where(a) {
|
|
76
|
+
display: inline-flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
min-block-size: var(--luz-control-sm);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.luz-docs-page-head__files {
|
|
82
|
+
margin: 0;
|
|
83
|
+
font-family: var(--luz-font-sans);
|
|
84
|
+
font-size: var(--luz-text-xs);
|
|
85
|
+
color: var(--luz-text-secondary);
|
|
86
|
+
overflow-wrap: anywhere;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@media (max-width: 640px) {
|
|
90
|
+
.luz-docs-page-head > :where(h1) {
|
|
91
|
+
font-size: var(--luz-text-2xl);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.luz-docs-page-head__lead {
|
|
95
|
+
font-size: var(--luz-text-base);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer luz.tokens,luz.themes,luz.settings,luz.generic,luz.elements,luz.objects,luz.components,luz.utilities,luz.site,luz.landing,luz.cms,luz.app,luz.docs,luz.print;@layer luz.docs{.luz-docs-page-head{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--luz-space-sm)}.luz-docs-page-head>:where(h1){margin:0;font-size:var(--luz-text-4xl);line-height:1.1;text-wrap:balance}.luz-docs-page-head__eyebrow{margin:0;font-family:var(--luz-font-sans);font-size:var(--luz-text-xs);font-weight:500;letter-spacing:.1em;text-transform:uppercase;color:var(--luz-text-secondary)}.luz-docs-page-head__eyebrow :where(code){letter-spacing:0;text-transform:none}.luz-docs-page-head__eyebrow:lang(ar){letter-spacing:0}.luz-docs-page-head__lead{margin:0;font-size:var(--luz-text-lg);color:var(--luz-text-secondary)}.luz-docs-page-head__meta{display:flex;flex-wrap:wrap;gap:var(--luz-space-xs);margin:0;padding:0;list-style:none;font-family:var(--luz-font-sans);font-size:var(--luz-text-xs);color:var(--luz-text-secondary)}.luz-docs-page-head__meta>:where(li){display:inline-flex;align-items:center;min-block-size:var(--luz-control-sm);padding-inline:var(--luz-space-sm);border:1px solid var(--luz-divider);border-radius:var(--luz-radius-full);overflow-wrap:anywhere}.luz-docs-page-head__meta :where(a){display:inline-flex;align-items:center;min-block-size:var(--luz-control-sm)}.luz-docs-page-head__files{margin:0;font-family:var(--luz-font-sans);font-size:var(--luz-text-xs);color:var(--luz-text-secondary);overflow-wrap:anywhere}@media(max-width:640px){.luz-docs-page-head>:where(h1){font-size:var(--luz-text-2xl)}.luz-docs-page-head__lead{font-size:var(--luz-text-base)}}}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
@layer luz.tokens, luz.themes, luz.settings, luz.generic, luz.elements, luz.objects, luz.components, luz.utilities, luz.site, luz.landing, luz.cms, luz.app, luz.docs, luz.print;
|
|
2
|
+
@layer luz.docs {
|
|
3
|
+
/* ==========================================================================
|
|
4
|
+
LUZ DOCS: pager.
|
|
5
|
+
nav[aria-label] > ul.luz-docs-pager > li.__prev / li.__next >
|
|
6
|
+
a.__link[rel] > span.__label ("Previous", "Next") + span.__title (the
|
|
7
|
+
page). Two link blocks side by side, Next at the end, the whole block the
|
|
8
|
+
link; stacked at 640px and below. Name each link from its visible text
|
|
9
|
+
first ("Previous: Badge").
|
|
10
|
+
========================================================================== */
|
|
11
|
+
|
|
12
|
+
.luz-docs-pager {
|
|
13
|
+
display: grid;
|
|
14
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
15
|
+
gap: var(--luz-space-md);
|
|
16
|
+
margin: 0;
|
|
17
|
+
padding: 0;
|
|
18
|
+
list-style: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.luz-docs-pager__prev {
|
|
22
|
+
grid-column: 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.luz-docs-pager__next {
|
|
26
|
+
grid-column: 2;
|
|
27
|
+
text-align: end;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.luz-docs-pager__link {
|
|
31
|
+
display: grid;
|
|
32
|
+
grid-template-columns: minmax(0, 1fr);
|
|
33
|
+
gap: var(--luz-space-3xs);
|
|
34
|
+
block-size: 100%;
|
|
35
|
+
padding: var(--luz-space-sm) var(--luz-space-md);
|
|
36
|
+
border: 1px solid var(--luz-divider);
|
|
37
|
+
border-radius: var(--luz-radius-md);
|
|
38
|
+
text-decoration: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.luz-docs-pager__link:hover {
|
|
42
|
+
border-color: var(--luz-outline);
|
|
43
|
+
background: var(--luz-surface-hover);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.luz-docs-pager__link:hover .luz-docs-pager__title {
|
|
47
|
+
text-decoration: underline;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.luz-docs-pager__label {
|
|
51
|
+
font-size: var(--luz-text-sm);
|
|
52
|
+
color: var(--luz-text-secondary);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.luz-docs-pager__title {
|
|
56
|
+
font-size: var(--luz-text-lg);
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media (max-width: 640px) {
|
|
61
|
+
.luz-docs-pager {
|
|
62
|
+
grid-template-columns: minmax(0, 1fr);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.luz-docs-pager__next {
|
|
66
|
+
grid-column: 1;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer luz.tokens,luz.themes,luz.settings,luz.generic,luz.elements,luz.objects,luz.components,luz.utilities,luz.site,luz.landing,luz.cms,luz.app,luz.docs,luz.print;@layer luz.docs{.luz-docs-pager{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--luz-space-md);margin:0;padding:0;list-style:none}.luz-docs-pager__prev{grid-column:1}.luz-docs-pager__next{grid-column:2;text-align:end}.luz-docs-pager__link{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--luz-space-3xs);block-size:100%;padding:var(--luz-space-sm) var(--luz-space-md);border:1px solid var(--luz-divider);border-radius:var(--luz-radius-md);text-decoration:none}.luz-docs-pager__link:hover{border-color:var(--luz-outline);background:var(--luz-surface-hover)}.luz-docs-pager__link:hover .luz-docs-pager__title{text-decoration:underline}.luz-docs-pager__label{font-size:var(--luz-text-sm);color:var(--luz-text-secondary)}.luz-docs-pager__title{font-size:var(--luz-text-lg);font-weight:600}@media(max-width:640px){.luz-docs-pager{grid-template-columns:minmax(0,1fr)}.luz-docs-pager__next{grid-column:1}}}
|