@birdycom/omniaui 0.13.0 → 0.14.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.
Files changed (55) hide show
  1. package/bin/lib/copy-js.mjs +5 -1
  2. package/dist/components.css +975 -20
  3. package/dist/components.min.css +1 -1
  4. package/dist/docs-ui.css +12 -1
  5. package/dist/form-extras.d.ts +3 -1
  6. package/dist/form-extras.js +21 -3
  7. package/dist/language-select.d.ts +7 -0
  8. package/dist/language-select.js +48 -0
  9. package/dist/oc-theme.css +1 -1
  10. package/dist/particles.d.ts +14 -0
  11. package/dist/particles.js +133 -0
  12. package/dist/parts/app-accordion-accent.css +18 -1
  13. package/dist/parts/app-callout.css +20 -0
  14. package/dist/parts/app-group.css +36 -0
  15. package/dist/parts/app-page-header.css +1 -1
  16. package/dist/parts/app-status-dot.css +19 -4
  17. package/dist/parts/app-version-banner.css +18 -1
  18. package/dist/parts/data-dl-glossary.css +11 -0
  19. package/dist/parts/data-graph.css +132 -0
  20. package/dist/parts/data-meter-row.css +63 -3
  21. package/dist/parts/data-reading.css +26 -0
  22. package/dist/parts/data-step-list.css +42 -0
  23. package/dist/parts/forms-language-select.css +80 -0
  24. package/dist/parts/nav-menu-static.css +50 -0
  25. package/dist/parts/site-backgrounds.css +68 -0
  26. package/dist/parts/site-cards.css +2 -1
  27. package/dist/parts/site-doc-layout.css +39 -0
  28. package/dist/parts/site-layout.css +15 -1
  29. package/dist/parts/site-neon.css +47 -0
  30. package/dist/parts/site-prose.css +4 -1
  31. package/dist/parts/site-tint-card.css +223 -0
  32. package/dist/showcase.css +22 -5
  33. package/dist/toc.d.ts +9 -0
  34. package/dist/toc.js +96 -0
  35. package/manifest.json +88 -0
  36. package/package.json +5 -2
  37. package/snippets/accordion-accent.html +22 -0
  38. package/snippets/backgrounds.html +18 -0
  39. package/snippets/callout.html +17 -0
  40. package/snippets/definition-list.html +1 -0
  41. package/snippets/doc-layout.html +39 -0
  42. package/snippets/graph.html +41 -0
  43. package/snippets/group.html +34 -0
  44. package/snippets/language-select.html +11 -0
  45. package/snippets/menu-static.html +36 -0
  46. package/snippets/meter-row.html +23 -0
  47. package/snippets/neon.html +18 -0
  48. package/snippets/page-sections.html +1 -1
  49. package/snippets/particle-field.html +14 -0
  50. package/snippets/progress.html +1 -1
  51. package/snippets/reading.html +25 -0
  52. package/snippets/status-dot.html +1 -0
  53. package/snippets/step-list.html +28 -0
  54. package/snippets/tint-card.html +66 -0
  55. package/snippets/toc.html +1 -1
@@ -1,6 +1,8 @@
1
- /* File: packages/ui/src/parts/data-meter-row.css | Map: row grid -> label and value -> bar and fill -> levels -> reset line -> list */
1
+ /* File: packages/ui/src/parts/data-meter-row.css | Map: row grid -> label and value -> bar and fill (or a fill element) -> levels -> reset line -> sub-line -> list (compact, dense) */
2
2
  /* Usage meter row: a label, the usage as text, a bar and when it resets. The fill comes from
3
- --oc-meter (0–100%); data-level="warn" or "critical" changes the color. */
3
+ --oc-meter (0–100%); data-level="warn" or "critical" changes the color.
4
+ A live meter can also carry its own fill element (<span class="oc-meter-row__fill" style="inline-size: 42%">):
5
+ patch its inline width in place; the bar then draws no fill of its own. */
4
6
 
