Compare commits
2
Commits
b2993e81a3
...
648a5672e7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
648a5672e7 | ||
|
|
9fc1490988 |
@@ -830,6 +830,7 @@ Update 2026-10-29: The native Terminal feature keeps the 65% cap on `--rs-select
|
|||||||
- Shared implementation: `tokens.css` (`--rs-menu-bg`, `--rs-menu-active-bg`, `--rs-menu-backdrop`, and the `--rs-image-menu-*` tokens), `menu.css`, `appearance.ts` and `backgrounds.ts` (the image switch), and `actionMenu.ts` (popover submenus).
|
- Shared implementation: `tokens.css` (`--rs-menu-bg`, `--rs-menu-active-bg`, `--rs-menu-backdrop`, and the `--rs-image-menu-*` tokens), `menu.css`, `appearance.ts` and `backgrounds.ts` (the image switch), and `actionMenu.ts` (popover submenus).
|
||||||
- Evidence: `tests/smoke/menus/consistency.smoke.mjs` checks an opaque menu without an image, and 92% with a blur over an image. Screenshots are in `output/phase-5a/5a-3/` in the main checkout.
|
- Evidence: `tests/smoke/menus/consistency.smoke.mjs` checks an opaque menu without an image, and 92% with a blur over an image. Screenshots are in `output/phase-5a/5a-3/` in the main checkout.
|
||||||
- Replaces: [UI-013](#ui-013--translucent-menu-surfaces).
|
- Replaces: [UI-013](#ui-013--translucent-menu-surfaces).
|
||||||
|
- Replaced by: [UI-061](#ui-061--translucent-menus-and-hover-fills-over-images) replaces the image rule. Menus without an image stay opaque.
|
||||||
- Limits: Browser checks use desktop service mocks. Native desktop acceptance remains open.
|
- Limits: Browser checks use desktop service mocks. Native desktop acceptance remains open.
|
||||||
|
|
||||||
### UI-044 — Core palettes and the lightest page
|
### UI-044 — Core palettes and the lightest page
|
||||||
@@ -1106,3 +1107,19 @@ Update 2026-10-29: The native Terminal feature keeps the 65% cap on `--rs-select
|
|||||||
- Evidence: `tests/smoke/features/pm*.smoke.mjs` and `tests/unit/features/pm/`, with screenshots in both themes in `output/smoke/features/`. `pmLanguage.smoke.mjs` shows a board in French.
|
- Evidence: `tests/smoke/features/pm*.smoke.mjs` and `tests/unit/features/pm/`, with screenshots in both themes in `output/smoke/features/`. `pmLanguage.smoke.mjs` shows a board in French.
|
||||||
- Replaces / replaced by: The Project Management plugin, its settings view, the boards service, and `api.backgrounds`. The rules of [UI-033](#ui-033--list-capacity-and-a-frozen-all-tasks-overview) through [UI-038](#ui-038--fixed-workspace-default-board) stay.
|
- Replaces / replaced by: The Project Management plugin, its settings view, the boards service, and `api.backgrounds`. The rules of [UI-033](#ui-033--list-capacity-and-a-frozen-all-tasks-overview) through [UI-038](#ui-038--fixed-workspace-default-board) stay.
|
||||||
- Limits: **More actions**, the card actions, and the list actions stay popup panels of the feature. The old package stays installed until the user removes it.
|
- Limits: **More actions**, the card actions, and the list actions stay popup panels of the feature. The old package stays installed until the user removes it.
|
||||||
|
|
||||||
|
### UI-061 — Translucent menus and hover fills over images
|
||||||
|
|
||||||
|
- Type: Rule change
|
||||||
|
- Date: 2026-10-30
|
||||||
|
- Status: Implemented for user review
|
||||||
|
- Decision source: Card 05b9bfa1 reports that menus, the workspace button, and row highlights lost their transparency over a background image.
|
||||||
|
- Previous rule: [UI-043](#ui-043--opaque-menus). With a background image, menus were at least 92% opaque, and a hovered menu row was 92% `--rs-bg-active`. Hovered rows in the work area and the workspace button used the opaque `--rs-bg-active`.
|
||||||
|
- New rule: Without a background image, nothing changes. Menus, hover fills, and the workspace button are opaque. With an image, menus use the surface transparency of Appearance (82% at the default amount of 18%) and keep the blur. Hovered rows and controls in the work area, hovered menu rows, and the workspace button use `--rs-hover-bg`. With an image, it is a 6% veil of `--rs-text-strong`.
|
||||||
|
- Reason: A nearly opaque `--rs-bg-active` hides the image. A translucent `--rs-bg-active` disappears over mid-tone image areas, because its color is close to the tinted pane there. The veil keeps the image as visible as the pane around it. It adds about the same brightness step as the opaque hover over light, mid-tone, and dark image areas. The blur keeps menu labels clear of document text.
|
||||||
|
- Scope: Host menus, plugin menus, submenus, the workspace picker, the workspace button, and the hover fills of the side panes, the tab bar, the view modes, icon buttons, Source control, the Git graph and diff tabs, the PDF toolbar, Find, the editor controls, and the bookmarks bar. Dialogs and Settings keep opaque fills.
|
||||||
|
- Palette change: Silver Serpent `text-dim` is `#c2c6cc` (was `#b3b8be`). It keeps 4.5:1 on a hovered row over a white image.
|
||||||
|
- Shared implementation: `tokens.css` (`--rs-hover-bg`, `--rs-image-hover-bg`, `--rs-image-menu-bg`, and `--rs-image-menu-active-bg`) and `backgrounds.ts` (the image switch).
|
||||||
|
- Evidence: `tests/smoke/menus/consistency.smoke.mjs` and `tests/smoke/features/background.smoke.mjs` check the 82% menu, the blur, and the 6% veil with an image, and opaque fills without one. `tests/unit/theme/characterPalettes.spec.ts` checks the Silver Serpent row colors on a hovered row over a white image.
|
||||||
|
- Replaces: The image rule of [UI-043](#ui-043--opaque-menus). Menus without an image stay opaque.
|
||||||
|
- Limits: Over the brightest image areas, dim text on a hovered row has about 15% less contrast than on the pane around it. Browser checks use desktop service mocks. Native desktop acceptance remains open.
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Each named theme has its own fonts and syntax colors. Fonts come from your compu
|
|||||||
## Adjust transparency
|
## Adjust transparency
|
||||||
|
|
||||||
**Transparent surfaces** tints work areas with a [background](#show-a-background) and compatible plugin surfaces.
|
**Transparent surfaces** tints work areas with a [background](#show-a-background) and compatible plugin surfaces.
|
||||||
Menus stay opaque. With a background image, menus are at least 92% opaque and blur the image.
|
Without a background image, menus are opaque. With an image, menus use the same transparency as other surfaces and blur the image.
|
||||||
Set **Transparency amount** from 0% to 100%. The default is 18%.
|
Set **Transparency amount** from 0% to 100%. The default is 18%.
|
||||||
Turn off **Transparent surfaces** for opaque surfaces. Text and icons stay opaque in both cases.
|
Turn off **Transparent surfaces** for opaque surfaces. Text and icons stay opaque in both cases.
|
||||||
|
|
||||||
|
|||||||
+6
-4
@@ -52,7 +52,8 @@ Do not copy feature-specific colors into a shared control.
|
|||||||
| `--rs-menu-font-size` | 13px | Menu text |
|
| `--rs-menu-font-size` | 13px | Menu text |
|
||||||
| `--rs-menu-icon-size` / `--rs-menu-icon-gap` | 14px / 8px | Menu icon and its gap to the label |
|
| `--rs-menu-icon-size` / `--rs-menu-icon-gap` | 14px / 8px | Menu icon and its gap to the label |
|
||||||
| `--rs-menu-border` | `transparent` | Borderless panel. `--rs-menu-shadow` supplies the edge. |
|
| `--rs-menu-border` | `transparent` | Borderless panel. `--rs-menu-shadow` supplies the edge. |
|
||||||
| `--rs-menu-bg`, `--rs-menu-active-bg` | `--rs-bg-elevated`, `--rs-bg-active` | Opaque menu surface and hover or focus fill. With a background image: at least 92% opaque. |
|
| `--rs-menu-bg`, `--rs-menu-active-bg` | `--rs-bg-elevated`, `--rs-bg-active` | Opaque menu surface and hover or focus fill. With a background image: the surface tint and the `--rs-hover-bg` veil. |
|
||||||
|
| `--rs-hover-bg` | `--rs-bg-active` | Hover fill of rows and controls in the work area, and the fill of the workspace button. With a background image: a 6% veil of `--rs-text-strong`. |
|
||||||
| `--rs-menu-backdrop` | `none` | With a background image: `blur(18px) saturate(1.2)` |
|
| `--rs-menu-backdrop` | `none` | With a background image: `blur(18px) saturate(1.2)` |
|
||||||
| `--rs-surface-opacity` | 82% | Shared surface tint. Appearance settings adjust it. |
|
| `--rs-surface-opacity` | 82% | Shared surface tint. Appearance settings adjust it. |
|
||||||
|
|
||||||
@@ -100,7 +101,7 @@ Use one menu design for context menus, action menus, and their submenus in the h
|
|||||||
- Use the `--rs-menu-*` tokens and `--rs-control-radius`. One menu family shares font, row height, padding, icon size, label alignment, separators, and shadow.
|
- Use the `--rs-menu-*` tokens and `--rs-control-radius`. One menu family shares font, row height, padding, icon size, label alignment, separators, and shadow.
|
||||||
- A menu can grow wider when its content needs more space. All other measurements stay shared.
|
- A menu can grow wider when its content needs more space. All other measurements stay shared.
|
||||||
- Keep the padding inset around every row, so hover and focus fills do not touch the panel edge.
|
- Keep the padding inset around every row, so hover and focus fills do not touch the panel edge.
|
||||||
- The panel is borderless, with a shadow. Its surface is opaque through `--rs-menu-bg` and `--rs-menu-active-bg`. Only with a background image, it is at least 92% opaque and blurs the image. Host menus, plugin menus, submenus, and the workspace picker all use this surface.
|
- The panel is borderless, with a shadow. Its surface is opaque through `--rs-menu-bg` and `--rs-menu-active-bg`. Only with a background image, it uses the surface tint (82% by default) and blurs the image, and a hovered row gets the veil of `--rs-hover-bg`. Host menus, plugin menus, submenus, and the workspace picker all use this surface.
|
||||||
- Submenus show as popovers in the top layer, so the blur of the parent menu cannot clip them.
|
- Submenus show as popovers in the top layer, so the blur of the parent menu cannot clip them.
|
||||||
- Plugins call `api.ui.showActionMenu` for the host menu, when the host API exists. The host handles dismissal, focus return, and plugin cleanup.
|
- Plugins call `api.ui.showActionMenu` for the host menu, when the host API exists. The host handles dismissal, focus return, and plugin cleanup.
|
||||||
|
|
||||||
@@ -142,7 +143,7 @@ Use one menu design for context menus, action menus, and their submenus in the h
|
|||||||
- Native editing menus keep recognized editing, spelling, and emoji commands. The host removes system sharing, writing direction, dictation, and unnamed tools before shared display or native fallback.
|
- Native editing menus keep recognized editing, spelling, and emoji commands. The host removes system sharing, writing direction, dictation, and unnamed tools before shared display or native fallback.
|
||||||
- New note creates a blank note. Its submenu contains templates and Manage templates.
|
- New note creates a blank note. Its submenu contains templates and Manage templates.
|
||||||
|
|
||||||
Decisions: [UI-002](design-decisions.md#ui-002--share-the-requested-dropdown-design), [UI-003](design-decisions.md#ui-003--quiet-menu-choices), [UI-006](design-decisions.md#ui-006--borderless-shared-menus), [UI-007](design-decisions.md#ui-007--repeated-menu-drift), [UI-008](design-decisions.md#ui-008--keep-native-editing-menus-focused), [UI-026](design-decisions.md#ui-026--compact-shared-menu-rows), [UI-027](design-decisions.md#ui-027--direct-spelling-corrections), [UI-043](design-decisions.md#ui-043--opaque-menus).
|
Decisions: [UI-002](design-decisions.md#ui-002--share-the-requested-dropdown-design), [UI-003](design-decisions.md#ui-003--quiet-menu-choices), [UI-006](design-decisions.md#ui-006--borderless-shared-menus), [UI-007](design-decisions.md#ui-007--repeated-menu-drift), [UI-008](design-decisions.md#ui-008--keep-native-editing-menus-focused), [UI-026](design-decisions.md#ui-026--compact-shared-menu-rows), [UI-027](design-decisions.md#ui-027--direct-spelling-corrections), [UI-043](design-decisions.md#ui-043--opaque-menus), [UI-061](design-decisions.md#ui-061--translucent-menus-and-hover-fills-over-images).
|
||||||
|
|
||||||
## Window and navigation
|
## Window and navigation
|
||||||
|
|
||||||
@@ -223,13 +224,14 @@ Decisions: [UI-009](design-decisions.md#ui-009--character-theme-appearances), [U
|
|||||||
- Sidebars use `--rs-image-sidebar-bg` (82% tint). Editor surfaces use `--rs-image-editor-bg` (90% tint). Without an image, both are opaque.
|
- Sidebars use `--rs-image-sidebar-bg` (82% tint). Editor surfaces use `--rs-image-editor-bg` (90% tint). Without an image, both are opaque.
|
||||||
- Write, Source, Read, and Split share the editor surface. CodeMirror layers stay transparent above it.
|
- Write, Source, Read, and Split share the editor surface. CodeMirror layers stay transparent above it.
|
||||||
- Code blocks in Write and Read use `--rs-code-block-bg`.
|
- Code blocks in Write and Read use `--rs-code-block-bg`.
|
||||||
|
- Hovered rows and controls in the work area, hovered menu rows, and the workspace button use `--rs-hover-bg`. 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. Dialogs and Settings keep opaque fills.
|
||||||
- New-tab buttons use `--rs-image-control-bg` and `--rs-image-control-hover-bg`. Their tint keeps labels readable while the image stays visible. The new-tab screen shows only its action buttons, with icons, labels, and shortcuts.
|
- New-tab buttons use `--rs-image-control-bg` and `--rs-image-control-hover-bg`. Their tint keeps labels readable while the image stays visible. The new-tab screen shows only its action buttons, with icons, labels, and shortcuts.
|
||||||
- Headers and dialogs keep their own surfaces.
|
- Headers and dialogs keep their own surfaces.
|
||||||
- The app work area and Project Management keep separate images and settings in every theme. The one image of Background can be up to 50 MiB. Its bytes stay in IndexedDB, and the appearance settings keep a small reference.
|
- The app work area and Project Management keep separate images and settings in every theme. The one image of Background can be up to 50 MiB. Its bytes stay in IndexedDB, and the appearance settings keep a small reference.
|
||||||
- The folder and the one image each have a size, nine alignment positions, and an overlay from -100% (lighter) to 100% (darker), set with a slider or a typed value.
|
- The folder and the one image each have a size, nine alignment positions, and an overlay from -100% (lighter) to 100% (darker), set with a slider or a typed value.
|
||||||
- Without a background frame, every surface and menu is opaque. With Background off, no image shows.
|
- Without a background frame, every surface and menu is opaque. With Background off, no image shows.
|
||||||
|
|
||||||
Decisions: [UI-010](design-decisions.md#ui-010--background-surface-visibility), [UI-011](design-decisions.md#ui-011--backgrounds-across-the-work-area), [UI-016](design-decisions.md#ui-016--translucent-code-blocks).
|
Decisions: [UI-010](design-decisions.md#ui-010--background-surface-visibility), [UI-011](design-decisions.md#ui-011--backgrounds-across-the-work-area), [UI-016](design-decisions.md#ui-016--translucent-code-blocks), [UI-061](design-decisions.md#ui-061--translucent-menus-and-hover-fills-over-images).
|
||||||
|
|
||||||
### Project Management surfaces
|
### Project Management surfaces
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "runestone",
|
"name": "runestone",
|
||||||
"version": "0.1.51",
|
"version": "0.1.52",
|
||||||
"description": "Desktop editor for a local workspace",
|
"description": "Desktop editor for a local workspace",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Generated
+1
-1
@@ -3130,7 +3130,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "runestone"
|
name = "runestone"
|
||||||
version = "0.1.51"
|
version = "0.1.52"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.23.1",
|
"base64 0.23.1",
|
||||||
"dunce",
|
"dunce",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "runestone"
|
name = "runestone"
|
||||||
version = "0.1.51"
|
version = "0.1.52"
|
||||||
description = "Writing workspace plus script editor"
|
description = "Writing workspace plus script editor"
|
||||||
authors = ["Knotty Wyvern"]
|
authors = ["Knotty Wyvern"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
@@ -46,4 +46,4 @@ opt-level = 3
|
|||||||
strip = true
|
strip = true
|
||||||
|
|
||||||
[package.metadata.runestone]
|
[package.metadata.runestone]
|
||||||
version = "0.1.51"
|
version = "0.1.52"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "RuneStone",
|
"productName": "RuneStone",
|
||||||
"version": "0.1.51",
|
"version": "0.1.52",
|
||||||
"identifier": "com.runestone.app",
|
"identifier": "com.runestone.app",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "pnpm dev",
|
"beforeDevCommand": "pnpm dev",
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
<style>
|
<style>
|
||||||
.bookmarks{color:var(--rs-text);font-family:var(--rs-font-ui)}.row{display:flex;align-items:center;padding:0 5px;border-radius:var(--rs-control-radius)}.row:hover{background:var(--rs-bg-active)}
|
.bookmarks{color:var(--rs-text);font-family:var(--rs-font-ui)}.row{display:flex;align-items:center;padding:0 5px;border-radius:var(--rs-control-radius)}.row:hover{background:var(--rs-hover-bg)}
|
||||||
.link{display:flex;align-items:center;gap:8px;flex:1;min-width:0;padding:7px 5px;border:0;border-radius:var(--rs-control-radius);color:inherit;background:transparent;text-align:left;cursor:pointer}
|
.link{display:flex;align-items:center;gap:8px;flex:1;min-width:0;padding:7px 5px;border:0;border-radius:var(--rs-control-radius);color:inherit;background:transparent;text-align:left;cursor:pointer}
|
||||||
span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.link:focus-visible{outline:2px solid var(--rs-focus)}p{padding:8px;font-size:12px}.error{color:var(--rs-error)}.note{margin:0;color:var(--rs-text-dim)}
|
span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.link:focus-visible{outline:2px solid var(--rs-focus)}p{padding:8px;font-size:12px}.error{color:var(--rs-error)}.note{margin:0;color:var(--rs-text-dim)}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
.reading .rs-heading-toggle { inset-inline-start: -24px; }
|
.reading .rs-heading-toggle { inset-inline-start: -24px; }
|
||||||
.live-writer .rs-heading-toggle { top: .7em; }
|
.live-writer .rs-heading-toggle { top: .7em; }
|
||||||
.rs-heading-toggle { position: absolute; inset-inline-start: -30px; top: 0; width: 28px; height: 28px; padding: 6px; border: 0; border-radius: var(--rs-control-radius); color: var(--rs-text-dim); background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
|
.rs-heading-toggle { position: absolute; inset-inline-start: -30px; top: 0; width: 28px; height: 28px; padding: 6px; border: 0; border-radius: var(--rs-control-radius); color: var(--rs-text-dim); background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
|
||||||
.rs-heading-toggle:hover, .rs-heading-toggle:focus-visible { color: var(--rs-text); background: var(--rs-bg-active); }
|
.rs-heading-toggle:hover, .rs-heading-toggle:focus-visible { color: var(--rs-text); background: var(--rs-hover-bg); }
|
||||||
.rs-heading-toggle:focus-visible { outline: 1px solid var(--rs-focus); outline-offset: 1px; }
|
.rs-heading-toggle:focus-visible { outline: 1px solid var(--rs-focus); outline-offset: 1px; }
|
||||||
.rs-heading-toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
.rs-heading-toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
||||||
.rs-heading-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
|
.rs-heading-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
.md-image-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; padding: 3px; border-radius: 6px; background: var(--rs-bg-elevated); box-shadow: 0 2px 8px #0005; opacity: 0; transition: opacity 100ms; }
|
.md-image-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; padding: 3px; border-radius: 6px; background: var(--rs-bg-elevated); box-shadow: 0 2px 8px #0005; opacity: 0; transition: opacity 100ms; }
|
||||||
.md-image-frame:hover .md-image-actions, .md-image-frame:focus-within .md-image-actions { opacity: 1; }
|
.md-image-frame:hover .md-image-actions, .md-image-frame:focus-within .md-image-actions { opacity: 1; }
|
||||||
.image-action { position: relative; display: inline-grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; padding: 6px; color: var(--rs-text); border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
|
.image-action { position: relative; display: inline-grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; padding: 6px; color: var(--rs-text); border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
|
||||||
.image-action:hover, .image-action:focus-visible { background: var(--rs-bg-active); color: var(--rs-text-strong); }
|
.image-action:hover, .image-action:focus-visible { background: var(--rs-hover-bg); color: var(--rs-text-strong); }
|
||||||
.image-action:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: 1px; }
|
.image-action:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: 1px; }
|
||||||
.image-action:disabled { color: var(--rs-text-dim); cursor: default; }
|
.image-action:disabled { color: var(--rs-text-dim); cursor: default; }
|
||||||
.image-lightbox { position: fixed; inset: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--rs-image-viewer-bg); color: var(--rs-text); }
|
.image-lightbox { position: fixed; inset: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--rs-image-viewer-bg); color: var(--rs-text); }
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
.table-drag-handle[hidden], .table-drop-indicator[hidden] { display: none; }
|
.table-drag-handle[hidden], .table-drop-indicator[hidden] { display: none; }
|
||||||
.table-drag-handle .action-icon { width: 18px; height: 18px; pointer-events: none; }
|
.table-drag-handle .action-icon { width: 18px; height: 18px; pointer-events: none; }
|
||||||
.table-drag-column .action-icon { transform: rotate(90deg); }
|
.table-drag-column .action-icon { transform: rotate(90deg); }
|
||||||
.table-drag-handle:hover, .table-drag-handle:focus-visible:not([data-pointer-focus]) { opacity: 1; color: var(--rs-text); background: var(--rs-bg-active); outline: 2px solid var(--rs-accent); outline-offset: -2px; z-index: 2; }
|
.table-drag-handle:hover, .table-drag-handle:focus-visible:not([data-pointer-focus]) { opacity: 1; color: var(--rs-text); background: var(--rs-hover-bg); outline: 2px solid var(--rs-accent); outline-offset: -2px; z-index: 2; }
|
||||||
.writer-table.is-table-dragging, .writer-table.is-table-dragging * { cursor: grabbing !important; user-select: none; }
|
.writer-table.is-table-dragging, .writer-table.is-table-dragging * { cursor: grabbing !important; user-select: none; }
|
||||||
.writer-table.is-table-dragging .table-drag-handle::after { display: none; }
|
.writer-table.is-table-dragging .table-drag-handle::after { display: none; }
|
||||||
.table-drop-indicator { position: absolute; z-index: 3; border-radius: 2px; background: var(--rs-accent); pointer-events: none; }
|
.table-drop-indicator { position: absolute; z-index: 3; border-radius: 2px; background: var(--rs-accent); pointer-events: none; }
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
.header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
.header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
||||||
strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
|
strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
|
||||||
.text-button { min-height: 28px; padding: 3px 10px; border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); background: var(--rs-bg-elevated); color: var(--rs-text); font: inherit; }
|
.text-button { min-height: 28px; padding: 3px 10px; border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); background: var(--rs-bg-elevated); color: var(--rs-text); font: inherit; }
|
||||||
.text-button:hover:not(:disabled) { background: var(--rs-bg-active); }
|
.text-button:hover:not(:disabled) { background: var(--rs-hover-bg); }
|
||||||
.text-button:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: 2px; }
|
.text-button:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: 2px; }
|
||||||
.text-button:disabled { color: var(--rs-text-dim); }
|
.text-button:disabled { color: var(--rs-text-dim); }
|
||||||
.error { margin: 0; color: var(--rs-error); }
|
.error { margin: 0; color: var(--rs-error); }
|
||||||
|
|||||||
@@ -216,7 +216,7 @@
|
|||||||
ol { flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; }
|
ol { flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; }
|
||||||
li { height: 30px; min-width: 0; }
|
li { height: 30px; min-width: 0; }
|
||||||
ol button { display: grid; grid-template-columns: minmax(0, 1fr) 95px 78px 54px; align-items: center; gap: 8px; width: 100%; height: 30px; padding: 0 6px; border: var(--rs-item-selection-width) solid transparent; border-radius: var(--rs-item-selection-radius); background: transparent; color: var(--rs-text); font: inherit; text-align: left; }
|
ol button { display: grid; grid-template-columns: minmax(0, 1fr) 95px 78px 54px; align-items: center; gap: 8px; width: 100%; height: 30px; padding: 0 6px; border: var(--rs-item-selection-width) solid transparent; border-radius: var(--rs-item-selection-radius); background: transparent; color: var(--rs-text); font: inherit; text-align: left; }
|
||||||
ol button:hover { background: var(--rs-bg-active); }
|
ol button:hover { background: var(--rs-hover-bg); }
|
||||||
ol button[aria-selected="true"], .file[aria-pressed="true"] { background: var(--rs-item-selection-bg); border-color: var(--rs-item-selection-border); }
|
ol button[aria-selected="true"], .file[aria-pressed="true"] { background: var(--rs-item-selection-bg); border-color: var(--rs-item-selection-border); }
|
||||||
ol button:focus-visible, .file:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: -2px; }
|
ol button:focus-visible, .file:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: -2px; }
|
||||||
.description { display: flex; align-items: center; gap: 5px; min-width: 0; }
|
.description { display: flex; align-items: center; gap: 5px; min-width: 0; }
|
||||||
@@ -233,7 +233,7 @@
|
|||||||
.message { white-space: pre-wrap; overflow-wrap: anywhere; }
|
.message { white-space: pre-wrap; overflow-wrap: anywhere; }
|
||||||
.files { display: flex; flex-direction: column; flex-shrink: 0; max-height: 180px; overflow: auto; }
|
.files { display: flex; flex-direction: column; flex-shrink: 0; max-height: 180px; overflow: auto; }
|
||||||
.file { display: flex; flex-shrink: 0; align-items: center; gap: 6px; min-width: 0; min-height: 28px; padding: 3px 6px; border: var(--rs-item-selection-width) solid transparent; border-radius: var(--rs-item-selection-radius); background: transparent; color: var(--rs-text); font: inherit; text-align: left; }
|
.file { display: flex; flex-shrink: 0; align-items: center; gap: 6px; min-width: 0; min-height: 28px; padding: 3px 6px; border: var(--rs-item-selection-width) solid transparent; border-radius: var(--rs-item-selection-radius); background: transparent; color: var(--rs-text); font: inherit; text-align: left; }
|
||||||
.file:hover { background: var(--rs-bg-active); }
|
.file:hover { background: var(--rs-hover-bg); }
|
||||||
.file span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
.file span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||||
.details :global(.diff) { min-height: 140px; }
|
.details :global(.diff) { min-height: 140px; }
|
||||||
@container (max-width: 950px) { ol button { grid-template-columns: minmax(0, 1fr) 54px; } .author, .date { display: none; } }
|
@container (max-width: 950px) { ol button { grid-template-columns: minmax(0, 1fr) 54px; } .author, .date { display: none; } }
|
||||||
|
|||||||
@@ -179,20 +179,20 @@
|
|||||||
textarea { box-sizing: border-box; width: 100%; min-height: 60px; resize: vertical; padding: 6px; border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); background: var(--rs-bg); color: var(--rs-text); font: inherit; }
|
textarea { box-sizing: border-box; width: 100%; min-height: 60px; resize: vertical; padding: 6px; border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); background: var(--rs-bg); color: var(--rs-text); font: inherit; }
|
||||||
textarea:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: 1px; }
|
textarea:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: 1px; }
|
||||||
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 28px; padding: 3px 8px; border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); background: var(--rs-bg-elevated); color: var(--rs-text); font: inherit; font-weight: 600; }
|
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 28px; padding: 3px 8px; border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); background: var(--rs-bg-elevated); color: var(--rs-text); font: inherit; font-weight: 600; }
|
||||||
.primary:hover:not(:disabled) { background: var(--rs-bg-active); }
|
.primary:hover:not(:disabled) { background: var(--rs-hover-bg); }
|
||||||
.primary:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: 2px; }
|
.primary:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: 2px; }
|
||||||
.primary:disabled { color: var(--rs-text-dim); }
|
.primary:disabled { color: var(--rs-text-dim); }
|
||||||
small { color: var(--rs-text-dim); line-height: 1.5; }
|
small { color: var(--rs-text-dim); line-height: 1.5; }
|
||||||
.changes { min-width: 0; border-top: 1px solid var(--rs-border); }
|
.changes { min-width: 0; border-top: 1px solid var(--rs-border); }
|
||||||
summary { padding: 8px 4px; border-radius: var(--rs-control-radius); cursor: pointer; font-weight: 600; }
|
summary { padding: 8px 4px; border-radius: var(--rs-control-radius); cursor: pointer; font-weight: 600; }
|
||||||
summary:hover { background: var(--rs-bg-active); }
|
summary:hover { background: var(--rs-hover-bg); }
|
||||||
summary:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: -2px; }
|
summary:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: -2px; }
|
||||||
.group { margin-bottom: 6px; }
|
.group { margin-bottom: 6px; }
|
||||||
.group-header { display: flex; align-items: center; gap: 6px; padding-bottom: 4px; }
|
.group-header { display: flex; align-items: center; gap: 6px; padding-bottom: 4px; }
|
||||||
h3 { flex: 1; margin: 0; padding-left: 4px; font: inherit; font-weight: 600; }
|
h3 { flex: 1; margin: 0; padding-left: 4px; font: inherit; font-weight: 600; }
|
||||||
.row { display: flex; align-items: center; gap: 3px; min-width: 0; }
|
.row { display: flex; align-items: center; gap: 3px; min-width: 0; }
|
||||||
.file { display: flex; flex: 1; align-items: center; gap: 6px; min-width: 0; min-height: 28px; padding: 4px; border: 0; border-radius: var(--rs-control-radius); background: transparent; color: var(--rs-text); font: inherit; text-align: left; }
|
.file { display: flex; flex: 1; align-items: center; gap: 6px; min-width: 0; min-height: 28px; padding: 4px; border: 0; border-radius: var(--rs-control-radius); background: transparent; color: var(--rs-text); font: inherit; text-align: left; }
|
||||||
.file:hover:not(:disabled) { background: var(--rs-bg-active); }
|
.file:hover:not(:disabled) { background: var(--rs-hover-bg); }
|
||||||
.file:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: -2px; }
|
.file:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: -2px; }
|
||||||
.file:disabled { color: var(--rs-text-dim); }
|
.file:disabled { color: var(--rs-text-dim); }
|
||||||
.file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
.file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||||
|
|||||||
@@ -224,7 +224,7 @@
|
|||||||
.password { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; }
|
.password { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; }
|
||||||
.password input { box-sizing: border-box; height: 28px; margin-left: 4px; padding: 2px 6px; border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); background: var(--rs-bg); color: var(--rs-text); font: inherit; }
|
.password input { box-sizing: border-box; height: 28px; margin-left: 4px; padding: 2px 6px; border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); background: var(--rs-bg); color: var(--rs-text); font: inherit; }
|
||||||
.text-button { min-height: 28px; padding: 3px 10px; border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); background: var(--rs-bg-elevated); color: var(--rs-text); font: inherit; }
|
.text-button { min-height: 28px; padding: 3px 10px; border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); background: var(--rs-bg-elevated); color: var(--rs-text); font: inherit; }
|
||||||
.text-button:hover { background: var(--rs-bg-active); }
|
.text-button:hover { background: var(--rs-hover-bg); }
|
||||||
.scroll { flex: 1; min-height: 0; overflow: auto; padding: 16px; }
|
.scroll { flex: 1; min-height: 0; overflow: auto; padding: 16px; }
|
||||||
.scroll:focus-visible { outline-offset: -2px; }
|
.scroll:focus-visible { outline-offset: -2px; }
|
||||||
/* A PDF page is paper: white in both themes. */
|
/* A PDF page is paper: white in both themes. */
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
.source-title > span:first-of-type { min-width: 0; overflow-wrap: anywhere; }
|
.source-title > span:first-of-type { min-width: 0; overflow-wrap: anywhere; }
|
||||||
.line { margin-left: auto; color: var(--rs-text-dim); font-variant-numeric: tabular-nums; }
|
.line { margin-left: auto; color: var(--rs-text-dim); font-variant-numeric: tabular-nums; }
|
||||||
.excerpt { display: -webkit-box; line-clamp: 2; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; font-size: 12px; overflow-wrap: anywhere; }
|
.excerpt { display: -webkit-box; line-clamp: 2; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; font-size: 12px; overflow-wrap: anywhere; }
|
||||||
.toggle:hover, .source:hover { background: var(--rs-bg-active); }
|
.toggle:hover, .source:hover { background: var(--rs-hover-bg); }
|
||||||
.toggle:focus-visible, .source:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: -2px; }
|
.toggle:focus-visible, .source:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: -2px; }
|
||||||
.placeholder, .error { margin: 8px 12px; font-size: 12px; overflow-wrap: anywhere; }
|
.placeholder, .error { margin: 8px 12px; font-size: 12px; overflow-wrap: anywhere; }
|
||||||
.placeholder { color: var(--rs-text-dim); }
|
.placeholder { color: var(--rs-text-dim); }
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
li > button:hover {
|
li > button:hover {
|
||||||
background: var(--rs-bg-active);
|
background: var(--rs-hover-bg);
|
||||||
color: var(--rs-text-strong);
|
color: var(--rs-text-strong);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,7 @@
|
|||||||
.conflict > :global(svg) { width: 18px; height: 18px; flex-shrink: 0; color: var(--rs-warn); }
|
.conflict > :global(svg) { width: 18px; height: 18px; flex-shrink: 0; color: var(--rs-warn); }
|
||||||
.conflict span { flex: 1 1 220px; min-width: 0; }
|
.conflict span { flex: 1 1 220px; min-width: 0; }
|
||||||
.conflict button { min-height: 28px; border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); background: var(--rs-bg); color: var(--rs-text); padding: 4px 10px; }
|
.conflict button { min-height: 28px; border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); background: var(--rs-bg); color: var(--rs-text); padding: 4px 10px; }
|
||||||
.conflict button:hover { background: var(--rs-bg-active); }
|
.conflict button:hover { background: var(--rs-hover-bg); }
|
||||||
.conflict button.primary { border-color: var(--rs-accent); background: var(--rs-accent); color: var(--rs-on-accent); }
|
.conflict button.primary { border-color: var(--rs-accent); background: var(--rs-accent); color: var(--rs-on-accent); }
|
||||||
.conflict button.danger { border-color: var(--rs-error); color: var(--rs-error); }
|
.conflict button.danger { border-color: var(--rs-error); color: var(--rs-error); }
|
||||||
.disk-review { padding: 8px 12px; max-height: 35vh; overflow: auto; flex: 0 0 auto; }
|
.disk-review { padding: 8px 12px; max-height: 35vh; overflow: auto; flex: 0 0 auto; }
|
||||||
|
|||||||
@@ -166,7 +166,7 @@
|
|||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
border-radius: var(--rs-control-radius);
|
border-radius: var(--rs-control-radius);
|
||||||
background: var(--rs-bg-active);
|
background: var(--rs-hover-bg);
|
||||||
color: var(--rs-text-strong);
|
color: var(--rs-text-strong);
|
||||||
font: 600 13px var(--rs-font-ui);
|
font: 600 13px var(--rs-font-ui);
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|||||||
@@ -134,7 +134,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
li button:hover {
|
li button:hover {
|
||||||
background: var(--rs-bg-active);
|
background: var(--rs-hover-bg);
|
||||||
color: var(--rs-text-strong);
|
color: var(--rs-text-strong);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -175,7 +175,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
button:hover {
|
button:hover {
|
||||||
background: var(--rs-bg-active);
|
background: var(--rs-hover-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
|
|||||||
@@ -446,7 +446,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tab:focus-within { box-shadow: inset 0 0 0 var(--rs-item-selection-width) var(--rs-item-selection-border); }
|
.tab:focus-within { box-shadow: inset 0 0 0 var(--rs-item-selection-width) var(--rs-item-selection-border); }
|
||||||
.tab:not(.active):hover { background: var(--rs-bg-active); }
|
.tab:not(.active):hover { background: var(--rs-hover-bg); }
|
||||||
.tab.dragging { opacity: 0.5; }
|
.tab.dragging { opacity: 0.5; }
|
||||||
.tabs:has(.dragging) .tab > button:first-child { cursor: grabbing; }
|
.tabs:has(.dragging) .tab > button:first-child { cursor: grabbing; }
|
||||||
.tab.drop-before::before, .tab.drop-after::after {
|
.tab.drop-before::before, .tab.drop-after::after {
|
||||||
@@ -521,6 +521,6 @@
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--rs-text-dim);
|
color: var(--rs-text-dim);
|
||||||
}
|
}
|
||||||
.all-tabs:hover { background: var(--rs-bg-active); border-color: var(--rs-border); color: var(--rs-text-strong); }
|
.all-tabs:hover { background: var(--rs-hover-bg); border-color: var(--rs-border); color: var(--rs-text-strong); }
|
||||||
.all-tabs svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); }
|
.all-tabs svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -229,7 +229,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.row:hover {
|
.row:hover {
|
||||||
background: var(--rs-bg-active);
|
background: var(--rs-hover-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.row.active {
|
.row.active {
|
||||||
@@ -305,7 +305,7 @@
|
|||||||
|
|
||||||
.row.drop-inside {
|
.row.drop-inside {
|
||||||
outline: 1px solid var(--rs-accent);
|
outline: 1px solid var(--rs-accent);
|
||||||
background: var(--rs-bg-active);
|
background: var(--rs-hover-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.twist {
|
.twist {
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
button :global(svg) { width: 16px; height: 16px; flex-shrink: 0; }
|
button :global(svg) { width: 16px; height: 16px; flex-shrink: 0; }
|
||||||
|
|
||||||
/* Hover gets only a fill. The current choice also gets the selection fill and an accent bar. */
|
/* Hover gets only a fill. The current choice also gets the selection fill and an accent bar. */
|
||||||
button:hover { background: var(--rs-bg-active); color: var(--rs-text-strong); }
|
button:hover { background: var(--rs-hover-bg); color: var(--rs-text-strong); }
|
||||||
button[aria-checked="true"], button[aria-pressed="true"] {
|
button[aria-checked="true"], button[aria-pressed="true"] {
|
||||||
background: var(--rs-item-selection-bg);
|
background: var(--rs-item-selection-bg);
|
||||||
color: var(--rs-text-strong);
|
color: var(--rs-text-strong);
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.access-button { display: flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 32px; padding: 5px 8px; border: 0; border-radius: var(--rs-control-radius); background: transparent; color: var(--rs-text); }
|
.access-button { display: flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 32px; padding: 5px 8px; border: 0; border-radius: var(--rs-control-radius); background: transparent; color: var(--rs-text); }
|
||||||
.access-button:hover, .access-button[aria-expanded="true"] { background: var(--rs-bg-active); }
|
.access-button:hover, .access-button[aria-expanded="true"] { background: var(--rs-hover-bg); }
|
||||||
.access-button:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: -2px; }
|
.access-button:focus-visible { outline: 2px solid var(--rs-focus); outline-offset: -2px; }
|
||||||
.access-button.compact { position: relative; width: 28px; height: 28px; min-height: 28px; padding: 5px; }
|
.access-button.compact { position: relative; width: 28px; height: 28px; min-height: 28px; padding: 5px; }
|
||||||
.access-button.ribbon { justify-content: center; width: 32px; height: 32px; min-height: 32px; padding: 0; }
|
.access-button.ribbon { justify-content: center; width: 32px; height: 32px; min-height: 32px; padding: 0; }
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { BackgroundFrame } from './backgroundContracts.ts';
|
import type { BackgroundFrame } from './backgroundContracts.ts';
|
||||||
|
|
||||||
const positions = ['center', 'top left', 'top', 'top right', 'left', 'right', 'bottom left', 'bottom', 'bottom right'];
|
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', '--rs-menu-bg', '--rs-menu-active-bg', '--rs-menu-backdrop'] 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', '--rs-hover-bg'] as const;
|
||||||
|
|
||||||
function validImage(frame: BackgroundFrame) {
|
function validImage(frame: BackgroundFrame) {
|
||||||
return frame && typeof frame.url === 'string' && /^blob:[^\s"'\\()]+$/.test(frame.url)
|
return frame && typeof frame.url === 'string' && /^blob:[^\s"'\\()]+$/.test(frame.url)
|
||||||
@@ -122,6 +122,7 @@ export class BackgroundHub {
|
|||||||
put('--rs-menu-bg', 'var(--rs-image-menu-bg)');
|
put('--rs-menu-bg', 'var(--rs-image-menu-bg)');
|
||||||
put('--rs-menu-active-bg', 'var(--rs-image-menu-active-bg)');
|
put('--rs-menu-active-bg', 'var(--rs-image-menu-active-bg)');
|
||||||
put('--rs-menu-backdrop', 'var(--rs-image-menu-backdrop)');
|
put('--rs-menu-backdrop', 'var(--rs-image-menu-backdrop)');
|
||||||
|
put('--rs-hover-bg', 'var(--rs-image-hover-bg)');
|
||||||
put('--rs-background-transition-image', previous ? currentImage : 'none');
|
put('--rs-background-transition-image', previous ? currentImage : 'none');
|
||||||
put('--rs-background-previous-image', previous ? previous.image : 'none');
|
put('--rs-background-previous-image', previous ? previous.image : 'none');
|
||||||
put('--rs-background-previous-position', frame.previous?.position ?? frame.position);
|
put('--rs-background-previous-position', frame.previous?.position ?? frame.position);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export const silverSerpent = {
|
|||||||
variants: {
|
variants: {
|
||||||
dark: {
|
dark: {
|
||||||
bg: '#141619', 'bg-elevated': '#1c1e21', 'bg-active': '#2b3034', border: '#3b4046',
|
bg: '#141619', 'bg-elevated': '#1c1e21', 'bg-active': '#2b3034', border: '#3b4046',
|
||||||
text: '#e5e8ec', 'text-dim': '#b3b8be', 'text-strong': '#fcf9ea',
|
text: '#e5e8ec', 'text-dim': '#c2c6cc', 'text-strong': '#fcf9ea',
|
||||||
accent: '#bfd4e7', 'accent-2': '#31d78c', selection: '#0c6944', 'item-selection-bg': '#0c6944a6',
|
accent: '#bfd4e7', 'accent-2': '#31d78c', selection: '#0c6944', 'item-selection-bg': '#0c6944a6',
|
||||||
error: '#ff645f', 'warn-hot': '#fd923e', warn: '#fec84b', ok: '#5cdc78', special: '#fb9989',
|
error: '#ff645f', 'warn-hot': '#fd923e', warn: '#fec84b', ok: '#5cdc78', special: '#fb9989',
|
||||||
'syntax-keyword': '#31d78c', 'syntax-string': '#f0de99', 'syntax-number': '#fda293', 'syntax-comment': '#b2b7bd',
|
'syntax-keyword': '#31d78c', 'syntax-string': '#f0de99', 'syntax-number': '#fda293', 'syntax-comment': '#b2b7bd',
|
||||||
|
|||||||
@@ -37,13 +37,17 @@
|
|||||||
--rs-menu-icon-gap: 8px;
|
--rs-menu-icon-gap: 8px;
|
||||||
--rs-menu-font-size: 13px;
|
--rs-menu-font-size: 13px;
|
||||||
--rs-menu-border: transparent;
|
--rs-menu-border: transparent;
|
||||||
/* Menus are opaque. With a background image, they stay at least 92% opaque and blur the image (UI-043). */
|
/* Menus are opaque (UI-043). With a background image, they use the surface transparency and blur the image (UI-061). */
|
||||||
--rs-menu-bg: var(--rs-bg-elevated);
|
--rs-menu-bg: var(--rs-bg-elevated);
|
||||||
--rs-menu-active-bg: var(--rs-bg-active);
|
--rs-menu-active-bg: var(--rs-bg-active);
|
||||||
--rs-menu-backdrop: none;
|
--rs-menu-backdrop: none;
|
||||||
--rs-image-menu-bg: color-mix(in srgb, var(--rs-bg-elevated) max(92%, var(--rs-surface-opacity)), transparent);
|
--rs-image-menu-bg: color-mix(in srgb, var(--rs-bg-elevated) var(--rs-surface-opacity), transparent);
|
||||||
--rs-image-menu-active-bg: color-mix(in srgb, var(--rs-bg-active) max(92%, var(--rs-surface-opacity)), transparent);
|
--rs-image-menu-active-bg: var(--rs-image-hover-bg);
|
||||||
--rs-image-menu-backdrop: blur(18px) saturate(1.2);
|
--rs-image-menu-backdrop: blur(18px) saturate(1.2);
|
||||||
|
/* The fill of hovered rows and filled controls in the work area. With a background image, a thin veil of the text color
|
||||||
|
keeps the image visible and the hover visible over light and dark image areas (UI-061). */
|
||||||
|
--rs-hover-bg: var(--rs-bg-active);
|
||||||
|
--rs-image-hover-bg: color-mix(in srgb, var(--rs-text-strong) 6%, transparent);
|
||||||
--rs-menu-shadow: 0 8px 30px #0006;
|
--rs-menu-shadow: 0 8px 30px #0006;
|
||||||
--rs-item-selection-radius: var(--rs-control-radius);
|
--rs-item-selection-radius: var(--rs-control-radius);
|
||||||
--rs-item-selection-bg: color-mix(in srgb, var(--rs-accent) 12%, transparent);
|
--rs-item-selection-bg: color-mix(in srgb, var(--rs-accent) 12%, transparent);
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
|
|
||||||
/* Hover gets a neutral fill. An active toggle also gets the accent color and an accent bar. A disabled button is dim. */
|
/* Hover gets a neutral fill. An active toggle also gets the accent color and an accent bar. A disabled button is dim. */
|
||||||
.icon-btn:not(:disabled):hover {
|
.icon-btn:not(:disabled):hover {
|
||||||
background: var(--rs-bg-active);
|
background: var(--rs-hover-bg);
|
||||||
border-color: var(--rs-border);
|
border-color: var(--rs-border);
|
||||||
color: var(--rs-text-strong);
|
color: var(--rs-text-strong);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@
|
|||||||
font: inherit;
|
font: inherit;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.rs-find-button:hover:not(:disabled) { background: var(--rs-bg-active); color: var(--rs-accent); }
|
.rs-find-button:hover:not(:disabled) { background: var(--rs-hover-bg); color: var(--rs-accent); }
|
||||||
.rs-find-options { gap: 4px 14px; color: var(--rs-text-dim); font-size: 12px; }
|
.rs-find-options { gap: 4px 14px; color: var(--rs-text-dim); font-size: 12px; }
|
||||||
.rs-find-options label { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; cursor: pointer; }
|
.rs-find-options label { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; cursor: pointer; }
|
||||||
.rs-find-options input { margin: 0; accent-color: var(--rs-accent); }
|
.rs-find-options input { margin: 0; accent-color: var(--rs-accent); }
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// The native Background feature (src/lib/features/background/): a folder slideshow with mocked host commands, a fade,
|
// The native Background feature (src/lib/features/background/): a folder slideshow with mocked host commands, a fade,
|
||||||
// reduced motion, Next and Pause from the command palette, the targets, menus at 92% with an image and opaque with
|
// reduced motion, Next and Pause from the command palette, the targets, translucent menus and hover fills with an image,
|
||||||
// Background off, a browser window, the settings section in both themes and at 360 pixels, the image source,
|
// opaque menus and hover fills with Background off, a browser window, the settings section in both themes and at
|
||||||
// and the first-start migration from seeded plugin settings and from a seeded image.
|
// 360 pixels, the image source, and the first-start migration from seeded plugin settings and from a seeded image.
|
||||||
import assert from "node:assert/strict";
|
import assert from "node:assert/strict";
|
||||||
import { readFile } from "node:fs/promises";
|
import { readFile } from "node:fs/promises";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
@@ -17,7 +17,7 @@ const PNG = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwM
|
|||||||
function folderCommands(test) {
|
function folderCommands(test) {
|
||||||
const snapshot = { profiles: [{ id: "user", name: "User" }], tabs: [], bookmarks: [], settings: { search: "duckduckgo", adblock: true, linkDestination: "internal", personalRules: "", homepage: "", filterLists: [] } };
|
const snapshot = { profiles: [{ id: "user", name: "User" }], tabs: [], bookmarks: [], settings: { search: "duckduckgo", adblock: true, linkDestination: "internal", personalRules: "", homepage: "", filterLists: [] } };
|
||||||
return {
|
return {
|
||||||
...test.workspace({ root: "C:\\background-feature", files: { "note.md": "# Note\n\nText." } }),
|
...test.workspace({ root: "C:\\background-feature", files: { "note.md": "# Note\n\nText.", "other.md": "# Other" } }),
|
||||||
plugins_snapshot: () => ({ root: "C:/plugins", plugins: [] }),
|
plugins_snapshot: () => ({ root: "C:/plugins", plugins: [] }),
|
||||||
"plugin:window|is_maximized": () => false,
|
"plugin:window|is_maximized": () => false,
|
||||||
spelling_menu_install: () => null,
|
spelling_menu_install: () => null,
|
||||||
@@ -57,6 +57,13 @@ async function command(page, title) {
|
|||||||
await palette.getByRole("button").filter({ hasText: title }).first().waitFor();
|
await palette.getByRole("button").filter({ hasText: title }).first().waitFor();
|
||||||
await page.keyboard.press("Enter");
|
await page.keyboard.press("Enter");
|
||||||
}
|
}
|
||||||
|
// The open file shows the selection tint, so the hover check uses the other file.
|
||||||
|
async function hoverBackground(page) {
|
||||||
|
const row = page.locator('[data-tree-rel="other.md"]');
|
||||||
|
await row.hover();
|
||||||
|
return row.evaluate(node => getComputedStyle(node).backgroundColor);
|
||||||
|
}
|
||||||
|
|
||||||
async function menuBackground(page) {
|
async function menuBackground(page) {
|
||||||
await page.locator('[data-tree-rel="note.md"]').click({ button: "right" });
|
await page.locator('[data-tree-rel="note.md"]').click({ button: "right" });
|
||||||
const menu = page.getByRole("menu", { name: "File actions", exact: true });
|
const menu = page.getByRole("menu", { name: "File actions", exact: true });
|
||||||
@@ -111,14 +118,20 @@ await runSmoke("features/background", async ({ browser }) => {
|
|||||||
assert.equal(await main.locator(".workarea-background").evaluate(node => node.getAnimations({ subtree: true }).length), 0, "Reduced motion has no fade");
|
assert.equal(await main.locator(".workarea-background").evaluate(node => node.getAnimations({ subtree: true }).length), 0, "Reduced motion has no fade");
|
||||||
await main.emulateMedia({ reducedMotion: "no-preference" });
|
await main.emulateMedia({ reducedMotion: "no-preference" });
|
||||||
|
|
||||||
// With an image, menus are at least 92% opaque and blur it (UI-043).
|
// With an image, menus use the surface transparency (82% by default) and blur it. Hover fills and the workspace button
|
||||||
assert.match(await menuBackground(main), /0\.92/);
|
// are a thin veil, so the image stays visible (UI-061).
|
||||||
|
assert.match(await menuBackground(main), /0\.82/);
|
||||||
|
const translucent = /(\/ 0\.06\)|, 0\.06\))$/;
|
||||||
|
assert.match(await hoverBackground(main), translucent, "A hovered row keeps the image visible");
|
||||||
|
assert.match(await main.locator(".workspace-button").evaluate(node => getComputedStyle(node).backgroundColor), translucent, "The workspace button keeps the image visible");
|
||||||
|
await main.screenshot({ path: path.join(output, "hover-over-image.png") });
|
||||||
|
|
||||||
// Targets: only the boards removes the workspace frame. The frame of all boards stays for Project Management.
|
// Targets: only the boards removes the workspace frame. The frame of all boards stays for Project Management.
|
||||||
await main.evaluate(() => window.__TEST__.writeSettings("background", { ...window.__TEST__.settings("background"), targets: ["pm-all"] }));
|
await main.evaluate(() => window.__TEST__.writeSettings("background", { ...window.__TEST__.settings("background"), targets: ["pm-all"] }));
|
||||||
await main.waitForFunction(() => document.body.style.getPropertyValue("--rs-background-image") === "");
|
await main.waitForFunction(() => document.body.style.getPropertyValue("--rs-background-image") === "");
|
||||||
assert.equal(await main.evaluate(async () => !!(await import("/src/lib/plugins/backgrounds.ts")).backgroundHub.get("pm-all")), true);
|
assert.equal(await main.evaluate(async () => !!(await import("/src/lib/plugins/backgrounds.ts")).backgroundHub.get("pm-all")), true);
|
||||||
assert.match(await menuBackground(main), /^rgb\(/, "Without a workspace image, menus are opaque");
|
assert.match(await menuBackground(main), /^rgb\(/, "Without a workspace image, menus are opaque");
|
||||||
|
assert.match(await hoverBackground(main), /^rgb\(/, "Without a workspace image, hover fills are opaque");
|
||||||
await main.evaluate(() => window.__TEST__.writeSettings("background", { ...window.__TEST__.settings("background"), targets: ["app"] }));
|
await main.evaluate(() => window.__TEST__.writeSettings("background", { ...window.__TEST__.settings("background"), targets: ["app"] }));
|
||||||
await waitForChange(main, "");
|
await waitForChange(main, "");
|
||||||
|
|
||||||
|
|||||||
@@ -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');
|
assert.ok(compactHeight < previousHeight * .85, 'The same actions use at least 15% less vertical space');
|
||||||
console.log(JSON.stringify({ theme, compactHeight, previousHeight }));
|
console.log(JSON.stringify({ theme, compactHeight, previousHeight }));
|
||||||
await page.screenshot({ path: path.join(output, `menu-spacing-after-${theme}.png`) });
|
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.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.ok(reference.inset >= 5, "Rows need an inset from the panel border");
|
||||||
assert.equal(await item("Pin").locator("svg.action-icon").count(), 1);
|
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)));
|
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");
|
assert.equal(new Set(offsets).size, 1, "All file labels align");
|
||||||
await page.screenshot({ path: path.join(output, `menu-file-${theme}.png`) });
|
await page.screenshot({ path: path.join(output, `menu-file-${theme}.png`) });
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ test('a new app frame changes only the custom properties with a new value', () =
|
|||||||
setProperty: (key: string, value: string) => { writes.push(key); properties.set(key, value); }, removeProperty: (key: string) => { properties.delete(key); } };
|
setProperty: (key: string, value: string) => { writes.push(key); properties.set(key, value); }, removeProperty: (key: string) => { properties.delete(key); } };
|
||||||
const hub = new BackgroundHub(() => ({ style }) as unknown as HTMLElement), owner = Symbol();
|
const hub = new BackgroundHub(() => ({ style }) as unknown as HTMLElement), owner = Symbol();
|
||||||
hub.set(owner, 'app', frame);
|
hub.set(owner, 'app', frame);
|
||||||
assert.equal(writes.length, 19);
|
assert.equal(writes.length, 20);
|
||||||
writes.length = 0;
|
writes.length = 0;
|
||||||
hub.set(owner, 'app', { ...frame, url: 'blob:http://localhost/second' });
|
hub.set(owner, 'app', { ...frame, url: 'blob:http://localhost/second' });
|
||||||
assert.deepEqual(writes, ['--rs-background-image']);
|
assert.deepEqual(writes, ['--rs-background-image']);
|
||||||
@@ -154,6 +154,6 @@ test('a new app frame changes only the custom properties with a new value', () =
|
|||||||
assert.equal(properties.size, 0);
|
assert.equal(properties.size, 0);
|
||||||
writes.length = 0;
|
writes.length = 0;
|
||||||
hub.set(owner, 'app', frame);
|
hub.set(owner, 'app', frame);
|
||||||
assert.equal(writes.length, 19, 'After a removal, the next frame writes every property again');
|
assert.equal(writes.length, 20, 'After a removal, the next frame writes every property again');
|
||||||
hub.removeOwner(owner);
|
hub.removeOwner(owner);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -35,12 +35,15 @@ function roles(theme: string) {
|
|||||||
const foregrounds = {
|
const foregrounds = {
|
||||||
ui: { dim, text, strong },
|
ui: { dim, text, strong },
|
||||||
accents: { accent, secondary: palette['accent-2'] },
|
accents: { accent, secondary: palette['accent-2'] },
|
||||||
|
// A menu or pane row shows interface text and the main accent. Syntax and the second accent show only in documents.
|
||||||
|
rows: { dim, text, strong, accent },
|
||||||
syntax: Object.fromEntries(SYNTAX_ROLES.map(role => [`syntax-${role}`, palette[`syntax-${role}`]])),
|
syntax: Object.fromEntries(SYNTAX_ROLES.map(role => [`syntax-${role}`, palette[`syntax-${role}`]])),
|
||||||
};
|
};
|
||||||
const surfaces = {
|
const surfaces = {
|
||||||
bg, elevated, active, selection, editorOnWhite, panelOnWhite,
|
bg, elevated, active, selection, editorOnWhite, panelOnWhite,
|
||||||
codeBlockOnWhite: mix(elevated, editorOnWhite, 0.82),
|
codeBlockOnWhite: mix(elevated, editorOnWhite, 0.82),
|
||||||
menuHoverOnWhite: mix(active, panelOnWhite, 0.82),
|
// Over an image, a hovered menu or pane row is a 6% veil of text-strong on the tinted panel (UI-061).
|
||||||
|
hoverOnWhite: mix(strong, panelOnWhite, 0.06),
|
||||||
controlHoverOnWhite: mix(active, '#ffffff', 0.92),
|
controlHoverOnWhite: mix(active, '#ffffff', 0.92),
|
||||||
};
|
};
|
||||||
return { foregrounds, surfaces };
|
return { foregrounds, surfaces };
|
||||||
@@ -60,7 +63,8 @@ const readable: { theme: string; name: string; checks: Check[] }[] = [
|
|||||||
[['ui'], ['panelOnWhite']],
|
[['ui'], ['panelOnWhite']],
|
||||||
] },
|
] },
|
||||||
{ theme: 'silver-serpent', name: 'Silver Serpent', checks: [
|
{ theme: 'silver-serpent', name: 'Silver Serpent', checks: [
|
||||||
[['ui', 'accents', 'syntax'], ['bg', 'elevated', 'active', 'selection', 'panelOnWhite', 'editorOnWhite', 'menuHoverOnWhite', 'controlHoverOnWhite', 'codeBlockOnWhite']],
|
[['ui', 'accents', 'syntax'], ['bg', 'elevated', 'active', 'selection', 'panelOnWhite', 'editorOnWhite', 'controlHoverOnWhite', 'codeBlockOnWhite']],
|
||||||
|
[['rows'], ['hoverOnWhite']],
|
||||||
] },
|
] },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user