feat(ui): refresh Vue Bootstrap dashboard and network diagrams
This commit is contained in:
@@ -21,6 +21,21 @@ test('Vue theme builds locally after Bootstrap without remote fonts', () => {
|
||||
assert.doesNotMatch(fs.readFileSync('frontend/src/theme.css','utf8'), /@import|https?:|@font-face/i);
|
||||
assert.match(fs.readFileSync('frontend/index.html','utf8'), /name="viewport"/);
|
||||
});
|
||||
|
||||
test('Bootstrap polish keeps readable light and dark foregrounds and avoids remote assets', () => {
|
||||
const polish=fs.readFileSync('frontend/src/bootstrap-polish.css','utf8');
|
||||
const light=polish.match(/:root\s*\{([^}]+)\}/)[1];
|
||||
const value=name=>light.match(new RegExp('--'+name+':\\s*(#[0-9a-f]{6})'))[1];
|
||||
for(const bg of ['#ffffff','#f3f6fa','#f5f6f4']) {
|
||||
assert.ok(contrast(value('ink'),bg)>=4.5);
|
||||
assert.ok(contrast(value('ui-muted'),bg)>=4.5);
|
||||
}
|
||||
for(const bg of [value('ui-accent'),'#397359'])assert.ok(contrast('#ffffff',bg)>=4.5);
|
||||
assert.ok(contrast('#a8bdc5','#1a2b35')>=4.5);
|
||||
assert.doesNotMatch(polish,/@import|https?:|@font-face/);
|
||||
assert.match(polish,/prefers-reduced-motion/);
|
||||
assert.match(polish,/home-options-open/);
|
||||
});
|
||||
test('primary text, muted text and actions have at least 4.5:1 contrast', () => {
|
||||
for (const [fg, bg] of [
|
||||
[token('ink'), token('paper')], [token('muted'), token('paper')],
|
||||
|
||||
Reference in New Issue
Block a user