5
7
  .oc-meter-row {
6
8
  display: grid;
@@ -12,6 +14,7 @@
12
14
  .oc-meter-row__value { font-size: 0.8125rem; font-variant-numeric: tabular-nums; color: var(--oc-muted-foreground); white-space: nowrap; }
13
15
  .oc-meter-row__value strong { color: var(--oc-foreground); }
14
16
  .oc-meter-row__bar {
17
+ contain: layout paint;
15
18
  grid-column: 1 / -1;
16
19
  block-size: 0.5rem;
17
20
  overflow: hidden;
@@ -27,14 +30,71 @@
27
30
  border-radius: inherit;
28
31
  transition: inline-size 0.4s ease;
29
32
  }
33
+ .oc-meter-row__bar:has(> .oc-meter-row__fill)::before { content: none; }
34
+ .oc-meter-row__fill {
35
+ display: block;
36
+ max-inline-size: 100%;
37
+ block-size: 100%;
38
+ background: var(--oc-meter-color, var(--oc-success));
39
+ border-radius: inherit;
40
+ transition: inline-size 0.4s ease;
41
+ }
30
42
  .oc-meter-row[data-level="warn"] { --oc-meter-color: var(--oc-warning); }
31
43
  .oc-meter-row[data-level="critical"] { --oc-meter-color: var(--oc-destructive); }
32
44
  .oc-meter-row[data-level="critical"] .oc-meter-row__value strong { color: var(--oc-destructive); }
33
45
  .oc-meter-row__reset { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; color: var(--oc-muted-foreground); }
46
+ /* Sub-line: a muted second reading under the bar ("VRAM 2.7 / 8.0 GB") with an optional thin bar of its own.
47
+ The thin bar takes --oc-meter on itself (or an .oc-meter-row__fill child) and its own data-level. */
48
+ .oc-meter-row__sub {
49
+ grid-column: 1 / -1;
50
+ display: flex;
51
+ align-items: center;
52
+ gap: 0.5rem;
53
+ font-size: 0.75rem;
54
+ font-variant-numeric: tabular-nums;
55
+ color: var(--oc-muted-foreground);
56
+ white-space: nowrap;
57
+ }
58
+ .oc-meter-row__subbar {
59
+ --oc-meter-color: var(--oc-muted-foreground);
60
+ contain: layout paint;
61
+ flex: 1;
62
+ min-inline-size: 2rem;
63
+ block-size: 3px;
64
+ overflow: hidden;
65
+ background: var(--oc-muted);
66
+ border-radius: 999px;
67
+ }
68
+ .oc-meter-row__subbar::before {
69
+ content: "";
70
+ display: block;
71
+ inline-size: clamp(0%, var(--oc-meter, 0%), 100%);
72
+ block-size: 100%;
73
+ background: var(--oc-meter-color);
74
+ border-radius: inherit;
75
+ transition: inline-size 0.4s ease;
76
+ }
77
+ .oc-meter-row__subbar:has(> .oc-meter-row__fill)::before { content: none; }
78
+ .oc-meter-row__subbar[data-level="warn"] { --oc-meter-color: var(--oc-warning); }
79
+ .oc-meter-row__subbar[data-level="critical"] { --oc-meter-color: var(--oc-destructive); }
80
+
34
81
  .oc-meter-list { display: grid; gap: 1rem; }
35
82
  .oc-meter-list--compact { gap: 0.625rem; }
36
83
  .oc-meter-list--compact .oc-meter-row__bar { block-size: 0.375rem; }
84
+ /* Dense: for a small widget or tray window (5px bar, smaller label). */
85
+ .oc-meter-list--dense { gap: 0.5rem; }
86
+ .oc-meter-list--dense .oc-meter-row { gap: 0.25rem 0.625rem; }
87
+ .oc-meter-list--dense .oc-meter-row__label { font-size: 0.8rem; }
88
+ .oc-meter-list--dense .oc-meter-row__value { font-size: 0.75rem; }
89
+ .oc-meter-list--dense .oc-meter-row__bar { block-size: 5px; }
90
+ /* Live meters (a value every few seconds, a window that stays open): no width transition, so no layout per frame.
91
+ The dense list is meant for that, so it has none either. */
92
+ :is(.oc-meter-list--live, .oc-meter-list--dense) .oc-meter-row__bar::before,
93
+ :is(.oc-meter-list--live, .oc-meter-list--dense) .oc-meter-row__subbar::before,
94
+ :is(.oc-meter-list--live, .oc-meter-list--dense) .oc-meter-row__fill { transition: none; }
37
95
 
38
96
  @media (prefers-reduced-motion: reduce) {
39
- .oc-meter-row__bar::before { transition: none; }
97
+ .oc-meter-row__bar::before,
98
+ .oc-meter-row__subbar::before,
99
+ .oc-meter-row__fill { transition: none; }
40
100
  }
@@ -0,0 +1,26 @@
1
+ /* File: packages/ui/src/parts/data-reading.css | Map: reading -> levels (cool, warm, hot) -> inside a meter row */
2
+ /* Reading: a small measured value next to another value ("57 °C", "1.2 GHz"), in tabular numbers.
3
+ Levels: --cool (muted, the default look), --warm (warning) and --hot (destructive). The app picks the level,
4
+ for example warm from 70 °C and hot from 85 °C. */
5
+
6
+ .oc-reading {
7
+ display: inline-flex;
8
+ align-items: center;
9
+ gap: 0.25rem;
10
+ padding: 0.0625rem 0.375rem;
11
+ font-size: 0.75rem;
12
+ font-weight: 600;
13
+ font-variant-numeric: tabular-nums;
14
+ line-height: 1.4;
15
+ color: var(--oc-reading-color, var(--oc-muted-foreground));
16
+ white-space: nowrap;
17
+ background: oklch(from var(--oc-reading-color, var(--oc-muted-foreground)) l c h / 0.1);
18
+ border: 1px solid oklch(from var(--oc-reading-color, var(--oc-muted-foreground)) l c h / 0.25);
19
+ border-radius: 999px;
20
+ }
21
+ .oc-reading--cool { --oc-reading-color: var(--oc-muted-foreground); }
22
+ .oc-reading--warm { --oc-reading-color: var(--oc-warning); }
23
+ .oc-reading--hot { --oc-reading-color: var(--oc-destructive); }
24
+
25
+ /* In the value of a meter row: a little room before it. */
26
+ .oc-meter-row__value .oc-reading { margin-inline-start: 0.375rem; }
@@ -0,0 +1,42 @@
1
+ /* File: packages/ui/src/parts/data-step-list.css | Map: list (one column, counter) -> row (number + text) -> number color
2
+ -> links -> small */
3
+ /* Step list: a compact numbered list of steps inside a card or a disclosure ("How to remove this", the steps per
4
+ service, what a scan does). One row per step: the number on the left in the display font, the text on the right.
5
+ The number takes --oc-step-list-color, else the color of the severity card it sits in (--oc-severity-color), else
6
+ primary. Start at another number: style="counter-reset: oc-step-list 3" (the first step is then 4).
7
+ Not to be confused with .oc-steps, the large process section of a website. */
8
+
9
+ .oc-step-list {
10
+ display: grid;
11
+ gap: 0.6rem;
12
+ margin: 0;
13
+ padding: 0;
14
+ list-style: none;
15
+ counter-reset: oc-step-list;
16
+ font-size: 0.875rem;
17
+ line-height: 1.5;
18
+ }
19
+ /* The text flows as normal text (bold words and links stay inline); the number hangs in the indent on the first line. */
20
+ .oc-step-list > li {
21
+ position: relative;
22
+ padding-inline-start: 1.85rem;
23
+ counter-increment: oc-step-list;
24
+ }
25
+ .oc-step-list > li::before {
26
+ content: counter(oc-step-list);
27
+ position: absolute;
28
+ inset-block-start: 0;
29
+ inset-inline-start: 0;
30
+ inline-size: 1.25rem;
31
+ color: var(--oc-step-list-color, var(--oc-severity-color, var(--oc-primary)));
32
+ font-family: var(--oc-font-display, inherit);
33
+ font-weight: 700;
34
+ font-variant-numeric: tabular-nums;
35
+ text-align: end;
36
+ }
37
+ .oc-step-list > li > :first-child { margin-block-start: 0; }
38
+ .oc-step-list > li > :last-child { margin-block-end: 0; }
39
+ .oc-step-list a { text-underline-offset: 2px; }
40
+
41
+ /* Small: tighter rows and a smaller text, for a dense panel. */
42
+ .oc-step-list--sm { gap: 0.4rem; font-size: 0.8125rem; }
@@ -87,3 +87,83 @@ button.oc-language-select {
87
87
  outline: none;
88
88
  }
89
89
  button.oc-language-select:hover { background: var(--oc-surface); }
90
+
91
+ /* Code: closed it shows only the language code ("NL"), open it shows the native list with the full names.
92
+ 34 × 30px, for the actions of a title bar. The code comes from data-code on the wrapper; form-extras.js (and the
93
+ React, Vue and Blade components) keep it in step with the chosen option (its data-code, else its value). */
94
+ .oc-language-select--code {
95
+ justify-content: center;
96
+ inline-size: 34px;
97
+ block-size: 30px;
98
+ padding: 0;
99
+ border-radius: calc(var(--oc-radius) - 2px);
100
+ font-size: 0.75rem;
101
+ font-weight: 700;
102
+ letter-spacing: 0.04em;
103
+ }
104
+ .oc-language-select--code::before { content: attr(data-code); text-transform: uppercase; pointer-events: none; }
105
+ .oc-language-select--code::after,
106
+ .oc-language-select--code .oc-language-select-icon { display: none; }
107
+ .oc-language-select--code .oc-language-select-control { position: absolute; inset: 0; padding: 0; opacity: 0; }
108
+
109
+ /* Open list in the OmniaUI dropdown look (Chrome and Edge 135+: customizable select, appearance: base-select).
110
+ The native list of the system looked like a bare Windows list: narrow, small, no padding. Now it is a popover with
111
+ the colors, padding, radius and shadow of .oc-dropdown-menu, as wide as the longest language (at least 8rem), with a check at the current
112
+ language. Other browsers keep the system list (the select still works the same). */
113
+ @supports (appearance: base-select) {
114
+ .oc-language-select-control,
115
+ .oc-language-select-control::picker(select) { appearance: base-select; }
116
+ .oc-language-select-control {
117
+ min-inline-size: 0;
118
+ border: 0;
119
+ background: transparent;
120
+ }
121
+ /* The list lines up with the whole pill (icon included), not only with the select inside it. anchor-scope keeps
122
+ every pill its own anchor when a page has several. */
123
+ .oc-language-select:has(> .oc-language-select-control) { anchor-name: --oc-language-select; anchor-scope: --oc-language-select; }
124
+ .oc-language-select-control::picker(select) { position-anchor: --oc-language-select; }
125
+ /* The label draws its own chevron (::after). */
126
+ .oc-language-select-control::picker-icon { display: none; }
127
+ .oc-language-select-control::picker(select) {
128
+ /* As wide as the longest language, at least 8rem and never narrower than the field. */
129
+ min-inline-size: max(8rem, anchor-size(inline));
130
+ margin-block: 4px;
131
+ padding: 4px;
132
+ border: 1px solid var(--oc-border);
133
+ border-radius: var(--oc-radius);
134
+ background: var(--oc-popover);
135
+ color: var(--oc-popover-foreground);
136
+ box-shadow: 0 8px 24px oklch(from var(--color-black-60) l c h / 0.15);
137
+ font-size: 0.875rem;
138
+ font-weight: 400;
139
+ letter-spacing: normal;
140
+ text-transform: none;
141
+ position-area: block-end span-inline-end;
142
+ /* Under the field; above it only when it does not fit below (normal order: no "side with the most room"). */
143
+ position-try-order: normal;
144
+ position-try-fallbacks: flip-block;
145
+ }
146
+ .oc-language-select-control option {
147
+ display: flex;
148
+ align-items: center;
149
+ gap: 1rem;
150
+ padding: 8px 10px;
151
+ border-radius: calc(var(--oc-radius) - 2px);
152
+ background: transparent;
153
+ color: inherit;
154
+ cursor: pointer;
155
+ }
156
+ .oc-language-select-control option:hover,
157
+ .oc-language-select-control option:focus-visible {
158
+ background: var(--oc-accent);
159
+ color: var(--oc-accent-foreground);
160
+ outline: none;
161
+ }
162
+ .oc-language-select-control option:checked { font-weight: 600; }
163
+ /* The check of the current language on the right, in the primary color. */
164
+ .oc-language-select-control option::checkmark { order: 1; margin-inline-start: auto; color: var(--oc-primary); }
165
+
166
+ /* Code: the select lies over the whole button (still invisible text), the list opens under it, aligned right. */
167
+ .oc-language-select--code .oc-language-select-control { opacity: 1; color: transparent; overflow: hidden; }
168
+ .oc-language-select--code .oc-language-select-control::picker(select) { position-area: block-end span-inline-start; }
169
+ }
@@ -0,0 +1,50 @@
1
+ /* File: packages/ui/src/parts/nav-menu-static.css | Map: static menu (no popover, fills its box) -> check column -> hint -> group title */
2
+ /* Static menu: the dropdown menu as a whole surface of its own, for a tray menu in its own small window or a menu
3
+ inside a panel. .oc-dropdown-menu--static drops the popover position and fills its container.
4
+ Items can carry a check column (.oc-dropdown-check, 20px, shows ✓ when the item has aria-checked="true") and a
5
+ muted hint on the right (.oc-dropdown-hint). Group titles: .oc-dropdown-label; red item: .oc-dropdown-item--destructive. */
6
+
7
+ .oc-dropdown-menu.oc-dropdown-menu--static,
8
+ .oc-dropdown-menu.oc-dropdown-menu--static[popover] {
9
+ position: static;
10
+ display: block;
11
+ inline-size: 100%;
12
+ min-inline-size: 0;
13
+ margin: 0;
14
+ animation: none;
15
+ }
16
+ /* In a transparent desktop window the window is the frame: --flat drops the border and shadow. */
17
+ .oc-dropdown-menu--static.oc-dropdown-menu--flat { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
18
+
19
+ .oc-dropdown-check {
20
+ display: inline-flex;
21
+ flex: none;
22
+ justify-content: center;
23
+ inline-size: 20px;
24
+ margin-inline-start: -4px;
25
+ color: var(--oc-primary);
26
+ }
27
+ .oc-dropdown-check::before {
28
+ content: "";
29
+ inline-size: 0.35rem;
30
+ block-size: 0.65rem;
31
+ border-inline-end: 2px solid currentColor;
32
+ border-block-end: 2px solid currentColor;
33
+ rotate: 45deg;
34
+ translate: 0 -10%;
35
+ opacity: 0;
36
+ }
37
+ .oc-dropdown-item[aria-checked="true"] > .oc-dropdown-check::before { opacity: 1; }
38
+ /* With its own check column, the role-based check mark is not drawn a second time. */
39
+ .oc-dropdown-item:has(> .oc-dropdown-check) { padding-inline-start: 10px; }
40
+ .oc-dropdown-item:has(> .oc-dropdown-check)::before { content: none; }
41
+
42
+ .oc-dropdown-hint {
43
+ margin-inline-start: auto;
44
+ padding-inline-start: 1rem;
45
+ font-size: 0.75rem;
46
+ font-variant-numeric: tabular-nums;
47
+ color: var(--oc-muted-foreground);
48
+ white-space: nowrap;
49
+ }
50
+ .oc-dropdown-menu--static .oc-dropdown-label { font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; }
@@ -0,0 +1,68 @@
1
+ /* File: packages/ui/src/parts/site-backgrounds.css | Map: grid (--fixed, --fade) -> orb (--sm, --drift) -> scan lines -> particle canvas -> reduced motion */
2
+ /* Background pack: decorative layers behind (or over) a page or a section. All are aria-hidden, ignore the pointer and
3
+ follow the theme tokens; put them in a positioned parent (scan lines and the particle canvas cover the viewport unless --local).
4
+ <div class="oc-bg-grid" aria-hidden="true"></div> <div class="oc-orb" aria-hidden="true"></div>
5
+ <div class="oc-scanlines" aria-hidden="true"></div> <canvas class="oc-particles" aria-hidden="true"></canvas> (+ particles.js) */
6
+
7
+ /* Grid: thin lines in the primary color. --oc-bg-grid-size (60px) and --oc-bg-grid-line set the size and the color. */
8
+ .oc-bg-grid {
9
+ position: absolute;
10
+ inset: 0;
11
+ z-index: -1;
12
+ pointer-events: none;
13
+ background-image:
14
+ linear-gradient(var(--oc-bg-grid-line, oklch(from var(--oc-primary) l c h / 0.04)) 1px, transparent 1px),
15
+ linear-gradient(90deg, var(--oc-bg-grid-line, oklch(from var(--oc-primary) l c h / 0.04)) 1px, transparent 1px);
16
+ background-size: var(--oc-bg-grid-size, 60px) var(--oc-bg-grid-size, 60px);
17
+ }
18
+ .oc-bg-grid--fixed { position: fixed; --oc-bg-grid-size: 40px; }
19
+ /* Fade: the lines disappear towards the edges. */
20
+ .oc-bg-grid--fade { mask-image: radial-gradient(ellipse at 50% 40%, black 30%, transparent 75%); }
21
+
22
+ /* Orb: a soft round glow in the accent color (.oc-accent--violet for another color). Place it with inset-* or translate. */
23
+ .oc-orb {
24
+ position: absolute;
25
+ z-index: -1;
26
+ inline-size: var(--oc-orb-size, min(500px, 90vw));
27
+ aspect-ratio: 1;
28
+ pointer-events: none;
29
+ background: radial-gradient(circle, oklch(from var(--oc-accent-from) l c h / var(--oc-orb-strength, 0.15)) 0%, transparent 70%);
30
+ border-radius: 50%;
31
+ filter: blur(var(--oc-orb-blur, 50px));
32
+ }
33
+ .oc-orb--sm { --oc-orb-size: 18rem; --oc-orb-blur: 35px; }
34
+ .oc-orb--drift { animation: oc-orb-drift 18s ease-in-out infinite alternate; }
35
+ @keyframes oc-orb-drift { to { translate: 3rem 2rem; scale: 1.1; } }
36
+
37
+ /* Scan lines: a fine horizontal raster over the page (2% primary). --local keeps it inside a positioned parent. */
38
+ .oc-scanlines {
39
+ position: fixed;
40
+ inset: 0;
41
+ z-index: var(--oc-scanlines-z, 9999);
42
+ pointer-events: none;
43
+ background: repeating-linear-gradient(
44
+ 0deg,
45
+ transparent 0 2px,
46
+ var(--oc-scanlines-color, oklch(from var(--oc-primary) l c h / 0.02)) 2px 4px
47
+ );
48
+ }
49
+ .oc-scanlines--local { position: absolute; z-index: 1; }
50
+
51
+ /* Particle canvas: particles.js draws drifting points with thin lines between neighbours. It reads two colors from
52
+ this element: color (points and lines) and border-color (a second point color). --local fills a positioned parent. */
53
+ .oc-particles {
54
+ position: fixed;
55
+ inset: 0;
56
+ z-index: -1;
57
+ display: block;
58
+ inline-size: 100%;
59
+ block-size: 100%;
60
+ pointer-events: none;
61
+ color: var(--oc-accent-from);
62
+ border: 0 solid var(--oc-accent-to);
63
+ }
64
+ .oc-particles--local { position: absolute; }
65
+
66
+ @media (prefers-reduced-motion: reduce) {
67
+ .oc-orb--drift { animation: none; }
68
+ }
@@ -120,7 +120,8 @@
120
120
  }
121
121
  .oc-note--md {
122
122
  max-inline-size: 60rem;
123
- font-size: 1rem;
123
+ /* The size of the running text around it (the body size of the page). */
124
+ font-size: inherit;
124
125
  }
125
126
 
126
127
  /* Row of badges or pills above a title, and a tagline in the accent color (lighter, so it reads on a dark page). */
@@ -0,0 +1,39 @@
1
+ /* File: packages/ui/src/parts/site-doc-layout.css */
2
+ /* Map: sticky offset (token, auto under a site header, scroll padding for anchors) -> document layout (side column +
3
+ text) -> sticky side column from 64rem -> a table of contents inside it */
4
+ /* A document page with a side column (a table of contents next to a privacy policy, terms or a manual) and the offset
5
+ that keeps sticky parts and anchor jumps clear of a sticky site header.
6
+ --oc-sticky-offset: how far from the top sticky parts stop. Set it yourself (:root { --oc-sticky-offset: 5rem }), or
7
+ let it follow .oc-site-header: its height (--oc-site-header-height, 4.5rem) plus 1rem. Used by .oc-toc,
8
+ .oc-doc-layout__aside, .oc-page-header--sticky and the scroll padding of the page, so a heading you jump to from the
9
+ table of contents is not hidden under the header. */
10
+
11
+ /* Only the header of the page itself (not one shown as an example inside <main>); :where keeps it overridable, also
12
+ by a scroll-p* utility on <html>. */
13
+ :where(html:has(.oc-site-header:not(main *))) { --oc-sticky-offset: calc(var(--oc-site-header-height, 4.5rem) + 1rem); }
14
+ :where(html) { scroll-padding-block-start: var(--oc-sticky-offset, 0px); }
15
+
16
+ /* Document layout: side column (--oc-doc-aside, 17rem) and the text; stacked below 64rem, side column first.
17
+ --end puts the side column on the right on a wide screen. */
18
+ .oc-doc-layout {
19
+ display: grid;
20
+ gap: var(--oc-doc-gap, 2rem 4rem);
21
+ align-items: start;
22
+ }
23
+ .oc-doc-layout__aside,
24
+ .oc-doc-layout__main { min-inline-size: 0; }
25
+ @media (min-width: 64rem) {
26
+ .oc-doc-layout { grid-template-columns: var(--oc-doc-aside, 17rem) minmax(0, 1fr); }
27
+ .oc-doc-layout--end { grid-template-columns: minmax(0, 1fr) var(--oc-doc-aside, 17rem); }
28
+ .oc-doc-layout--end > .oc-doc-layout__aside { order: 1; }
29
+ /* Sticky only next to the text: stacked on a phone it would stay over the text. */
30
+ .oc-doc-layout__aside {
31
+ position: sticky;
32
+ inset-block-start: var(--oc-sticky-offset, 0px);
33
+ max-block-size: calc(100dvh - var(--oc-sticky-offset, 0px) - 1rem);
34
+ overflow: auto;
35
+ overscroll-behavior: contain;
36
+ }
37
+ }
38
+ /* The column is sticky itself, so the table of contents in it is not. */
39
+ .oc-doc-layout__aside .oc-toc { position: static; max-block-size: none; overflow: visible; }
@@ -1,5 +1,5 @@
1
1
  /* File: packages/ui/src/parts/site-layout.css */
2
- /* Map: page hero -> section head / more -> action row -> group title -> band -> meta line */
2
+ /* Map: page hero -> section head (split) / more -> action row -> group title -> band -> meta line */
3
3
  /* Page building blocks for a marketing or company site, on top of the showcase classes (.oc-section-pad, .oc-display):
4
4
  the larger header of an inner page, a section head and a "see more" row, a row of buttons, a group title with a count,
5
5
  a full-width band (for a stat strip) and a meta line (version · date). */
@@ -20,6 +20,20 @@
20
20
  margin-inline: auto;
21
21
  text-align: center;
22
22
  }
