Keep Glass Stage section navigation and panel content clear of playback chrome
This commit is contained in:
10
frontend/glass-panel-layout.test.js
Normal file
10
frontend/glass-panel-layout.test.js
Normal file
@@ -0,0 +1,10 @@
|
||||
const { test } = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const { bottomClearance } = require('./glass-panel-layout.js');
|
||||
test('clearance covers stacked floating chrome and includes its viewport inset once', () => {
|
||||
assert.equal(bottomClearance(844, [{ fixed: true, top: 740, bottom: 844, height: 104 }, { fixed: true, top: 668, bottom: 732, height: 64 }]), 192);
|
||||
assert.equal(bottomClearance(844, [{ fixed: true, top: 740, bottom: 844, height: 104 }]), 120);
|
||||
});
|
||||
test('hidden, nonfixed and offscreen elements do not reserve chrome space', () => {
|
||||
assert.equal(bottomClearance(844, [{ fixed: true, top: 740, bottom: 844, height: 0 }, { fixed: false, top: 668, bottom: 732, height: 64 }, { fixed: true, top: 900, bottom: 964, height: 64 }]), 0);
|
||||
});
|
||||
Reference in New Issue
Block a user