Make menus opaque and redesign the core palettes
Phase 5a-3. The owner chose candidate B of each palette. - Menus are opaque (UI-043, replaces UI-013). With a background image, menus are at least 92% opaque and blur the image. Submenus show as manual popovers in the top layer, so the blur cannot clip them. - In a light palette, the page is the lightest surface, and the side panes have a slight tint (UI-044). - RuneStone uses neutral surfaces and the rune cyan of the app icon. Claude Dark uses the layout of the Claude app. Claude Light uses a white page with brand Light panes and a darker orange for text. Sakura uses Petal Veil for active rows. - All five core palettes pass every readability rule. A text role keeps the hue of its source and changes only its lightness. - The accent-text rule also checks accent-2, because inline code in Read uses it as text. - The root token defaults match RuneStone Dark. pnpm check passes. pnpm test: 447 pass, 5 todo, 0 fail. Full smoke suite: 92 passed, 2 known. editor/markdownPaste and tables/formulas failed one time and passed on retry. workspace/manageTemplates fails about half of its runs, also on the previous commit: the tree menu rebuilds when the template list reloads, and the open submenu closes.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { BackgroundFrame } from './backgroundContracts.ts';
|
||||
|
||||
const positions = ['center', 'top left', 'top', 'top right', 'left', 'right', 'bottom left', 'bottom', 'bottom right'];
|
||||
const properties = ['--rs-background-overlay', '--rs-background-image', '--rs-background-position', '--rs-background-size', '--rs-background-layer-sizes', '--rs-background-layer-positions', '--rs-background-previous-layer-sizes', '--rs-background-previous-layer-positions', '--rs-background-previous-image', '--rs-background-previous-position', '--rs-background-previous-size', '--rs-background-transition-image', '--rs-workarea-sidebar-bg', '--rs-workarea-editor-bg', '--rs-workarea-surface-opacity', '--rs-workarea-plugin-bg'] as const;
|
||||
const properties = ['--rs-background-overlay', '--rs-background-image', '--rs-background-position', '--rs-background-size', '--rs-background-layer-sizes', '--rs-background-layer-positions', '--rs-background-previous-layer-sizes', '--rs-background-previous-layer-positions', '--rs-background-previous-image', '--rs-background-previous-position', '--rs-background-previous-size', '--rs-background-transition-image', '--rs-workarea-sidebar-bg', '--rs-workarea-editor-bg', '--rs-workarea-surface-opacity', '--rs-workarea-plugin-bg', '--rs-menu-bg', '--rs-menu-active-bg', '--rs-menu-backdrop'] as const;
|
||||
|
||||
function validImage(frame: BackgroundFrame) {
|
||||
return frame && typeof frame.url === 'string' && /^blob:[^\s"'\\()]+$/.test(frame.url)
|
||||
@@ -107,6 +107,9 @@ export class BackgroundHub {
|
||||
body.style.setProperty('--rs-workarea-editor-bg', 'var(--rs-image-editor-bg)');
|
||||
body.style.setProperty('--rs-workarea-surface-opacity', 'var(--rs-surface-opacity, 82%)');
|
||||
body.style.setProperty('--rs-workarea-plugin-bg', 'var(--rs-transparent-plugin-bg, transparent)');
|
||||
body.style.setProperty('--rs-menu-bg', 'var(--rs-image-menu-bg)');
|
||||
body.style.setProperty('--rs-menu-active-bg', 'var(--rs-image-menu-active-bg)');
|
||||
body.style.setProperty('--rs-menu-backdrop', 'var(--rs-image-menu-backdrop)');
|
||||
body.style.setProperty('--rs-background-transition-image', frame.previous ? currentImage : 'none');
|
||||
body.style.setProperty('--rs-background-previous-image', frame.previous ? image(frame.previous).image : 'none');
|
||||
body.style.setProperty('--rs-background-previous-position', frame.previous?.position ?? frame.position);
|
||||
|
||||
Reference in New Issue
Block a user