23
+ /* Split: the title on the left, the lead on the right (one column below 56rem). Put the eyebrow and the title in a
24
+ <div>, the lead next to it. */
25
+ .oc-section-head--split {
26
+ display: grid;
27
+ gap: 1rem 4rem;
28
+ align-items: end;
29
+ max-inline-size: none;
30
+ }
31
+ .oc-section-head--split > :last-child,
32
+ .oc-section-head--split > div > :last-child { margin-block-end: 0; }
33
+ @media (min-width: 56rem) {
34
+ .oc-section-head--split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
35
+ .oc-section-head--split > .oc-lead { justify-self: end; max-inline-size: 36rem; }
36
+ }
23
37
  .oc-section-more { margin-block-start: 2.5rem; }
24
38
 
25
39
  /* Row of buttons under a text: wraps on a narrow screen. */
@@ -0,0 +1,47 @@
1
+ /* File: packages/ui/src/parts/site-neon.css | Map: glowing border (animated) -> neon button -> reduced motion */
2
+ /* Neon: a border that slowly glows from one accent color to the other, and a button with a neon gradient.
3
+ Colors: --oc-accent-from and --oc-accent-to (brand-1 and brand-2, or an .oc-accent--* preset).
4
+ .oc-glow-border goes on anything with a border: <form class="oc-glass oc-glow-border">, an .oc-card, a panel. */
5
+
6
+ /* The element keeps a steady border and glow in --oc-accent-from; a ::after with the border and a wider glow in
7
+ --oc-accent-to fades in and out over it. Only opacity animates, so the GPU does it: no style or paint work per frame.
8
+ position: relative only when the element has no position of its own (:where = no specificity). */
9
+ :where(.oc-glow-border) { position: relative; }
10
+ .oc-glow-border {
11
+ border-color: var(--oc-accent-from);
12
+ box-shadow: 0 0 10px oklch(from var(--oc-accent-from) l c h / 0.35), var(--oc-glow-extra, 0 0 transparent);
13
+ }
14
+ .oc-glow-border::after {
15
+ content: "";
16
+ position: absolute;
17
+ inset: calc(-1 * var(--oc-glow-border-width, 1px));
18
+ border: var(--oc-glow-border-width, 1px) solid var(--oc-accent-to);
19
+ border-radius: inherit;
20
+ box-shadow: 0 0 20px oklch(from var(--oc-accent-to) l c h / 0.35);
21
+ opacity: 0;
22
+ pointer-events: none;
23
+ animation: oc-glow-border var(--oc-glow-border-duration, 3s) ease-in-out infinite;
24
+ }
25
+ /* Glass keeps its light top edge and drop shadow under the glow. */
26
+ .oc-glass.oc-glow-border { --oc-glow-extra: var(--oc-glass-shadow), inset 0 1px 0 var(--oc-glass-edge-hi); }
27
+ @keyframes oc-glow-border {
28
+ 0%, 100% { opacity: 0; }
29
+ 50% { opacity: 1; }
30
+ }
31
+
32
+ /* Neon button: gradient from one accent to the other, with a glow. --oc-btn-neon-ink sets the text color. */
33
+ .oc-btn--neon {
34
+ font-weight: 700;
35
+ letter-spacing: 0.08em;
36
+ color: var(--oc-btn-neon-ink, light-dark(var(--color-white-50), var(--color-black-40)));
37
+ background: linear-gradient(135deg, var(--oc-accent-from), var(--oc-accent-to)) border-box;
38
+ border-color: transparent;
39
+ box-shadow: 0 0 24px oklch(from var(--oc-accent-from) l c h / 0.4);
40
+ transition: filter var(--oc-transition-fast), box-shadow var(--oc-transition-fast);
41
+ }
42
+ .oc-btn--neon:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 0 32px oklch(from var(--oc-accent-from) l c h / 0.55); opacity: 1; }
43
+ .oc-btn--neon:disabled { color: var(--oc-muted-foreground); background: var(--oc-muted); box-shadow: none; }
44
+
45
+ @media (prefers-reduced-motion: reduce) {
46
+ .oc-glow-border::after { animation: none; }
47
+ }
@@ -23,7 +23,8 @@
23
23
  .oc-prose :where(h3) { margin-block-start: 1.6em; font-size: 1.2em; }
