PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 0.9.6
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v0.9.6
1.1.10 1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6 0.9.4 0.9.5 0.9.3 0.9.2 0.9.1 0.9.0 0.8.9 0.8.8 0.8.7 All 34 releases
desktop-mode / assets / css / variables.css

variables.css in OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin 0.9.6, at assets/css/variables.css

230 lines 8.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Desktop Mode — CSS Custom Properties.
3 *
4 * All design tokens for the desktop shell. Per-scheme blocks below
5 * retune the accent + titlebar colors to match the user's WordPress
6 * admin color scheme — the shell root gets a `data-desktop-mode-scheme`
7 * attribute in PHP so the right block wins before first paint.
8 *
9 * Palette source: wp-admin/css/colors/<scheme>/colors.scss in Core.
10 * We read the `base` color as the focused title bar background (same
11 * visual weight as the admin sidebar the user is used to) and the
12 * `highlight` color as `--wp-admin-theme-color`, which Core publishes
13 * as the accent — buttons, tabs, focus rings.
14 *
15 * @since 6.9.0
16 */
17
18 :root {
19 /* Desktop area */
20 --desktop-mode-bg: linear-gradient(135deg, #1d2327 0%, #2c3338 50%, #1d2327 100%);
21 --desktop-mode-area-inset: 0;
22
23 /* Window chrome */
24 --desktop-mode-window-bg: #fff;
25 --desktop-mode-window-border: rgba(0, 0, 0, 0.12);
26 --desktop-mode-window-radius: 8px;
27 --desktop-mode-window-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.15);
28 --desktop-mode-window-shadow-focused: 0 12px 48px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);
29
30 /* Title bar — focused bg/color resolve via the scheme overrides below. */
31 --desktop-mode-titlebar-bg: #f0f0f1;
32 --desktop-mode-titlebar-bg-focused: var(--wp-admin-theme-color, #2271b1);
33 --desktop-mode-titlebar-color: #50575e;
34 --desktop-mode-titlebar-color-focused: #fff;
35 --desktop-mode-titlebar-height: 40px;
36
37 /* Admin accent. Each scheme block below retunes this; the fallback
38 * matches the legacy hardcoded value so nothing regresses if the
39 * root has no data-desktop-mode-scheme attribute (e.g. tests). */
40 --wp-admin-theme-color: #2271b1;
41
42 /* Resize handle — larger hit area than visual glyph; corners
43 are transparent until hover so they don't compete with the
44 window's own drop shadow. */
45 --desktop-mode-resize-size: 20px;
46 --desktop-mode-resize-color: rgba(0, 0, 0, 0.15);
47
48 /* Dock */
49 --desktop-mode-dock-width: 56px;
50 --desktop-mode-dock-icon-size: 20px;
51 --desktop-mode-dock-bg: rgba(0, 0, 0, 0.4);
52 --desktop-mode-dock-border: rgba(255, 255, 255, 0.08);
53
54 /*
55 * File tiles — anywhere a `.desktop-mode-file-tile` (or sibling
56 * canvas tile) renders. The defaults below match the wallpaper
57 * (dark gradient → white text + soft white hover). Light-on-dark
58 * surfaces override these in their own scope, e.g.:
59 *
60 * .desktop-mode-folder-window {
61 * --desktop-mode-tile-fg: #1d2327;
62 * --desktop-mode-tile-hover-bg: rgba(0, 0, 0, 0.06);
63 * }
64 *
65 * Plugin authors can override any of these in their own theme
66 * to retint tiles globally without touching the rules below.
67 *
68 * @since 0.8.0
69 */
70 --desktop-mode-tile-fg: var(--desktop-mode-fg, #fff);
71 --desktop-mode-tile-fg-muted: rgba(255, 255, 255, 0.7);
72 --desktop-mode-tile-hover-bg: rgba(255, 255, 255, 0.12);
73 --desktop-mode-tile-focus-ring: var(--wp-admin-theme-color, #2271b1);
74 --desktop-mode-tile-shortcut-bg: rgba(0, 0, 0, 0.65);
75 --desktop-mode-tile-shortcut-fg: #fff;
76 --desktop-mode-tile-shortcut-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
77
78 /*
79 * Label rendering tokens. Defaults match the dark wallpaper:
80 * a soft drop-shadow boosts legibility against the gradient,
81 * regular weight, default antialiasing.
82 *
83 * Light-context surfaces (folder windows, My WordPress, any
84 * future window with a light body) rebind these in their own
85 * scope so tile labels render with the same crispness as the
86 * surrounding chrome — no per-surface duplicate rules.
87 *
88 * @since 0.8.0
89 */
90 --desktop-mode-tile-label-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
91 --desktop-mode-tile-label-weight: 400;
92 --desktop-mode-tile-label-smoothing: auto;
93 --desktop-mode-tile-label-color: var(--desktop-mode-tile-fg);
94
95 /* Z-index layers */
96 --desktop-mode-z-base: 100;
97 --desktop-mode-z-dock: 200;
98 --desktop-mode-z-adminbar: 9991;
99 --desktop-mode-z-fullscreen: 99999;
100 /* Window-link layer — above widgets (z 1), behind windows (z 100+). */
101 --desktop-mode-z-window-links: 50;
102
103 /*
104 * Window-link ties (relation splines between windows). The accent
105 * follows the admin color scheme. Solid colors only — the resting
106 * dimming is done with stroke-opacity/fill-opacity in
107 * window-links.css, NOT color-mix(): an unresolvable color-mix()
108 * inside a custom property makes the consuming declaration invalid
109 * at computed-value time, which turns SVG strokes invisible and
110 * marker fills black (the written rgba() fallback declaration is
111 * already gone from the cascade by then). Overridable per scheme
112 * or by plugins/themes without touching the renderer.
113 *
114 * @since 0.9.4
115 */
116 --desktop-mode-window-link-color: var(--wp-admin-theme-color, #2271b1);
117 --desktop-mode-window-link-color-active: var(--wp-admin-theme-color, #2271b1);
118 --desktop-mode-window-link-width: 1.5px;
119 --desktop-mode-window-link-accent: var(--wp-admin-theme-color, #2271b1);
120 /*
121 * Halo behind related windows (`.desktop-mode-window--linked`).
122 * A literal rgba of the default admin blue rather than a
123 * color-mix() of the accent — same no-color-mix rationale as
124 * above: if this token failed to resolve, the whole box-shadow
125 * declaration (elevation shadow included) would go invalid.
126 * Schemes/plugins that retint the accent should override this too.
127 */
128 --desktop-mode-window-link-glow: rgba(34, 113, 177, 0.45);
129 }
130
131 /*
132 * Per-scheme overrides. Scoped to `.desktop-mode-shell[data-desktop-mode-scheme]`
133 * so the variables only affect the shell subtree — we don't want to touch
134 * Gutenberg or other nested contexts that also read `--wp-admin-theme-color`.
135 *
136 * Setting the vars on the shell root means any descendant (title bar,
137 * dock chip, tab underlines, focus rings) that references them inherits
138 * the right hue without further plumbing.
139 *
140 * Title bar bg deliberately differs from the WP admin bar (which uses
141 * each scheme's "base" color) — when the two sit edge-to-edge the
142 * shared hue reads as one slab. We mix base with white (dark schemes)
143 * or black (light schemes) ~15–20% so the titlebar feels related but
144 * clearly distinct.
145 */
146
147 /*
148 * The focused titlebar colors below are the pre-computed sRGB result
149 * of each scheme's base color mixed with white (dark schemes) or
150 * black (light schemes). We used to write these as
151 * `color-mix(in srgb, …)` calls, but `color-mix()` only shipped in
152 * Chrome 111 — on older Chromium-based browsers the whole declaration
153 * is invalid-at-computed-value-time and the titlebar falls back to
154 * the unfocused light surface, which hides the white control glyphs.
155 * Since the mix inputs are all static there is no behavioral loss
156 * from inlining the resulting hex value.
157 */
158
159 /* Fresh — default WP blue. */
160 .desktop-mode-shell[data-desktop-mode-scheme="fresh"] {
161 --wp-admin-theme-color: #2271b1;
162 /* color-mix(in srgb, #1d2327 80%, #fff 20%) */
163 --desktop-mode-titlebar-bg-focused: #4a4f52;
164 --desktop-mode-titlebar-color-focused: #fff;
165 }
166
167 /* Light — pale sidebar, teal accent. */
168 .desktop-mode-shell[data-desktop-mode-scheme="light"] {
169 --wp-admin-theme-color: #04a4cc;
170 /* color-mix(in srgb, #e5e5e5 85%, #000 15%) */
171 --desktop-mode-titlebar-bg-focused: #c3c3c3;
172 --desktop-mode-titlebar-color-focused: #333;
173 }
174
175 /* Modern — vivid indigo accent, near-black sidebar. */
176 .desktop-mode-shell[data-desktop-mode-scheme="modern"] {
177 --wp-admin-theme-color: #3858e9;
178 /* color-mix(in srgb, #1e1e1e 78%, #fff 22%) */
179 --desktop-mode-titlebar-bg-focused: #505050;
180 --desktop-mode-titlebar-color-focused: #f3f1f1;
181 }
182
183 /* Blue. */
184 .desktop-mode-shell[data-desktop-mode-scheme="blue"] {
185 --wp-admin-theme-color: #096484;
186 /* color-mix(in srgb, #096484 82%, #fff 18%) */
187 --desktop-mode-titlebar-bg-focused: #35809a;
188 --desktop-mode-titlebar-color-focused: #e5f8ff;
189 }
190
191 /* Coffee. */
192 .desktop-mode-shell[data-desktop-mode-scheme="coffee"] {
193 --wp-admin-theme-color: #c7a589;
194 /* color-mix(in srgb, #46403c 80%, #fff 20%) */
195 --desktop-mode-titlebar-bg-focused: #6b6663;
196 --desktop-mode-titlebar-color-focused: #ece6f6;
197 }
198
199 /* Ectoplasm. */
200 .desktop-mode-shell[data-desktop-mode-scheme="ectoplasm"] {
201 --wp-admin-theme-color: #a3b745;
202 /* color-mix(in srgb, #413256 80%, #fff 20%) */
203 --desktop-mode-titlebar-bg-focused: #675b78;
204 --desktop-mode-titlebar-color-focused: #ece6f6;
205 }
206
207 /* Midnight. */
208 .desktop-mode-shell[data-desktop-mode-scheme="midnight"] {
209 --wp-admin-theme-color: #e14d43;
210 /* color-mix(in srgb, #25282b 80%, #fff 20%) */
211 --desktop-mode-titlebar-bg-focused: #515355;
212 --desktop-mode-titlebar-color-focused: #f1f2f3;
213 }
214
215 /* Ocean. */
216 .desktop-mode-shell[data-desktop-mode-scheme="ocean"] {
217 --wp-admin-theme-color: #9ebaa0;
218 /* color-mix(in srgb, #627c83 80%, #fff 20%) */
219 --desktop-mode-titlebar-bg-focused: #81969c;
220 --desktop-mode-titlebar-color-focused: #f2fcff;
221 }
222
223 /* Sunrise. */
224 .desktop-mode-shell[data-desktop-mode-scheme="sunrise"] {
225 --wp-admin-theme-color: #dd823b;
226 /* color-mix(in srgb, #b43c38 80%, #fff 20%) */
227 --desktop-mode-titlebar-bg-focused: #c36360;
228 --desktop-mode-titlebar-color-focused: #f3f1f1;
229 }
230