PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 0.8.9
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v0.8.9
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.8.9, at assets/css/variables.css

201 lines 7.5 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 }
101
102 /*
103 * Per-scheme overrides. Scoped to `.desktop-mode-shell[data-desktop-mode-scheme]`
104 * so the variables only affect the shell subtree — we don't want to touch
105 * Gutenberg or other nested contexts that also read `--wp-admin-theme-color`.
106 *
107 * Setting the vars on the shell root means any descendant (title bar,
108 * dock chip, tab underlines, focus rings) that references them inherits
109 * the right hue without further plumbing.
110 *
111 * Title bar bg deliberately differs from the WP admin bar (which uses
112 * each scheme's "base" color) — when the two sit edge-to-edge the
113 * shared hue reads as one slab. We mix base with white (dark schemes)
114 * or black (light schemes) ~15–20% so the titlebar feels related but
115 * clearly distinct.
116 */
117
118 /*
119 * The focused titlebar colors below are the pre-computed sRGB result
120 * of each scheme's base color mixed with white (dark schemes) or
121 * black (light schemes). We used to write these as
122 * `color-mix(in srgb, …)` calls, but `color-mix()` only shipped in
123 * Chrome 111 — on older Chromium-based browsers the whole declaration
124 * is invalid-at-computed-value-time and the titlebar falls back to
125 * the unfocused light surface, which hides the white control glyphs.
126 * Since the mix inputs are all static there is no behavioral loss
127 * from inlining the resulting hex value.
128 */
129
130 /* Fresh — default WP blue. */
131 .desktop-mode-shell[data-desktop-mode-scheme="fresh"] {
132 --wp-admin-theme-color: #2271b1;
133 /* color-mix(in srgb, #1d2327 80%, #fff 20%) */
134 --desktop-mode-titlebar-bg-focused: #4a4f52;
135 --desktop-mode-titlebar-color-focused: #fff;
136 }
137
138 /* Light — pale sidebar, teal accent. */
139 .desktop-mode-shell[data-desktop-mode-scheme="light"] {
140 --wp-admin-theme-color: #04a4cc;
141 /* color-mix(in srgb, #e5e5e5 85%, #000 15%) */
142 --desktop-mode-titlebar-bg-focused: #c3c3c3;
143 --desktop-mode-titlebar-color-focused: #333;
144 }
145
146 /* Modern — vivid indigo accent, near-black sidebar. */
147 .desktop-mode-shell[data-desktop-mode-scheme="modern"] {
148 --wp-admin-theme-color: #3858e9;
149 /* color-mix(in srgb, #1e1e1e 78%, #fff 22%) */
150 --desktop-mode-titlebar-bg-focused: #505050;
151 --desktop-mode-titlebar-color-focused: #f3f1f1;
152 }
153
154 /* Blue. */
155 .desktop-mode-shell[data-desktop-mode-scheme="blue"] {
156 --wp-admin-theme-color: #096484;
157 /* color-mix(in srgb, #096484 82%, #fff 18%) */
158 --desktop-mode-titlebar-bg-focused: #35809a;
159 --desktop-mode-titlebar-color-focused: #e5f8ff;
160 }
161
162 /* Coffee. */
163 .desktop-mode-shell[data-desktop-mode-scheme="coffee"] {
164 --wp-admin-theme-color: #c7a589;
165 /* color-mix(in srgb, #46403c 80%, #fff 20%) */
166 --desktop-mode-titlebar-bg-focused: #6b6663;
167 --desktop-mode-titlebar-color-focused: #ece6f6;
168 }
169
170 /* Ectoplasm. */
171 .desktop-mode-shell[data-desktop-mode-scheme="ectoplasm"] {
172 --wp-admin-theme-color: #a3b745;
173 /* color-mix(in srgb, #413256 80%, #fff 20%) */
174 --desktop-mode-titlebar-bg-focused: #675b78;
175 --desktop-mode-titlebar-color-focused: #ece6f6;
176 }
177
178 /* Midnight. */
179 .desktop-mode-shell[data-desktop-mode-scheme="midnight"] {
180 --wp-admin-theme-color: #e14d43;
181 /* color-mix(in srgb, #25282b 80%, #fff 20%) */
182 --desktop-mode-titlebar-bg-focused: #515355;
183 --desktop-mode-titlebar-color-focused: #f1f2f3;
184 }
185
186 /* Ocean. */
187 .desktop-mode-shell[data-desktop-mode-scheme="ocean"] {
188 --wp-admin-theme-color: #9ebaa0;
189 /* color-mix(in srgb, #627c83 80%, #fff 20%) */
190 --desktop-mode-titlebar-bg-focused: #81969c;
191 --desktop-mode-titlebar-color-focused: #f2fcff;
192 }
193
194 /* Sunrise. */
195 .desktop-mode-shell[data-desktop-mode-scheme="sunrise"] {
196 --wp-admin-theme-color: #dd823b;
197 /* color-mix(in srgb, #b43c38 80%, #fff 20%) */
198 --desktop-mode-titlebar-bg-focused: #c36360;
199 --desktop-mode-titlebar-color-focused: #f3f1f1;
200 }
201