24
24
  .oc-prose :where(h4) { margin-block-start: 1.4em; font-size: 1em; }
25
25
  .oc-prose :where(h1, h2, h3, h4) + :where(*) { margin-block-start: 0.6em; }
26
- .oc-prose :where(h2, h3, h4) { scroll-margin-block-start: 5rem; }
26
+ /* Room above a heading you jump to: 5rem, or 0.5rem on top of the page's scroll padding (--oc-sticky-offset). */
27
+ .oc-prose :where(h2, h3, h4) { scroll-margin-block-start: max(0.5rem, 5rem - var(--oc-sticky-offset, 0px)); }
27
28
 
28
29
  /* ---- Paragraphs ---- */
29
30
  .oc-prose :where(p) { text-wrap: pretty; }
@@ -146,3 +147,5 @@
146
147
  .oc-prose--legal :where(a) { color: var(--oc-brand-1); font-weight: inherit; text-decoration-color: currentColor; text-underline-offset: 3px; }
147
148
  .oc-prose--legal :where(a:hover) { color: var(--oc-foreground); }
148
149
  .oc-prose--legal :where(table) { font-size: 0.93rem; }
150
+ /* Ruled: a line under every h2, so the articles of a long document stand apart (with --legal or any prose). */
151
+ .oc-prose--ruled :where(h2) { padding-block-end: 0.6rem; border-block-end: 1px solid var(--oc-border); }