Make menus and hover fills translucent over a background image
With a background image, menus use the surface transparency of Appearance (82% by default) instead of at least 92%, and they keep the blur. Hovered rows and controls in the work area, hovered menu rows, and the workspace button use the new --rs-hover-bg token. With an image, it is a 6% veil of the strong text color. The image stays visible, and the hover shows over light and dark image areas. Without an image, nothing changes. Silver Serpent dim text is now #c2c6cc. It keeps 4.5:1 contrast on a hovered row over a white image. UI-061 replaces the image rule of UI-043. Card 05b9bfa1.
This commit is contained in:
@@ -91,10 +91,13 @@ await runSmoke("menus/consistency", async ({ page }) => {
|
||||
assert.ok(compactHeight < previousHeight * .85, 'The same actions use at least 15% less vertical space');
|
||||
console.log(JSON.stringify({ theme, compactHeight, previousHeight }));
|
||||
await page.screenshot({ path: path.join(output, `menu-spacing-after-${theme}.png`) });
|
||||
assert.ok(reference.panel[2].includes('/ 0.92') || /rgba\(.+, 0\.92\)/.test(reference.panel[2]), "With a background image, menus are at least 92% opaque");
|
||||
// With a background image, menus use the surface transparency (82% by default), and the hovered row is a thin veil (UI-061).
|
||||
assert.ok(reference.panel[2].includes('/ 0.82') || /rgba\(.+, 0\.82\)/.test(reference.panel[2]), "With a background image, menus use the surface transparency");
|
||||
assert.match(reference.panel[6], /blur\(18px\)/, "With a background image, menus blur it");
|
||||
assert.ok(reference.inset >= 5, "Rows need an inset from the panel border");
|
||||
assert.equal(await item("Pin").locator("svg.action-icon").count(), 1);
|
||||
await item("Pin").hover();
|
||||
assert.match(await item("Pin").evaluate(node => getComputedStyle(node).backgroundColor), /(\/ 0\.06\)|, 0\.06\))$/, "With a background image, the hovered row is a thin veil");
|
||||
const offsets = await file.locator(":scope > button").evaluateAll(nodes => nodes.map(node => Math.round(node.querySelector(".action-label").getBoundingClientRect().left - node.getBoundingClientRect().left)));
|
||||
assert.equal(new Set(offsets).size, 1, "All file labels align");
|
||||
await page.screenshot({ path: path.join(output, `menu-file-${theme}.png`) });
|
||||
|
||||
Reference in New Issue
Block a user