openvibers/openvibe.bot Commits
The red token is defined, not drawn from itself (#403)
Changes
@@@ -7,7 +7,7 @@--bg: var(--bg-primary, #0d1117); --surface: var(--bg-card, #161b22); --raised: color-mix(in srgb, var(--surface) 84%, var(--text) 16%);--line: var(--border, #2d3540); --text: var(--text-primary, #e6edf3); --muted: var(--text-secondary, #8b96a3);--accent: #3d8bfd; --accent-ink: var(--on-accent, #fff); --ok: var(--success, #3fb950);-- --warn: var(--warning, #d29922); --danger: var(--danger, #e5484d); --danger-deep: #a3191e;++ --warn: var(--warning, #d29922); --danger: #e5484d; --danger-deep: #a3191e;/* Filled controls with white text use the strong shades: white on --accent is 3.3:1 and on --danger 3.9:1, underWCAG AA's 4.5:1; these are 5.2:1 and 5.0:1 (the network's readable accent fills). */--fill-accent: var(--accent-strong, #2563eb); --on-fill-accent: var(--on-accent-strong, #fff); --fill-danger: #d0343a;@@@ -35,4 +35,9 @@ const routes = fs.readFileSync(path.join(__dirname, '..', 'server', 'web', 'routassert.ok(routes.includes("r.get('/panel/lock.svg', asset('lock.svg', 'image/svg+xml'))"), 'and the panel serves it');assert.ok(fs.existsSync(path.join(__dirname, '..', 'public', 'lock.svg')), 'the file exists');++// 4. No custom property is defined from itself (`--danger: var(--danger, …)` is a cycle: the value is dropped, and every++// red in the overlay drew transparent, the robot pill's offline dot included).++const cyclic = [...css.matchAll(/(--[a-z0-9-]+)\s*:\s*var\(\s*(--[a-z0-9-]+)/g)].filter((m) => m[1] === m[2]).map((m) => m[1]);++assert.deepStrictEqual(cyclic, [], 'no custom property is defined from itself');++console.log('overlay controls css: all checks passed');
@@ -7,7 +7,7 @@
@@ -7,7 +7,7 @@
--bg: var(--bg-primary, #0d1117); --surface: var(--bg-card, #161b22); --raised: color-mix(in srgb, var(--surface) 84%, var(--text) 16%);
--bg: var(--bg-primary, #0d1117); --surface: var(--bg-card, #161b22); --raised: color-mix(in srgb, var(--surface) 84%, var(--text) 16%);
--line: var(--border, #2d3540); --text: var(--text-primary, #e6edf3); --muted: var(--text-secondary, #8b96a3);
--line: var(--border, #2d3540); --text: var(--text-primary, #e6edf3); --muted: var(--text-secondary, #8b96a3);
--accent: #3d8bfd; --accent-ink: var(--on-accent, #fff); --ok: var(--success, #3fb950);
--accent: #3d8bfd; --accent-ink: var(--on-accent, #fff); --ok: var(--success, #3fb950);
- --warn: var(--warning, #d29922); --danger: var(--danger, #e5484d); --danger-deep: #a3191e;
+ --warn: var(--warning, #d29922); --danger: #e5484d; --danger-deep: #a3191e;
/* Filled controls with white text use the strong shades: white on --accent is 3.3:1 and on --danger 3.9:1, under
/* Filled controls with white text use the strong shades: white on --accent is 3.3:1 and on --danger 3.9:1, under
WCAG AA's 4.5:1; these are 5.2:1 and 5.0:1 (the network's readable accent fills). */
WCAG AA's 4.5:1; these are 5.2:1 and 5.0:1 (the network's readable accent fills). */
--fill-accent: var(--accent-strong, #2563eb); --on-fill-accent: var(--on-accent-strong, #fff); --fill-danger: #d0343a;
--fill-accent: var(--accent-strong, #2563eb); --on-fill-accent: var(--on-accent-strong, #fff); --fill-danger: #d0343a;
@@ -35,4 +35,9 @@ const routes = fs.readFileSync(path.join(__dirname, '..', 'server', 'web', 'rout
@@ -35,4 +35,9 @@ const routes = fs.readFileSync(path.join(__dirname, '..', 'server', 'web', 'rout
assert.ok(routes.includes("r.get('/panel/lock.svg', asset('lock.svg', 'image/svg+xml'))"), 'and the panel serves it');
assert.ok(routes.includes("r.get('/panel/lock.svg', asset('lock.svg', 'image/svg+xml'))"), 'and the panel serves it');
assert.ok(fs.existsSync(path.join(__dirname, '..', 'public', 'lock.svg')), 'the file exists');
assert.ok(fs.existsSync(path.join(__dirname, '..', 'public', 'lock.svg')), 'the file exists');
+// 4. No custom property is defined from itself (`--danger: var(--danger, …)` is a cycle: the value is dropped, and every
+// red in the overlay drew transparent, the robot pill's offline dot included).
+const cyclic = [...css.matchAll(/(--[a-z0-9-]+)\s*:\s*var\(\s*(--[a-z0-9-]+)/g)].filter((m) => m[1] === m[2]).map((m) => m[1]);
+assert.deepStrictEqual(cyclic, [], 'no custom property is defined from itself');
+
console.log('overlay controls css: all checks passed');
console.log('overlay controls css: all checks passed');