@popcorn245/cornfield 0.46.2 → 0.48.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/core/contrast.js +6 -6
- package/explorer/css/account.css +46 -0
- package/explorer/css/base.css +159 -0
- package/explorer/css/changes.css +160 -0
- package/explorer/css/decision.css +68 -0
- package/explorer/css/dialogs.css +50 -0
- package/explorer/css/header.css +75 -0
- package/explorer/css/layers.css +92 -0
- package/explorer/css/live.css +48 -0
- package/explorer/css/map.css +43 -0
- package/explorer/css/node-panel.css +188 -0
- package/explorer/css/page.css +83 -0
- package/explorer/css/proposal.css +151 -0
- package/explorer/css/search.css +84 -0
- package/explorer/css/sheets.css +134 -0
- package/explorer/css/whatif.css +55 -0
- package/explorer/css/work.css +288 -0
- package/explorer/engine/hint.js +1 -0
- package/explorer/engine/keyboard.js +2 -2
- package/explorer/engine/map-style.js +9 -4
- package/explorer/flow-build.js +88 -0
- package/explorer/flows.js +1 -81
- package/explorer/focus-room.js +1 -1
- package/explorer/header-fit.js +3 -3
- package/explorer/house.css +1 -1
- package/explorer/index.html +20 -10
- package/explorer/input.js +8 -1
- package/explorer/page-pieces.js +5 -0
- package/explorer/page.js +11 -20
- package/explorer/pieces/adopt-tokens.js +38 -0
- package/explorer/pieces/map-stage.css +14 -0
- package/explorer/pieces/map.js +332 -0
- package/explorer/renderer.js +1 -0
- package/explorer/review.js +1 -1
- package/explorer/theme-model.js +1 -1
- package/explorer/theme.js +1 -1
- package/explorer/tokens.css +2 -2
- package/package.json +1 -1
- package/server/components.js +144 -0
- package/server/embed.js +3 -1
- package/server/server.js +9 -1
- package/explorer/explorer.css +0 -1512
package/core/contrast.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* resolveProps(sheets, state) the custom properties in force for a page: `{ mode, system?, name? }` over `[css, …]` in load order
|
|
8
8
|
* expand(value, props) a value with its var()s replaced, or { problem } naming the property and why (capped: never a hang)
|
|
9
9
|
* resolveColor(props, name | value) a token (or a value) as [r, g, b, a], or { problem } when it cannot be worked out
|
|
10
|
-
* contrastPairs() every pair explorer
|
|
10
|
+
* contrastPairs() every pair the explorer's stylesheets paint, text at 4.5:1 and the state-bearing UI at 3:1
|
|
11
11
|
* contrastProblems(themes) every pair below WCAG AA, for light and dark, on either system setting, over the ground and its image
|
|
12
12
|
* themesToCheck(config) what a repo's check reads: tokens.css, then `theme.css`, then each `theme.names` file
|
|
13
13
|
* checkThemeContrast(config) the check for `cornfield validate`, always run (cornfield's own tokens when there is no theme)
|
|
@@ -344,9 +344,9 @@ export function resolveColor(props, nameOrValue) {
|
|
|
344
344
|
|
|
345
345
|
const SURFACES = ['--corn-surface-1', '--corn-surface-2', '--corn-surface-3'];
|
|
346
346
|
const GROUND = '--corn-ground';
|
|
347
|
-
/** A tint as explorer
|
|
347
|
+
/** A tint as the explorer's stylesheets write it: the token at a share over what is beneath */
|
|
348
348
|
const tint = (token, pct) => `color-mix(in srgb, var(${token}) ${pct}%, transparent)`;
|
|
349
|
-
/** A hue pulled toward the text colour, as
|
|
349
|
+
/** A hue pulled toward the text colour, as they write it for a hue that must read as text */
|
|
350
350
|
const toText = (token, pct) => `color-mix(in srgb, var(${token}) ${pct}%, var(--corn-text))`;
|
|
351
351
|
|
|
352
352
|
/** Text tokens: read on the ground and on every surface */
|
|
@@ -361,8 +361,8 @@ export const SOFT_PAIRS = Object.freeze([
|
|
|
361
361
|
/** Solid fills that carry `--corn-ground` as their text (a pressed data-flow button, a chip, the What-if toggle, the House chip) */
|
|
362
362
|
export const SOLID_FILLS = Object.freeze(['--corn-ok', '--corn-warn', '--corn-bad', '--corn-info', '--corn-hue-orange', '--corn-hue-lime', '--corn-added-text', '--corn-edit-text']);
|
|
363
363
|
/**
|
|
364
|
-
* Text that explorer
|
|
365
|
-
* `[fg, bg, where]`, each the value
|
|
364
|
+
* Text that the explorer's stylesheets paint on something other than a token surface: a category hue as text, or text on a tint it mixes itself.
|
|
365
|
+
* `[fg, bg, where]`, each the value they write (test/core/contrast.test.js holds this list to explorer/css/).
|
|
366
366
|
*/
|
|
367
367
|
export const PAINTED_TEXT = Object.freeze([
|
|
368
368
|
['--corn-hue-fuchsia', GROUND, 'ROM, a milestone, a link button'], ['--corn-hue-fuchsia', '--corn-surface-1', ''], ['--corn-hue-fuchsia', '--corn-surface-2', ''],
|
|
@@ -405,7 +405,7 @@ export const UI_PAIRS = Object.freeze([
|
|
|
405
405
|
...['--corn-ok', '--corn-edit-text', '--corn-bad', '--corn-warn', '--corn-text-3'].flatMap((fg) => ['--corn-surface-2', '--corn-surface-3'].map((bg) => [fg, bg, 'a state pill\'s border'])),
|
|
406
406
|
]);
|
|
407
407
|
|
|
408
|
-
/** The dots that name a diff mark in the bar, the change list and the legend (explorer.css `.hx-mark-dot--*`), each a ring on the ground */
|
|
408
|
+
/** The dots that name a diff mark in the bar, the change list and the legend (explorer/css/base.css `.hx-mark-dot--*`), each a ring on the ground */
|
|
409
409
|
const DIFF_DOT_PAIRS = Object.freeze(['added', 'changed', 'removed', 'edit'].map((m) => [`--corn-${m}`, GROUND, `the ${m} mark's dot`]));
|
|
410
410
|
|
|
411
411
|
/**
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* account.css: the account menu
|
|
3
|
+
* The account button and its menu (account-menu.js): who is signed in, the theme and freeform switches, the review tokens and proposals
|
|
4
|
+
* entries, the links. A part of cornfield's page shell for now (D4 puts it with step 7 or later).
|
|
5
|
+
* No rule here asks what the document says (`:root`, `html`, `body`, `[data-theme]`), sizes from the window (`vw`, `vh`) or is `position: fixed` unless it says why;
|
|
6
|
+
* a width rule is a container query on `corn-box` (page.css), a height rule on `corn-page`. base.css loads first.
|
|
7
|
+
*/
|
|
8
|
+
/* The account button: the initial of who is signed in (a menu glyph when nobody is) */
|
|
9
|
+
.hx-account-btn { display: inline-flex; align-items: center; gap: var(--corn-space-3); height: var(--hx-control-h); padding: 0 var(--corn-space-2) 0 var(--corn-space-1); border-radius: var(--corn-radius-pill); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); color: var(--corn-text-2); }
|
|
10
|
+
.hx-account-btn:hover { background: var(--corn-surface-3); color: var(--corn-text); }
|
|
11
|
+
.hx-account-btn[aria-expanded="true"] { border-color: var(--corn-accent-text); }
|
|
12
|
+
.hx-avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: var(--corn-radius-pill); background: var(--corn-accent); color: var(--corn-text-on-accent); font-size: var(--corn-text-xs); font-weight: 700; }
|
|
13
|
+
.hx-avatar:empty::before { content: "\2630"; }
|
|
14
|
+
/* The account menu: a panel under the button */
|
|
15
|
+
.hx-menu.hx-account-menu { left: auto; right: 0; display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); width: 264px; padding: var(--corn-space-2); font-size: var(--corn-text-sm); user-select: none; }
|
|
16
|
+
.hx-account-who { padding: var(--corn-space-3) var(--corn-space-4) var(--corn-space-2); color: var(--corn-text-3); font-size: var(--corn-text-sm); overflow-wrap: anywhere; }
|
|
17
|
+
.hx-account-row { display: flex; align-items: center; justify-content: space-between; gap: var(--corn-space-3); padding: var(--corn-space-1) var(--corn-space-4); }
|
|
18
|
+
.hx-account-label { color: var(--corn-text-2); }
|
|
19
|
+
.hx-account-seg { display: inline-flex; padding: calc(var(--corn-space-1) / 2); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); }
|
|
20
|
+
.hx-account-seg-btn { height: var(--hx-seg-inner); padding: 0 var(--corn-space-3); border: 0; border-radius: var(--corn-radius-xs); background: transparent; color: var(--corn-text-2); font-size: var(--corn-text-xs); font-weight: 500; }
|
|
21
|
+
.hx-account-seg-btn:hover { color: var(--corn-text); }
|
|
22
|
+
.hx-account-seg-btn[aria-pressed="true"] { background: var(--corn-accent); color: var(--corn-text-on-accent); font-weight: 600; }
|
|
23
|
+
.hx-account-select { display: block; width: calc(100% - var(--corn-space-5)); height: var(--hx-control-h); margin: 0 var(--corn-space-3); padding: 0 var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); color: var(--corn-text); font: inherit; font-size: var(--corn-text-sm); }
|
|
24
|
+
.hx-account-item { display: flex; align-items: center; justify-content: space-between; gap: var(--corn-space-3); width: 100%; min-height: var(--hx-control-h); padding: 0 var(--corn-space-4); border: 0; border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text); font-size: var(--corn-text-sm); text-align: left; text-decoration: none; }
|
|
25
|
+
.hx-account-item:hover { background: var(--corn-surface-3); }
|
|
26
|
+
.hx-account-item--sub { padding-left: var(--corn-space-6); color: var(--corn-text-2); }
|
|
27
|
+
.hx-account-item svg { flex: none; color: var(--corn-text-3); }
|
|
28
|
+
.hx-account-menu .cf-sign-out { margin: 0; }
|
|
29
|
+
.hx-account-menu .cf-sign-out .hx-account-item { color: var(--corn-text-2); }
|
|
30
|
+
.hx-account-menu .hx-links { display: flex; flex-direction: column; margin-top: var(--corn-space-2); padding-top: var(--corn-space-2); border-top: var(--corn-border) solid var(--corn-line); }
|
|
31
|
+
.hx-account-menu .hx-links:empty { display: none; }
|
|
32
|
+
.hx-account-foot { margin: var(--corn-space-1) 0 0; padding: var(--corn-space-2) var(--corn-space-4) var(--corn-space-1); color: var(--corn-text-3); font-size: var(--corn-text-xs); }
|
|
33
|
+
.hx-account-foot a { color: inherit; text-decoration: none; }
|
|
34
|
+
.hx-account-foot a:hover { color: var(--corn-text-2); text-decoration: underline; }
|
|
35
|
+
.hx-account-foot:empty { display: none; }
|
|
36
|
+
/* The Proposals list opens inside the menu, under its entry, until the Specs tab of the Work panel takes it over */
|
|
37
|
+
.hx-account-menu .hx-menu--proposals { position: static; width: auto; max-width: none; max-height: calc(40 * var(--hx-vh, 1cqh)); margin: var(--corn-space-1) 0; padding: var(--corn-space-2); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); box-shadow: none; }
|
|
38
|
+
@container corn-box (max-width: 767px) {
|
|
39
|
+
.hx-account-btn { width: var(--hx-control-h); height: var(--hx-control-h); justify-content: center; padding: 0; border: 0; background: none; }
|
|
40
|
+
.hx-account-caret { display: none; }
|
|
41
|
+
.hx-avatar { width: 28px; height: 28px; }
|
|
42
|
+
.hx-menu.hx-account-menu { width: min(300px, calc(100cqw - 24px)); }
|
|
43
|
+
.hx-account-item, .hx-account-row { min-height: var(--hx-control-h); }
|
|
44
|
+
.hx-account-seg-btn { height: var(--hx-seg-inner); padding: 0 var(--corn-space-4); }
|
|
45
|
+
.hx-account-select { height: var(--hx-control-h); }
|
|
46
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* base.css: what every piece of the explorer needs, whether it sits in cornfield's page or in a shadow root in another app (spec 0011 D8).
|
|
3
|
+
* The shared control and panel rules (buttons, inputs, the menu box, glass, focus rings, the marks' dots, screen-reader text) and the private
|
|
4
|
+
* properties `--hx-*`. Plain CSS: every colour, font, size, radius, border width, shadow and spacing is a --corn-* token from
|
|
5
|
+
* explorer/tokens.css (docs/theming.md; test/explorer/tokens.test.js fails on any literal left here). Light and dark are tokens.css's
|
|
6
|
+
* business: nothing here names a theme. Classes are prefixed hx-. Nothing here asks what the document says: no `:root`, `html` or `body`
|
|
7
|
+
* rule, no unit of the window (`vw`, `vh`), no `position: fixed`; the rules of the page itself are in page.css. A width rule is a
|
|
8
|
+
* container query on `corn-box`, the piece's own box (page.css names the body; a component names its host).
|
|
9
|
+
*
|
|
10
|
+
* A component's host: `container: corn-box corn-page / size` and a definite height, so the width rules, the screen-height rules (`corn-page`)
|
|
11
|
+
* and the `cqw`/`cqh` sizes all read the host. A host that is only `corn-box / inline-size` gets the width rules, but no `corn-page` rule
|
|
12
|
+
* applies (neither the short-screen one nor the tall one), and `cqh` falls through to the nearest size container above it, or to the small
|
|
13
|
+
* viewport where there is none: a menu or a sheet is then capped by the window's height, not the host's. With no container at all no width
|
|
14
|
+
* rule applies and `cqw` is the viewport's too. The few fixed boxes (a dialog, a phone's menu) are placed against the window, unless something
|
|
15
|
+
* around them is their containing block: a transform or filter above the host, or the host itself in a browser from before mid-2024, where a
|
|
16
|
+
* container was also layout-contained (page.css: why the page's only container is the body).
|
|
17
|
+
*/
|
|
18
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
19
|
+
/* Private properties. A control is the token's height on a desk and never under 44px in a narrow box: a brand that sets --corn-control-height
|
|
20
|
+
(on :root, or on one scope) cannot take a phone's targets under 44px; one that sets it higher than 44px gets its height there too. A segmented
|
|
21
|
+
control (View, Before / Diff / After, the theme choice) is the control height outside; its buttons are that less the frame (the padding and the
|
|
22
|
+
two borders), or the full height in a narrow box, where each button is the 44px target and the frame is outside it. They are set on every element
|
|
23
|
+
rather than on :root, so they exist inside a shadow root too; a container query cannot style its own container, so the container's own rules
|
|
24
|
+
(the body's) reads none of them. A height that explorer.css wrote in `vh` reads `var(--hx-vh, 1cqh)`: page.css sets `--hx-vh` to the window's 1vh,
|
|
25
|
+
so cornfield's page is as it was on a phone whose toolbar comes and goes, and a piece elsewhere sizes from its own box. */
|
|
26
|
+
* { --hx-control-h: var(--corn-control-height); --hx-seg-inner: calc(var(--hx-control-h) - var(--corn-space-1) - 2 * var(--corn-border)); }
|
|
27
|
+
@container corn-box (max-width: 767px) {
|
|
28
|
+
* { --hx-control-h: max(44px, var(--corn-control-height)); --hx-seg-inner: var(--hx-control-h); }
|
|
29
|
+
}
|
|
30
|
+
/* theme.pixelated (docs/config.md#theme): small pixel-art images are sampled without smoothing, in the page as on the map (map-style.js).
|
|
31
|
+
page.css sets --hx-pixelated where the document says so; a custom property inherits into a shadow root, <html data-pixelated> does not. */
|
|
32
|
+
img { image-rendering: var(--hx-pixelated, auto); }
|
|
33
|
+
[hidden] { display: none !important; }
|
|
34
|
+
button { font: inherit; color: inherit; cursor: pointer; }
|
|
35
|
+
h1, h2, h3, p { margin: 0; }
|
|
36
|
+
.glass {
|
|
37
|
+
background: var(--corn-surface-1);
|
|
38
|
+
backdrop-filter: blur(var(--corn-blur));
|
|
39
|
+
-webkit-backdrop-filter: blur(var(--corn-blur));
|
|
40
|
+
border: var(--corn-border) solid var(--corn-line);
|
|
41
|
+
box-shadow: var(--corn-shadow);
|
|
42
|
+
}
|
|
43
|
+
.glass-header {
|
|
44
|
+
background: color-mix(in srgb, var(--corn-ground) 88%, transparent);
|
|
45
|
+
backdrop-filter: blur(var(--corn-blur));
|
|
46
|
+
-webkit-backdrop-filter: blur(var(--corn-blur));
|
|
47
|
+
border-bottom: var(--corn-border) solid var(--corn-line);
|
|
48
|
+
}
|
|
49
|
+
::-webkit-scrollbar { width: 5px; height: 5px; }
|
|
50
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
51
|
+
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--corn-text) 18%, transparent); border-radius: var(--corn-radius-pill); }
|
|
52
|
+
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--corn-text) 28%, transparent); }
|
|
53
|
+
.hx-faint { color: var(--corn-text-3); }
|
|
54
|
+
.hx-mono { font-family: var(--corn-mono); font-size: var(--corn-text-2xs); }
|
|
55
|
+
.hx-strong { color: var(--corn-text-2); }
|
|
56
|
+
.hx-bold { font-weight: 700; }
|
|
57
|
+
.hx-name { color: var(--corn-text-2); }
|
|
58
|
+
.hx-accent { color: var(--corn-accent-text); }
|
|
59
|
+
.hx-good { color: var(--corn-ok); }
|
|
60
|
+
.hx-warn { color: var(--corn-warn); }
|
|
61
|
+
.hx-rom { color: var(--corn-hue-fuchsia); }
|
|
62
|
+
.hx-link { color: var(--corn-info); text-decoration: underline; }
|
|
63
|
+
.hx-link-faint { color: var(--corn-text-3); font-family: var(--corn-mono); font-size: var(--corn-text-2xs); }
|
|
64
|
+
.hx-link-faint:hover { color: var(--corn-warn); }
|
|
65
|
+
.hx-code { color: var(--corn-warn); font-family: var(--corn-mono); font-size: var(--corn-text-2xs); }
|
|
66
|
+
.hx-chips { display: flex; flex-wrap: wrap; gap: var(--corn-space-1); padding-top: var(--corn-space-1); }
|
|
67
|
+
.hx-pt { padding-top: var(--corn-space-3); }
|
|
68
|
+
/* Freeform layout is a switch */
|
|
69
|
+
.hx-switch { position: relative; flex: none; width: 28px; height: 16px; border-radius: var(--corn-radius-pill); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-3); }
|
|
70
|
+
.hx-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--corn-text-3); transition: transform 0.15s; }
|
|
71
|
+
[aria-checked="true"] > .hx-switch { background: var(--corn-accent); border-color: var(--corn-accent); }
|
|
72
|
+
[aria-checked="true"] > .hx-switch::after { background: var(--corn-text-on-accent); transform: translateX(12px); }
|
|
73
|
+
@media (prefers-reduced-motion: reduce) {
|
|
74
|
+
.hx-switch::after { transition: none; }
|
|
75
|
+
}
|
|
76
|
+
.hx-btn {
|
|
77
|
+
display: inline-flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: var(--corn-space-2);
|
|
80
|
+
padding: var(--corn-space-1) var(--corn-space-3);
|
|
81
|
+
border-radius: var(--corn-radius-sm);
|
|
82
|
+
border: var(--corn-border) solid var(--corn-line);
|
|
83
|
+
background: var(--corn-surface-2);
|
|
84
|
+
color: var(--corn-text-2);
|
|
85
|
+
font-size: var(--corn-text-xs);
|
|
86
|
+
font-weight: 600;
|
|
87
|
+
transition: background 0.15s, color 0.15s, border-color 0.15s;
|
|
88
|
+
white-space: nowrap;
|
|
89
|
+
}
|
|
90
|
+
.hx-btn:hover { background: var(--corn-surface-3); color: var(--corn-text); }
|
|
91
|
+
.hx-btn:focus-visible, .hx-textbtn:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
92
|
+
.hx-btn--active, .hx-btn--active:hover { background: var(--corn-accent); border-color: var(--corn-accent-text); color: var(--corn-text-on-accent); box-shadow: var(--corn-shadow-sm); }
|
|
93
|
+
.hx-btn--quiet { font-weight: 500; color: var(--corn-text-3); }
|
|
94
|
+
.hx-btn--icon { width: 28px; height: 28px; padding: 0; justify-content: center; font-size: var(--corn-text-base); }
|
|
95
|
+
.hx-btn--rom { width: 100%; justify-content: center; margin-top: var(--corn-space-1); padding: var(--corn-space-2); background: color-mix(in srgb, var(--corn-hue-fuchsia) 20%, transparent); border-color: color-mix(in srgb, var(--corn-hue-fuchsia) 40%, transparent); color: color-mix(in srgb, var(--corn-hue-fuchsia) 60%, var(--corn-text)); font-weight: 700; }
|
|
96
|
+
.hx-btn--rom:hover { background: color-mix(in srgb, var(--corn-hue-fuchsia) 30%, transparent); }
|
|
97
|
+
.hx-input {
|
|
98
|
+
width: 128px;
|
|
99
|
+
padding: var(--corn-space-1) var(--corn-space-3) var(--corn-space-1) var(--corn-space-6);
|
|
100
|
+
border-radius: var(--corn-radius-sm);
|
|
101
|
+
border: var(--corn-border) solid var(--corn-line);
|
|
102
|
+
background: color-mix(in srgb, var(--corn-ground) 80%, transparent);
|
|
103
|
+
color: var(--corn-text);
|
|
104
|
+
font: inherit;
|
|
105
|
+
font-size: var(--corn-text-sm);
|
|
106
|
+
outline: none;
|
|
107
|
+
transition: width 0.2s, border-color 0.2s;
|
|
108
|
+
user-select: text;
|
|
109
|
+
}
|
|
110
|
+
.hx-input:focus { width: 208px; border-color: var(--corn-focus); }
|
|
111
|
+
.hx-input::placeholder { color: var(--corn-text-3); }
|
|
112
|
+
.hx-input--wide, .hx-input--wide:focus { width: 100%; flex: 1; }
|
|
113
|
+
.hx-menu-wrap { position: relative; flex: none; }
|
|
114
|
+
.hx-menu {
|
|
115
|
+
position: absolute;
|
|
116
|
+
top: 100%;
|
|
117
|
+
left: 0;
|
|
118
|
+
margin-top: var(--corn-space-3);
|
|
119
|
+
width: 288px;
|
|
120
|
+
max-width: calc(100cqw - 24px);
|
|
121
|
+
max-height: calc(100cqh - 80px);
|
|
122
|
+
overflow-y: auto;
|
|
123
|
+
padding: var(--corn-space-4);
|
|
124
|
+
border-radius: var(--corn-radius-lg);
|
|
125
|
+
font-size: var(--corn-text-xs);
|
|
126
|
+
z-index: 50;
|
|
127
|
+
user-select: none;
|
|
128
|
+
}
|
|
129
|
+
.hx-textbtn { padding: calc(var(--corn-space-1) / 2) var(--corn-space-1); border: 0; border-radius: var(--corn-radius-xs); background: none; color: var(--corn-text-3); font-size: var(--corn-text-2xs); font-weight: 600; }
|
|
130
|
+
.hx-textbtn:hover { background: var(--corn-line-soft); color: var(--corn-text-2); }
|
|
131
|
+
.hx-textbtn--accent { color: var(--corn-accent-text); }
|
|
132
|
+
.hx-close { width: var(--hx-control-h); height: var(--hx-control-h); flex: none; border: 0; border-radius: var(--corn-radius-sm); background: var(--corn-surface-2); color: var(--corn-text-3); font-weight: 700; font-size: var(--corn-text-base); }
|
|
133
|
+
.hx-close:hover { color: var(--corn-text); }
|
|
134
|
+
/* The marks' colours, shared with the picture: the diff tokens, whose light values are theme-model.js `lightColor` of the dark ones */
|
|
135
|
+
.hx-mark-dot { display: inline-block; width: 12px; height: 12px; flex: none; margin-right: var(--corn-space-2); border-radius: 50%; border: var(--corn-border-strong) solid var(--corn-changed); vertical-align: -2px; }
|
|
136
|
+
.hx-mark-dot--added { border-color: var(--corn-added); border-style: dashed; }
|
|
137
|
+
.hx-mark-dot--changed { border-color: var(--corn-changed); }
|
|
138
|
+
.hx-mark-dot--removed { border-color: var(--corn-removed); background: color-mix(in srgb, var(--corn-removed) 25%, transparent); }
|
|
139
|
+
.hx-mark-dot--edit { border-color: var(--corn-edit); border-style: dotted; } /* a dotted ring: not the changed mark's solid one, with or without colour */
|
|
140
|
+
/* ---- a panel glyph (MAP-01) ----------------------------------------------------------------------
|
|
141
|
+
A panel glyph's colour comes from script (the flow or kind it stands for, --glyph): mixed with the text colour by
|
|
142
|
+
--corn-glyph-mix (all of it on dark, 45% on light), so a pale yellow arrow still reads on the light ground. */
|
|
143
|
+
.hx-glyph { color: var(--glyph); color: color-mix(in srgb, var(--glyph) var(--corn-glyph-mix), var(--corn-text)); }
|
|
144
|
+
/* ---- keyboard and screen reader (MAP-02, keyboard.js) ------------------------------------------
|
|
145
|
+
Text only a screen reader reads (the heading, the map's keys, the announcer); a focus ring on everything that
|
|
146
|
+
takes the focus, the map included (the more specific rings above still win where they are set). */
|
|
147
|
+
.hx-sr-only { position: absolute !important; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
|
|
148
|
+
:where(button, a[href], summary, select, textarea, [tabindex]):focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
149
|
+
@media (prefers-reduced-motion: reduce) {
|
|
150
|
+
.hx-input, .hx-btn, .hx-menu { transition: none; animation: none; }
|
|
151
|
+
}
|
|
152
|
+
.hx-btn[aria-disabled="true"] { opacity: 0.6; cursor: progress; } /* a review being posted: the button keeps the focus */
|
|
153
|
+
@container corn-box (max-width: 767px) {
|
|
154
|
+
/* A thumb target: a narrow box or a coarse pointer (test/explorer/target-size.test.js holds the list over every file) */
|
|
155
|
+
.hx-textbtn { min-height: 44px; min-width: 44px; }
|
|
156
|
+
}
|
|
157
|
+
@media (pointer: coarse) {
|
|
158
|
+
.hx-textbtn { min-height: 44px; min-width: 44px; }
|
|
159
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* changes.css: the change list
|
|
3
|
+
* The review column (spec 0006, review-column.js): the changes, the personas and their scenarios; the scenario player, one bar under the map
|
|
4
|
+
* (spec 0006 D6) and its checked-scenario marks. Read by corn-changes (D4).
|
|
5
|
+
* No rule here asks what the document says (`:root`, `html`, `body`, `[data-theme]`), sizes from the window (`vw`, `vh`) or is `position: fixed` unless it says why;
|
|
6
|
+
* a width rule is a container query on `corn-box` (page.css), a height rule on `corn-page`. base.css loads first.
|
|
7
|
+
*/
|
|
8
|
+
.hx-change-row:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
9
|
+
.hx-change-row { display: flex; align-items: center; gap: var(--corn-space-3); width: 100%; padding: var(--corn-space-1) var(--corn-space-2); border: 0; border-radius: var(--corn-radius-sm); background: none; text-align: left; font-size: var(--corn-text-xs); }
|
|
10
|
+
.hx-change-row:hover { background: var(--corn-line-soft); }
|
|
11
|
+
.hx-change-what { width: 56px; flex: none; color: var(--corn-text-3); }
|
|
12
|
+
.hx-change-row .hx-name { min-width: 0; overflow-wrap: anywhere; } /* a long label wraps in its row: the list never scrolls sideways */
|
|
13
|
+
.hx-change-row .hx-mark-dot { margin-right: 0; }
|
|
14
|
+
.hx-player { position: absolute; left: calc(var(--hx-col-w, 0px) + 24px); right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-2) var(--corn-space-4); padding: var(--corn-space-3) var(--corn-space-4); border-radius: var(--corn-radius-lg); z-index: 25; overflow: hidden; }
|
|
15
|
+
.hx-player .hx-close { width: var(--hx-control-h); height: var(--hx-control-h); font-size: var(--corn-text-sm); }
|
|
16
|
+
.hx-player-speed { flex: none; height: var(--hx-control-h); padding: 0 var(--corn-space-2); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); color: var(--corn-text); font: inherit; font-size: var(--corn-text-sm); cursor: pointer; }
|
|
17
|
+
.hx-player-speed:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: calc(var(--corn-focus-offset) / 2); }
|
|
18
|
+
.hx-player-text { margin: 0; flex: 1 1 18em; min-width: 0; font-size: var(--corn-text-base); line-height: 1.4; color: var(--corn-text); user-select: text; overflow-wrap: anywhere; }
|
|
19
|
+
.hx-player-who { color: var(--corn-text-2); font-weight: 600; }
|
|
20
|
+
.hx-player-text .hx-player-verdict { margin-left: var(--corn-space-2); }
|
|
21
|
+
.hx-player-count { color: var(--corn-accent-text); font-weight: 600; white-space: nowrap; }
|
|
22
|
+
.hx-player-controls { display: flex; flex: none; gap: var(--corn-space-3); }
|
|
23
|
+
.hx-player-side { display: flex; flex: none; align-items: center; gap: var(--corn-space-3); margin-left: auto; }
|
|
24
|
+
.hx-player-controls .hx-btn { justify-content: center; white-space: nowrap; }
|
|
25
|
+
.hx-player-controls .hx-btn[hidden] { display: none; }
|
|
26
|
+
/* The glyphs are drawn, not said: the names are the words (an empty alternative after the slash keeps a screen reader from reading them) */
|
|
27
|
+
.hx-player-prev::before { content: "◀" / ""; margin-right: var(--corn-space-2); }
|
|
28
|
+
.hx-player-next::after { content: "▶" / ""; margin-left: var(--corn-space-2); }
|
|
29
|
+
/* the pause mark is drawn (two bars), not a character: not every font has one */
|
|
30
|
+
.hx-player-toggle[data-state="playing"]::before { content: "" / ""; display: inline-block; box-sizing: border-box; width: 1em; height: 1em; margin-right: var(--corn-space-2); border-left: calc(var(--corn-border-strong) * 1.5) solid currentColor; border-right: calc(var(--corn-border-strong) * 1.5) solid currentColor; }
|
|
31
|
+
.hx-player-toggle[data-state="paused"]::before { content: "▶" / ""; margin-right: var(--corn-space-2); }
|
|
32
|
+
.hx-player-toggle[data-state="done"]::before { content: "↻" / ""; margin-right: var(--corn-space-2); }
|
|
33
|
+
.hx-player-controls .hx-btn:disabled { opacity: 0.4; cursor: default; }
|
|
34
|
+
.hx-player-track { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--corn-line-soft); }
|
|
35
|
+
.hx-player-fill { display: block; height: 100%; width: 0; background: var(--corn-accent-text); }
|
|
36
|
+
@container corn-box (max-width: 767px) {
|
|
37
|
+
/* The scenario player: one row (Previous, Pause, Next, the counter and Close) in the peek; the text, the speed and the checks when it is open */
|
|
38
|
+
.hx-player { position: relative; left: auto; right: auto; bottom: auto; flex-wrap: wrap; max-height: 50cqh; overflow: hidden; gap: 0 var(--corn-space-3); padding: 0 var(--corn-space-4) var(--corn-space-3); --sheet-pb: var(--corn-space-3); }
|
|
39
|
+
}
|
|
40
|
+
/* ── Checked scenarios (PHY-10, check.js): the step's state on the player bar and the phone's sheet ──
|
|
41
|
+
The pill sits in the head, so the phone's peek shows it; the line and the As row are the expanded part. */
|
|
42
|
+
.hx-player-verdict { flex: none; padding: calc(var(--corn-space-1) / 2) var(--corn-space-3); border-radius: var(--corn-radius-pill); font-size: var(--corn-text-xs); font-weight: 600; white-space: nowrap; border: var(--corn-border) solid var(--corn-line); color: var(--corn-text-2); background: color-mix(in srgb, var(--corn-text-3) 12%, transparent); }
|
|
43
|
+
.hx-player-check { margin: 0; padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius-sm); font-size: var(--corn-text-md); line-height: 1.4; color: var(--corn-text-2); background: color-mix(in srgb, var(--corn-text-3) 10%, transparent); border-left: var(--corn-border-strong) solid color-mix(in srgb, var(--corn-text-3) 50%, transparent); user-select: text; }
|
|
44
|
+
.hx-player-check-detail { display: block; font-size: var(--corn-text-xs); color: var(--corn-text-3); }
|
|
45
|
+
.hx-player-verdict[data-tone="allowed"], .hx-player-check[data-tone="allowed"] { color: var(--corn-ok); background: var(--corn-ok-soft); border-color: color-mix(in srgb, var(--corn-ok) 60%, transparent); }
|
|
46
|
+
.hx-player-verdict[data-tone="refused"], .hx-player-check[data-tone="refused"] { color: var(--corn-bad); background: color-mix(in srgb, var(--corn-removed) 16%, transparent); border-color: color-mix(in srgb, var(--corn-removed) 70%, transparent); }
|
|
47
|
+
.hx-player-verdict[data-tone="mismatch"], .hx-player-check[data-tone="mismatch"] { color: var(--corn-warn); background: color-mix(in srgb, var(--corn-changed) 16%, transparent); border-color: color-mix(in srgb, var(--corn-changed) 70%, transparent); }
|
|
48
|
+
.hx-player-verdict[data-tone="pending"] { opacity: 0.75; }
|
|
49
|
+
.hx-player-as { display: flex; align-items: center; gap: var(--corn-space-3); flex-wrap: wrap; font-size: var(--corn-text-sm); color: var(--corn-text-2); }
|
|
50
|
+
.hx-player-as-label { display: inline-flex; align-items: center; gap: var(--corn-space-2); }
|
|
51
|
+
.hx-player-as .hx-btn { padding: var(--corn-space-1) var(--corn-space-3); font-size: var(--corn-text-sm); }
|
|
52
|
+
.hx-player-as .hx-btn:disabled { opacity: 0.4; cursor: default; }
|
|
53
|
+
.hx-player-as-sum { margin-left: auto; font-size: var(--corn-text-xs); }
|
|
54
|
+
.hx-player-as[hidden], .hx-player-verdict[hidden], .hx-player-check[hidden] { display: none; }
|
|
55
|
+
.hx-rc-scroll { scroll-padding-block: calc(var(--corn-focus-width) + var(--corn-focus-offset) + var(--corn-space-1)); }
|
|
56
|
+
.hx-player-count { font-family: var(--corn-font-num); font-variant-numeric: tabular-nums; }
|
|
57
|
+
@container corn-box (max-width: 767px) {
|
|
58
|
+
.hx-player-controls .hx-btn { min-height: 44px; min-width: 44px; padding: 0 var(--corn-space-3); white-space: nowrap; }
|
|
59
|
+
/* On a phone the controls are glyphs, the names are said: ◀ ⏸ ▶ in a 44px row */
|
|
60
|
+
.hx-player-prev .hx-player-label, .hx-player-next .hx-player-label, .hx-player-toggle .hx-player-label { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
|
|
61
|
+
.hx-player-prev::before, .hx-player-next::after, .hx-player-toggle::before { margin: 0; }
|
|
62
|
+
.hx-player-next-scenario { font-size: var(--corn-text-sm); }
|
|
63
|
+
.hx-player-controls { gap: var(--corn-space-2); }
|
|
64
|
+
}
|
|
65
|
+
/* ---------------------------------------------------------------------------
|
|
66
|
+
Target sizes (0.34 review, F57): a thumb target is 44x44 (hit area, the drawn size may be smaller), and a change row is
|
|
67
|
+
28px at a desk. Phone width or a coarse pointer. test/explorer/target-size.test.js holds this list.
|
|
68
|
+
--------------------------------------------------------------------------- */
|
|
69
|
+
.hx-change-row { min-height: 28px; }
|
|
70
|
+
@container corn-box (max-width: 767px) {
|
|
71
|
+
.hx-change-row, .hx-sc-row, .hx-step, .hx-rc-tab, .hx-player-speed, .hx-player .hx-close { min-height: 44px; }
|
|
72
|
+
.hx-player-speed, .hx-player .hx-close { min-width: 44px; }
|
|
73
|
+
}
|
|
74
|
+
@media (pointer: coarse) {
|
|
75
|
+
.hx-change-row, .hx-sc-row, .hx-step, .hx-rc-tab, .hx-player-speed, .hx-player .hx-close { min-height: 44px; }
|
|
76
|
+
.hx-player-speed, .hx-player .hx-close { min-width: 44px; }
|
|
77
|
+
}
|
|
78
|
+
/* ==== the review column (spec 0006, review-column.js): the changes, and the personas with the scenarios that apply to them ==============
|
|
79
|
+
From 768px it is docked on the left of the map under the proposal bar (the free map is what it leaves: sheets.js visibleMapRect);
|
|
80
|
+
on a phone it is the expanded proposal sheet's body, a two-part switch at its top, its foot (the decision) always in view. */
|
|
81
|
+
.hx-review-column { position: absolute; left: 12px; bottom: 12px; top: var(--hx-column-top, 150px); width: 400px; z-index: 14; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--corn-radius-lg); font-size: var(--corn-text-sm); user-select: text; }
|
|
82
|
+
.hx-review-column[hidden] { display: none; }
|
|
83
|
+
@container corn-box (max-width: 1023px) {
|
|
84
|
+
.hx-review-column { width: 320px; }
|
|
85
|
+
}
|
|
86
|
+
@container corn-box (min-width: 1280px) {
|
|
87
|
+
/* The Work panel: from 1280px the column moves over to make room for it; narrower, the panel lies over the column while it is open (moving it would leave the map a sliver) */
|
|
88
|
+
.hx-stage:has(.forge-open) .hx-review-column { left: calc(var(--hx-forge-w) + 12px); }
|
|
89
|
+
}
|
|
90
|
+
@container corn-box (min-width: 768px) and (max-width: 1023px) {
|
|
91
|
+
/* The node panel (480px) and the 320px column do not both fit under 1024px: the column gives up its width, so the panel covers none of it */
|
|
92
|
+
.hx-stage:has(.drawer-open) .hx-review-column { width: min(320px, calc(100% - 504px)); }
|
|
93
|
+
}
|
|
94
|
+
.hx-rc-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--corn-space-2); overflow: hidden; padding: var(--corn-space-3) var(--corn-space-4); }
|
|
95
|
+
.hx-rc-lists { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--corn-space-4); }
|
|
96
|
+
/* Both lists are on screen at once: the changes take what they need up to 40%, the scenarios the rest, each scrolling on its own */
|
|
97
|
+
.hx-rc-section { display: flex; flex-direction: column; min-height: 0; }
|
|
98
|
+
/* review-column.js measures the scenarios and sets --hx-changes-max: 40% while the scenarios need the rest, more when they are few */
|
|
99
|
+
#rc-changes { flex: 0 1 auto; max-height: var(--hx-changes-max, 40%); }
|
|
100
|
+
#rc-scenarios { flex: 1 1 0; min-height: min(12em, var(--hx-scenarios-need, 12em)); }
|
|
101
|
+
.hx-change-list, .hx-rc-sbody { min-height: 0; overflow-y: auto; scroll-padding-block: var(--corn-space-2); }
|
|
102
|
+
.hx-rc-h { flex: none; }
|
|
103
|
+
.hx-rc-tabs { display: flex; gap: var(--corn-space-2); }
|
|
104
|
+
.hx-rc-tabs[hidden] { display: none; }
|
|
105
|
+
.hx-rc-tab { flex: 1; min-height: var(--hx-control-h); padding: 0 var(--corn-space-3); border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text-3); font: inherit; font-weight: 600; cursor: pointer; }
|
|
106
|
+
.hx-rc-tab[aria-selected="true"] { background: var(--corn-accent); border-color: var(--corn-accent); color: var(--corn-text-on-accent); }
|
|
107
|
+
.hx-rc-tab:focus-visible, .hx-sc-row:focus-visible, .hx-step:focus-visible, .hx-rc-h:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
108
|
+
.hx-rc-section[hidden] { display: none; }
|
|
109
|
+
.hx-rc-h { margin: 0 0 var(--corn-space-2); font-size: var(--corn-text-sm); font-weight: 700; color: var(--corn-text); }
|
|
110
|
+
.hx-rc-h [data-corn="count"] { color: var(--corn-text-3); font-variant-numeric: tabular-nums; }
|
|
111
|
+
.hx-rc-empty, .hx-rc-note, .hx-rc-coverage { margin: var(--corn-space-2) 0 0; line-height: 1.5; }
|
|
112
|
+
.hx-rc-coverage { color: var(--corn-text-2); }
|
|
113
|
+
.hx-change-list, .hx-sc-list, .hx-steps { margin: 0; padding: 0; list-style: none; }
|
|
114
|
+
.hx-change-list { display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
115
|
+
.hx-persona { margin-top: var(--corn-space-4); }
|
|
116
|
+
.hx-persona:first-of-type { margin-top: 0; }
|
|
117
|
+
.hx-persona-name { margin: 0 0 var(--corn-space-1); font-size: var(--corn-text-xs); font-weight: 600; letter-spacing: 0.02em; color: var(--corn-text-3); overflow-wrap: anywhere; } /* a persona's name in its own words (0.39.0), not a label: sentence case */
|
|
118
|
+
.hx-sc-list { display: flex; flex-direction: column; gap: var(--corn-space-1); }
|
|
119
|
+
.hx-sc-row { display: flex; align-items: flex-start; gap: var(--corn-space-3); width: 100%; padding: var(--corn-space-2) var(--corn-space-2); border: var(--corn-border) solid var(--corn-line-soft); border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text); font: inherit; text-align: left; cursor: pointer; }
|
|
120
|
+
.hx-sc-row:hover { background: color-mix(in srgb, var(--corn-accent-hover) 18%, transparent); }
|
|
121
|
+
.hx-sc-caret { flex: none; width: 1em; color: var(--corn-text-3); }
|
|
122
|
+
.hx-sc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
123
|
+
.hx-sc-title { font-weight: 600; overflow-wrap: anywhere; }
|
|
124
|
+
.hx-sc-meta { font-size: var(--corn-text-xs); color: var(--corn-text-3); }
|
|
125
|
+
.hx-sc-seen { flex: none; font-size: var(--corn-text-xs); color: var(--corn-added-text); white-space: nowrap; }
|
|
126
|
+
.hx-steps { margin: var(--corn-space-1) 0 var(--corn-space-2) var(--corn-space-4); display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
127
|
+
.hx-steps[hidden] { display: none; }
|
|
128
|
+
.hx-step { display: flex; align-items: flex-start; gap: var(--corn-space-3); width: 100%; padding: var(--corn-space-2) var(--corn-space-2); border: 0; border-left: var(--corn-border-strong) solid transparent; border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text); font: inherit; font-size: var(--corn-text-xs); text-align: left; cursor: pointer; }
|
|
129
|
+
.hx-step:hover { background: var(--corn-line-soft); }
|
|
130
|
+
.hx-step[aria-current="step"] { border-left-color: var(--corn-accent-text); background: color-mix(in srgb, var(--corn-accent-hover) 22%, transparent); }
|
|
131
|
+
.hx-step-n { flex: none; min-width: 1.4em; color: var(--corn-accent-text); font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
132
|
+
.hx-step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
|
|
133
|
+
.hx-step-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--corn-space-3); }
|
|
134
|
+
.hx-step-who { color: var(--corn-text-2); font-weight: 600; }
|
|
135
|
+
.hx-step-where { font-weight: 600; overflow-wrap: anywhere; }
|
|
136
|
+
.hx-step-mark { display: inline-flex; align-items: center; gap: var(--corn-space-1); color: var(--corn-text-3); }
|
|
137
|
+
.hx-step-mark .hx-mark-dot { margin: 0; }
|
|
138
|
+
.hx-step-text { color: var(--corn-text-2); line-height: 1.4; overflow-wrap: anywhere; }
|
|
139
|
+
.hx-step-off { color: var(--corn-text-3); font-style: italic; }
|
|
140
|
+
.hx-step-verdict { align-self: flex-start; white-space: normal; text-align: right; max-width: 40%; overflow-wrap: anywhere; }
|
|
141
|
+
@container corn-box (max-width: 767px) {
|
|
142
|
+
/* The expanded proposal sheet: the column is its body, with no box of its own */
|
|
143
|
+
.hx-review-column { position: static; width: auto; max-height: none; overflow: visible; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
|
|
144
|
+
.hx-rc-scroll, .hx-rc-lists, .hx-rc-section, .hx-change-list, .hx-rc-sbody { display: block; overflow: visible; max-height: none; min-height: 0; }
|
|
145
|
+
.hx-rc-scroll { padding: var(--corn-space-2) 0; }
|
|
146
|
+
.hx-rc-section[hidden] { display: none; }
|
|
147
|
+
/* the sheet scrolls, not a section: each section is as tall as its list (the desktop's 40% cap and 12em floor would let the rows run under the decision) */
|
|
148
|
+
#rc-changes, #rc-scenarios { flex: none; max-height: none; min-height: 0; }
|
|
149
|
+
.hx-rc-lists { display: flex; flex-direction: column; }
|
|
150
|
+
.hx-change-list { display: flex; }
|
|
151
|
+
.hx-step { min-height: 44px; }
|
|
152
|
+
.hx-sc-row, .hx-rc-tab { min-height: 44px; }
|
|
153
|
+
.hx-step-verdict { max-width: 45%; }
|
|
154
|
+
}
|
|
155
|
+
@container corn-box (min-width: 768px) {
|
|
156
|
+
.hx-stage:has(.drawer-open) .hx-player { right: 504px; }
|
|
157
|
+
}
|
|
158
|
+
.hx-player-as, .hx-player-check { flex: 1 0 100%; }
|
|
159
|
+
.hx-player-speed[data-corn="control"] { color: var(--corn-text); }
|
|
160
|
+
.hx-rc-sub { margin: var(--corn-space-2) 0 var(--corn-space-1); font-size: var(--corn-text-sm); font-weight: 600; color: var(--corn-text); }
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* decision.css: the decision
|
|
3
|
+
* Approve and Send back, the line above Approve, the note that opens on Send back, the hold with Undo, a landing that waits (spec 0007).
|
|
4
|
+
* Read by corn-decision (D4).
|
|
5
|
+
* No rule here asks what the document says (`:root`, `html`, `body`, `[data-theme]`), sizes from the window (`vw`, `vh`) or is `position: fixed` unless it says why;
|
|
6
|
+
* a width rule is a container query on `corn-box` (page.css), a height rule on `corn-page`. base.css loads first.
|
|
7
|
+
*/
|
|
8
|
+
/* The review (review.js, TOPO-12): the status line and the note that opens on Send back. It is in the toolbar, just before Send back and
|
|
9
|
+
Approve (the note's Tab goes on to them); from 768px it takes a row of its own under the toolbar, on a phone it sits under the counts */
|
|
10
|
+
.hx-review { flex: 1 0 100%; order: 1; display: flex; flex-direction: column; gap: var(--corn-space-2); }
|
|
11
|
+
.hx-review[hidden], .hx-review:not(:has(> :not([hidden]))) { display: none; }
|
|
12
|
+
.hx-review-form { display: flex; flex-direction: column; gap: var(--corn-space-2); }
|
|
13
|
+
.hx-review-form[hidden] { display: none; }
|
|
14
|
+
.hx-review-label { color: var(--corn-text-3); font-size: var(--corn-text-xs); }
|
|
15
|
+
.hx-review-note { width: 100%; min-height: 44px; resize: vertical; padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); color: var(--corn-text); font: inherit; font-size: var(--corn-text-sm); line-height: 1.4; user-select: text; }
|
|
16
|
+
.hx-review-note:focus { outline: var(--corn-focus-width) solid var(--corn-added-text); outline-offset: calc(var(--corn-focus-offset) / 2); }
|
|
17
|
+
.hx-review-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-2) var(--corn-space-3); }
|
|
18
|
+
.hx-btn--approve { border-color: color-mix(in srgb, var(--corn-added) 50%, transparent); color: var(--corn-added-text); }
|
|
19
|
+
.hx-btn--approve:hover { background: color-mix(in srgb, var(--corn-added) 20%, transparent); color: var(--corn-added-text); }
|
|
20
|
+
.hx-review-status { margin: 0; color: var(--corn-added-text); font-variant-numeric: tabular-nums; }
|
|
21
|
+
.hx-review-status[hidden], .hx-review-msg[hidden], .hx-review-line[hidden] { display: none; }
|
|
22
|
+
.hx-review-msg { margin: 0; padding: var(--corn-space-1) var(--corn-space-3); border-radius: var(--corn-radius-sm); background: color-mix(in srgb, var(--corn-removed) 12%, transparent); border: var(--corn-border) solid color-mix(in srgb, var(--corn-removed) 35%, transparent); color: var(--corn-bad); line-height: 1.4; }
|
|
23
|
+
.hx-review-line { margin: 0; color: var(--corn-text-2); line-height: 1.4; }
|
|
24
|
+
.hx-proposal-actions { display: flex; align-items: center; gap: var(--corn-space-3); }
|
|
25
|
+
.hx-proposal-actions { margin-left: auto; }
|
|
26
|
+
.hx-proposal-actions .hx-btn { height: var(--hx-control-h); justify-content: center; padding: 0 var(--corn-space-5); font-size: var(--corn-text-sm); font-weight: 500; }
|
|
27
|
+
.hx-proposal-actions .hx-btn--approve, .hx-proposal-actions .hx-btn--approve:hover { background: var(--corn-accent); border-color: var(--corn-accent); color: var(--corn-text-on-accent); font-weight: 600; }
|
|
28
|
+
.hx-proposal-actions .hx-btn:disabled { opacity: 0.4; cursor: default; }
|
|
29
|
+
@container corn-box (max-width: 767px) {
|
|
30
|
+
.hx-review { grid-column: 1 / -1; order: 3; }
|
|
31
|
+
.hx-proposal-actions { grid-column: 1 / -1; order: 4; display: grid; grid-template-columns: 1fr 1fr; margin-left: 0; gap: var(--corn-space-3); }
|
|
32
|
+
.hx-proposal-actions .hx-btn { height: auto; min-height: 44px; padding: var(--corn-space-2) var(--corn-space-3); white-space: normal; text-align: center; font-size: var(--corn-text-md); }
|
|
33
|
+
.hx-review .hx-btn { min-height: 44px; }
|
|
34
|
+
}
|
|
35
|
+
.hx-forge-cta .hx-btn--approve { flex: 1; }
|
|
36
|
+
@container corn-box (max-width: 767px) {
|
|
37
|
+
.hx-proposal-bar:has(.hx-review-form:not([hidden])) .hx-proposal-actions { order: 4; grid-template-columns: 1fr; }
|
|
38
|
+
.hx-proposal-bar:has(.hx-review-form:not([hidden])) .hx-proposal-actions .hx-btn--approve { display: none; }
|
|
39
|
+
}
|
|
40
|
+
.hx-rc-foot { flex: none; display: flex; flex-direction: column; gap: var(--corn-space-2); padding: var(--corn-space-3) var(--corn-space-4); border-top: var(--corn-border) solid var(--corn-line); }
|
|
41
|
+
.hx-rc-foot .hx-review { flex: none; order: 0; }
|
|
42
|
+
.hx-rc-foot .hx-proposal-actions { margin-left: auto; }
|
|
43
|
+
@container corn-box (max-width: 767px) {
|
|
44
|
+
.hx-rc-foot { padding: var(--corn-space-3) 0 0; } /* after both lists, in the sheet's own flow: nothing overlaps the rows above it */
|
|
45
|
+
.hx-rc-foot .hx-proposal-actions { margin-left: 0; width: 100%; }
|
|
46
|
+
}
|
|
47
|
+
.hx-decision-line { margin: 0; color: var(--corn-text-2); font-size: var(--corn-text-sm); line-height: 1.5; }
|
|
48
|
+
.hx-decision-line[hidden], .hx-review-ask[hidden], .hx-hold[hidden], .hx-review-landing[hidden], .hx-sent-edits[hidden] { display: none; }
|
|
49
|
+
.hx-review-ask { margin: 0; padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid color-mix(in srgb, var(--corn-warn) 55%, transparent); background: color-mix(in srgb, var(--corn-warn) 14%, transparent); color: var(--corn-text); line-height: 1.4; }
|
|
50
|
+
.hx-review-landing { display: flex; align-items: center; justify-content: space-between; gap: var(--corn-space-3); padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); color: var(--corn-text-2); }
|
|
51
|
+
.hx-review-landing p { margin: 0; line-height: 1.4; }
|
|
52
|
+
.hx-sent-edits { color: var(--corn-text-2); }
|
|
53
|
+
.hx-sent-edits summary { cursor: pointer; min-height: 24px; }
|
|
54
|
+
.hx-hold { height: 3px; border-radius: var(--corn-radius-sm); background: color-mix(in srgb, var(--corn-accent) 22%, transparent); overflow: hidden; }
|
|
55
|
+
.hx-hold-fill { display: block; height: 100%; width: 100%; background: var(--corn-accent); transform-origin: left center; animation-name: hx-hold-drain; animation-timing-function: linear; animation-fill-mode: forwards; }
|
|
56
|
+
@keyframes hx-hold-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
|
|
57
|
+
.hx-proposal-actions .hx-btn[aria-disabled="true"] { opacity: 0.55; cursor: default; }
|
|
58
|
+
.hx-proposal-actions .hx-btn[data-holding="true"] { opacity: 1; font-variant-numeric: tabular-nums; }
|
|
59
|
+
.hx-review-undo[hidden] { display: none; }
|
|
60
|
+
@container corn-box (max-width: 767px) {
|
|
61
|
+
.hx-review-undo { min-height: 44px; min-width: 44px; order: 1; grid-column: 1 / -1; } /* a row of its own under Send back and Approve: never where the finger that pressed is */
|
|
62
|
+
.hx-review-landing .hx-btn { min-height: 44px; }
|
|
63
|
+
.hx-proposal-bar:has(.hx-review-form:not([hidden])) .hx-decision-line { display: none; } /* the note's sheet shows the send back line under the note, not Approve's */
|
|
64
|
+
}
|
|
65
|
+
@media (prefers-reduced-motion: reduce) {
|
|
66
|
+
.hx-hold { display: none; }
|
|
67
|
+
.hx-hold-fill { animation: none; }
|
|
68
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* dialogs.css: dialogs
|
|
3
|
+
* The review tokens dialog (review-tokens.js), the confirm dialog of the Work panel, and a proposal's mockup window (mockups.js). They
|
|
4
|
+
* become native <dialog> elements in a later step (D8); until then three of them are `position: fixed` over the window, each marked below.
|
|
5
|
+
* No rule here asks what the document says (`:root`, `html`, `body`, `[data-theme]`), sizes from the window (`vw`, `vh`) or is `position: fixed` unless it says why;
|
|
6
|
+
* a width rule is a container query on `corn-box` (page.css), a height rule on `corn-page`. base.css loads first.
|
|
7
|
+
*/
|
|
8
|
+
.hx-confirm-title, .hx-mockup-title { font-family: var(--corn-font-display); }
|
|
9
|
+
/* fixed (spec 0011 D8): a modal over the whole window, centred on it. It cannot be placed in a piece's box without changing the page; it becomes a native <dialog>, in the top layer, in a later step */
|
|
10
|
+
.hx-mockup-dialog { position: fixed; z-index: 60; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: var(--corn-space-3); width: min(960px, calc(100cqw - 32px)); max-height: calc(100 * var(--hx-vh, 1cqh) - 32px); padding: var(--corn-space-4) var(--corn-space-4) var(--corn-space-4); border-radius: var(--corn-radius-lg); border: var(--corn-border) solid var(--corn-line); background: var(--corn-ground); color: var(--corn-text); box-shadow: var(--corn-shadow), 0 0 0 100cqmax var(--corn-scrim); }
|
|
11
|
+
.hx-mockup-dialog:focus { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
12
|
+
.hx-mockup-head { display: flex; align-items: center; justify-content: space-between; gap: var(--corn-space-4); }
|
|
13
|
+
.hx-mockup-title { margin: 0; font-size: var(--corn-text-base); font-weight: 600; color: var(--corn-text); }
|
|
14
|
+
.hx-mockup-stage { min-height: 0; overflow: auto; display: flex; justify-content: center; border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-mockup-ground); }
|
|
15
|
+
.hx-mockup-img { display: block; max-width: 100%; height: auto; object-fit: contain; }
|
|
16
|
+
.hx-mockup-frame { display: block; width: 100%; height: min(560px, calc(100 * var(--hx-vh, 1cqh) - 140px)); border: 0; background: var(--corn-mockup-ground); }
|
|
17
|
+
/* fixed (spec 0011 D8): the scrim of a modal over the whole window; a native <dialog> and its ::backdrop take its place in a later step */
|
|
18
|
+
.hx-confirm-scrim { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: var(--corn-space-5); background: var(--corn-scrim); }
|
|
19
|
+
.hx-confirm-scrim[hidden] { display: none; }
|
|
20
|
+
.hx-confirm { display: flex; flex-direction: column; gap: var(--corn-space-3); width: min(440px, 100%); max-height: 100%; overflow-y: auto; padding: var(--corn-space-5); border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-lg); box-shadow: var(--corn-shadow-lg); font-size: var(--corn-text-sm); user-select: text; }
|
|
21
|
+
.hx-confirm-title { margin: 0; font-size: var(--corn-text-lg); font-weight: 700; color: var(--corn-text); }
|
|
22
|
+
.hx-confirm-facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--corn-space-1) var(--corn-space-4); margin: 0; }
|
|
23
|
+
.hx-confirm-facts dt { color: var(--corn-text-3); }
|
|
24
|
+
.hx-confirm-facts dd { margin: 0; overflow-wrap: anywhere; color: var(--corn-text); }
|
|
25
|
+
.hx-confirm-checks { display: flex; flex-direction: column; gap: var(--corn-space-1); margin: 0; padding: 0; list-style: none; }
|
|
26
|
+
.hx-confirm-label { margin: 0; color: var(--corn-text-3); }
|
|
27
|
+
.hx-confirm-pre { margin: 0; max-height: 140px; overflow: auto; padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); color: var(--corn-text); font: var(--corn-text-xs)/1.5 var(--corn-mono); white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
|
|
28
|
+
.hx-confirm-pre:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
|
|
29
|
+
.hx-confirm-note { margin: 0; color: var(--corn-text-2); line-height: 1.5; }
|
|
30
|
+
.hx-confirm-actions { display: flex; justify-content: flex-end; gap: var(--corn-space-3); }
|
|
31
|
+
.hx-tokens-list { display: flex; flex-direction: column; gap: var(--corn-space-2); margin: 0; padding: 0; list-style: none; }
|
|
32
|
+
.hx-tokens-item { display: grid; grid-template-columns: 1fr auto; gap: calc(var(--corn-space-1) / 2) var(--corn-space-3); align-items: center; padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 55%, transparent); }
|
|
33
|
+
.hx-tokens-item[data-state="revoked"], .hx-tokens-item[data-state="expired"] { opacity: 0.65; }
|
|
34
|
+
.hx-tokens-label { font-weight: 600; color: var(--corn-text); overflow-wrap: anywhere; }
|
|
35
|
+
.hx-tokens-meta { grid-column: 1; }
|
|
36
|
+
.hx-tokens-item .hx-btn { grid-column: 2; grid-row: 1 / span 2; }
|
|
37
|
+
.hx-tokens-row { display: flex; gap: var(--corn-space-3); align-items: center; }
|
|
38
|
+
.hx-tokens-row .hx-forge-input { flex: 1; }
|
|
39
|
+
.hx-tokens-form { display: grid; grid-template-columns: 1fr 5rem; gap: var(--corn-space-3); align-items: end; }
|
|
40
|
+
.hx-tokens-form .hx-btn { grid-column: 1 / -1; justify-self: start; }
|
|
41
|
+
.hx-confirm { scroll-padding-block: calc(var(--corn-focus-width) + var(--corn-focus-offset) + var(--corn-space-1)); }
|
|
42
|
+
@container corn-box (max-width: 767px) {
|
|
43
|
+
.hx-confirm .hx-btn, .hx-confirm .hx-forge-input, .hx-confirm .hx-forge-select { min-height: 44px; }
|
|
44
|
+
.hx-confirm .hx-btn { min-width: 44px; }
|
|
45
|
+
}
|
|
46
|
+
@media (pointer: coarse) {
|
|
47
|
+
.hx-confirm .hx-btn, .hx-confirm .hx-forge-input, .hx-confirm .hx-forge-select { min-height: 44px; }
|
|
48
|
+
.hx-confirm .hx-btn { min-width: 44px; }
|
|
49
|
+
}
|
|
50
|
+
.hx-confirm-title { font-size: var(--corn-text-lg); font-weight: 700; line-height: 1.25; letter-spacing: normal; }
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* header.css: the header (CF-41)
|
|
3
|
+
* The top bar of cornfield's page: the brand, the View switch (Map, Flow, House, Fit). The header's other parts have files of their own:
|
|
4
|
+
* layers.css (the Layers chip), search.css, work.css (the Work toggle), live.css, account.css. The header is cornfield's page shell's (corn-
|
|
5
|
+
* explorer, a later step); its box is the body, which page.css makes the `corn-box` container.
|
|
6
|
+
* No rule here asks what the document says (`:root`, `html`, `body`, `[data-theme]`), sizes from the window (`vw`, `vh`) or is `position: fixed` unless it says why;
|
|
7
|
+
* a width rule is a container query on `corn-box` (page.css), a height rule on `corn-page`. base.css loads first.
|
|
8
|
+
*/
|
|
9
|
+
/* Headings and titles take the display family (the same as the body unless a brand sets it) */
|
|
10
|
+
.hx-title { font-family: var(--corn-font-display); }
|
|
11
|
+
/* ==== the header (CF-41) ===============================================================================================
|
|
12
|
+
Left to right: the brand, the View switch (Map, Flow, House, Fit), the Layers chip, the live chip; at the right the search,
|
|
13
|
+
the Work toggle and the one account menu (account-menu.js). Everything reads the --corn-* tokens. From 768px it is a desktop
|
|
14
|
+
header; below it is a phone's: Map, Flow, House, a search icon and the account initial, with the Layers chip, the live chip
|
|
15
|
+
and Fit floating on the map (placed from the header's corner). The header has no backdrop-filter of its own: it sits above
|
|
16
|
+
the map, not over it, and one would keep its menus' .glass blur from working (they would show the map through). */
|
|
17
|
+
.hx-header {
|
|
18
|
+
position: relative;
|
|
19
|
+
flex: none;
|
|
20
|
+
height: 56px;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: space-between;
|
|
24
|
+
gap: var(--corn-space-3);
|
|
25
|
+
padding: 0 var(--corn-space-4);
|
|
26
|
+
z-index: 20;
|
|
27
|
+
background: var(--corn-surface-1);
|
|
28
|
+
border-bottom: var(--corn-border) solid var(--corn-line);
|
|
29
|
+
}
|
|
30
|
+
.hx-header-left, .hx-header-right { display: flex; align-items: center; gap: var(--corn-space-3); min-width: 0; }
|
|
31
|
+
.hx-header-right { flex: none; }
|
|
32
|
+
.hx-only-wide { display: none; }
|
|
33
|
+
.hx-only-mobile { display: inline-flex; }
|
|
34
|
+
/* The brand: logo and wordmark; a click resets the view */
|
|
35
|
+
.hx-brand { display: flex; align-items: center; gap: var(--corn-space-3); flex: none; min-width: var(--hx-control-h); min-height: var(--hx-control-h); padding: 0; border: 0; background: none; }
|
|
36
|
+
.hx-title { font-size: var(--corn-text-base); font-weight: 600; letter-spacing: -0.01em; color: var(--corn-text); }
|
|
37
|
+
.hx-mark { flex: none; }
|
|
38
|
+
.hx-mark-bg { fill: var(--corn-accent); }
|
|
39
|
+
.hx-mark-fg { fill: var(--corn-text-on-accent); }
|
|
40
|
+
.hx-mark-line { fill: none; stroke: var(--corn-text-on-accent); stroke-width: 1.5; }
|
|
41
|
+
/* The View switch: Map, Flow and House (aria-pressed says which is on), and Fit at its end */
|
|
42
|
+
.hx-view { display: inline-flex; align-items: center; flex: none; padding: calc(var(--corn-space-1) / 2); border-radius: var(--corn-radius); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); }
|
|
43
|
+
.hx-view-btn, .hx-view-fit { display: inline-flex; align-items: center; justify-content: center; height: var(--hx-seg-inner); border: 0; border-radius: var(--corn-radius-sm); background: transparent; color: var(--corn-text-2); font-size: var(--corn-text-sm); font-weight: 500; white-space: nowrap; }
|
|
44
|
+
.hx-view-btn { padding: 0 var(--corn-space-4); }
|
|
45
|
+
.hx-view-btn:hover, .hx-view-fit:hover { background: var(--corn-surface-3); color: var(--corn-text); }
|
|
46
|
+
.hx-view-btn[aria-pressed="true"] { background: var(--corn-accent); color: var(--corn-text-on-accent); font-weight: 600; }
|
|
47
|
+
.hx-view-fit { width: var(--hx-seg-inner); margin-left: var(--corn-space-1); border-left: var(--corn-border) solid var(--corn-line); border-radius: 0 var(--corn-radius-sm) var(--corn-radius-sm) 0; color: var(--corn-text-3); }
|
|
48
|
+
@container corn-box (min-width: 768px) {
|
|
49
|
+
.hx-header { height: 52px; padding: 0 var(--corn-space-5); gap: var(--corn-space-5); }
|
|
50
|
+
.hx-header-left { gap: var(--corn-space-5); }
|
|
51
|
+
.hx-header-right { gap: var(--corn-space-3); }
|
|
52
|
+
.hx-brand { min-width: 0; min-height: var(--hx-control-h); }
|
|
53
|
+
.hx-only-wide { display: inline; }
|
|
54
|
+
.hx-only-mobile { display: none; }
|
|
55
|
+
/* A narrow desktop (768 to about 900 px, signed in): the search gives up width before it runs over the Layers chip; the left group
|
|
56
|
+
keeps its own (the right group shrinks, the search down to its min-width) */
|
|
57
|
+
.hx-header-left { flex: none; }
|
|
58
|
+
.hx-header-right { flex: 0 1 auto; min-width: 0; }
|
|
59
|
+
}
|
|
60
|
+
@container corn-box (max-width: 767px) {
|
|
61
|
+
/* Not for a desktop: the brand keeps its logo and shows its wordmark; with no wordmark the logo stands alone (the button keeps its name) */
|
|
62
|
+
.hx-title:not(:has([data-corn="brand-wordmark"])) { display: none; }
|
|
63
|
+
.hx-header { padding: 0 var(--corn-space-3); }
|
|
64
|
+
/* Too narrow for the row (320px, or a repo's longer words): the left scrolls sideways rather than run under the right.
|
|
65
|
+
The padding keeps the focus rings inside the scrolled box; what sits on the map is placed from the header, so it is not clipped */
|
|
66
|
+
.hx-header-left { gap: var(--corn-space-1); margin-inline: calc(var(--corn-space-1) * -1); padding: var(--corn-space-1); overflow-x: auto; scrollbar-width: none; }
|
|
67
|
+
.hx-header-left::-webkit-scrollbar { display: none; }
|
|
68
|
+
.hx-header-right { gap: var(--corn-space-1); }
|
|
69
|
+
.hx-view { padding: 0; }
|
|
70
|
+
.hx-view-btn { min-width: var(--hx-control-h); height: var(--hx-seg-inner); padding: 0 var(--corn-space-2); }
|
|
71
|
+
.hx-view-fit { position: absolute; top: calc(100% + var(--corn-space-4)); right: var(--corn-space-4); width: var(--hx-control-h); height: var(--hx-control-h); margin: 0; border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-pill); background: var(--corn-surface-1); color: var(--corn-text-2); box-shadow: var(--corn-shadow); }
|
|
72
|
+
}
|
|
73
|
+
/* A brand wordmark that does not fit leaves the logo (header-fit.js measures); a row that still scrolls shows it at its edge */
|
|
74
|
+
.hx-header-left[data-brand-short] .hx-title { display: none; }
|
|
75
|
+
.hx-header-left[data-overflow] { -webkit-mask: linear-gradient(to right, var(--corn-text) calc(100% - var(--corn-space-6)), transparent); mask: linear-gradient(to right, var(--corn-text) calc(100% - var(--corn-space-6)), transparent); }
|