PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.0.1
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.0.1
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 / my-wordpress-woocommerce.css

my-wordpress-woocommerce.css in OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin 1.0.1, at assets/css/my-wordpress-woocommerce.css

512 lines 12.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * WooCommerce panels inside the site window.
3 *
4 * Two mount points, both provided by the site window's extension
5 * actions: the preview pane's `header` slot (product / order / coupon
6 * facts) and the folder view's group slot (store totals). The panel
7 * markup is identical in both, so one rule set covers them.
8 *
9 * Uses the shell's own custom properties throughout so the panels
10 * follow the active desktop theme and colour scheme without a single
11 * hard-coded colour beyond the status tints.
12 */
13
14 .os-woo-panel {
15 margin-block-end: 16px;
16 padding: 12px 14px;
17 border: 1px solid var( --os-ui-border, rgba( 0, 0, 0, 0.12 ) );
18 border-radius: 8px;
19 background: var( --os-ui-bg-subtle, rgba( 0, 0, 0, 0.02 ) );
20 }
21
22 .os-woo-panel__title {
23 margin: 0 0 10px;
24 font-size: 12px;
25 font-weight: 600;
26 letter-spacing: 0.04em;
27 text-transform: uppercase;
28 color: var( --os-ui-fg-muted, #787c82 );
29 }
30
31 .os-woo-panel__rows {
32 display: grid;
33 /* `auto` label column so long values keep the space they need,
34 * with a floor that stops one-word labels collapsing. */
35 grid-template-columns: minmax( 90px, auto ) 1fr;
36 gap: 6px 14px;
37 margin: 0;
38 font-size: 13px;
39 }
40
41 /* Each row is its own grid item pair — `display: contents` lets the
42 * wrapper carry the semantics (`<div>` grouping a `<dt>`/`<dd>`)
43 * while the two children land directly in the parent grid's columns. */
44 .os-woo-panel__row {
45 display: contents;
46 }
47
48 .os-woo-panel__label {
49 margin: 0;
50 color: var( --os-ui-fg-muted, #787c82 );
51 }
52
53 .os-woo-panel__value {
54 margin: 0;
55 color: var( --os-ui-fg, inherit );
56 overflow-wrap: anywhere;
57 }
58
59 /* Placeholder rows hold the panel's final height from the first
60 * frame, so the real data swaps in without shoving the folder tiles
61 * or the preview content down. Each placeholder is two grid cells
62 * carrying a muted bar. */
63 .os-woo-panel__row--placeholder > span {
64 display: block;
65 height: 1em;
66 border-radius: 3px;
67 background: var( --os-ui-border, rgba( 0, 0, 0, 0.09 ) );
68 }
69
70 /* The value column reads as the "content" bar — narrower than its
71 * cell so the shell doesn't look like a solid block. */
72 .os-woo-panel__row--placeholder > span:last-child {
73 width: 60%;
74 }
75
76 @media ( prefers-reduced-motion: no-preference ) {
77 .os-woo-panel[ aria-busy='true' ]
78 .os-woo-panel__row--placeholder > span {
79 animation: os-woo-pulse 1.4s ease-in-out infinite;
80 }
81 }
82
83 @keyframes os-woo-pulse {
84 0%,
85 100% {
86 opacity: 1;
87 }
88
89 50% {
90 opacity: 0.45;
91 }
92 }
93
94 .os-woo-panel__error {
95 grid-column: 1 / -1;
96 margin: 0;
97 color: var( --os-ui-fg-muted, #787c82 );
98 font-size: 13px;
99 }
100
101 .os-woo-panel__was {
102 color: var( --os-ui-fg-muted, #787c82 );
103 margin-inline-end: 4px;
104 }
105
106 /* ----- Status pills -----
107 *
108 * `<os-badge>` owns the pill shape, the tone-coded dot and the
109 * theming tokens. Nothing to style here beyond keeping it on the
110 * baseline of its row. */
111 .os-woo-panel__pill {
112 vertical-align: middle;
113 }
114
115 /* ----- Order line items ----- */
116
117 .os-woo-panel__items {
118 margin: 0;
119 padding: 0;
120 list-style: none;
121 }
122
123 .os-woo-panel__item {
124 display: flex;
125 justify-content: space-between;
126 gap: 12px;
127 padding-block: 2px;
128 }
129
130 .os-woo-panel__item-total {
131 color: var( --os-ui-fg-muted, #787c82 );
132 white-space: nowrap;
133 }
134
135 .os-woo-panel__email,
136 .os-woo-panel__link {
137 color: var( --os-ui-accent, #2271b1 );
138 }
139
140 .os-woo-panel__item-qty {
141 color: var( --os-ui-fg-muted, #787c82 );
142 margin-inline-end: 4px;
143 }
144
145 /* ----- Tile badges ----- */
146
147 /* Out-of-stock (and low-stock / sale) products carry a corner ribbon
148 * on the tile itself, not just a band heading — a merchant scanning
149 * the grid shouldn't have to read headings to spot an empty shelf.
150 *
151 * `<os-ribbon>` owns the 45° slice, the clipping and the tone
152 * colours; all that's needed here is to keep it off the pointer and
153 * step the type down to suit an 88px tile. The tile is already
154 * `position: absolute`, which is the positioned parent the ribbon
155 * anchors to. */
156 os-ribbon.os-woo-ribbon {
157 /* The component defaults to a 90px corner window with a 140px
158 * banner — sized for a card, which swallows a tile whole. These
159 * custom properties are its documented tuning surface. Values
160 * here suit the large product tile (104px image well); the
161 * regular-tile fallback below steps them down again. */
162 --os-ui-ribbon-size: 64px;
163 --os-ui-ribbon-banner-width: 92px;
164 --os-ui-ribbon-padding: 3px 0;
165 --os-ui-ribbon-font: 700 9px/1.4 var( --os-font, system-ui );
166 --os-ui-ribbon-tracking: 0.03em;
167 pointer-events: none;
168 }
169
170 /* Regular-sized tiles (a section that didn't opt into `tileSize:
171 * 'large'`) get a proportionally smaller ribbon. */
172 .os-my-wordpress__tiles:not( .os-my-wordpress__tiles--large )
173 os-ribbon.os-woo-ribbon {
174 --os-ui-ribbon-size: 52px;
175 --os-ui-ribbon-banner-width: 76px;
176 --os-ui-ribbon-padding: 2px 0;
177 --os-ui-ribbon-font: 700 8px/1.4 var( --os-font, system-ui );
178 }
179
180 /* ----- Store panel on the folder view ----- */
181
182 .os-my-wordpress__group-extras:empty {
183 display: none;
184 }
185
186 .os-my-wordpress__group-extras {
187 padding: 12px 16px 0;
188 }
189
190 .os-woo-panel--store .os-woo-panel__rows {
191 /* Three headline numbers read better side by side than stacked,
192 * and the folder view has the full window width to spend. */
193 grid-template-columns: repeat( auto-fit, minmax( 160px, 1fr ) );
194 gap: 4px 24px;
195 }
196
197 .os-woo-panel--store .os-woo-panel__row {
198 display: flex;
199 flex-direction: column;
200 gap: 2px;
201 }
202
203 .os-woo-panel--store .os-woo-panel__value {
204 font-size: 20px;
205 font-weight: 600;
206 }
207
208 /* ----- Customer tiles ----- */
209
210 /*
211 * The band badge, for VIP and lapsed only.
212 *
213 * It lives INSIDE the 48px avatar box, straddling its bottom edge —
214 * the way a status dot sits on a contact photo. That costs the tile
215 * no vertical space, so the icon stays an icon: a face, a name, and
216 * at most one mark. Everything else about a customer (spend, orders,
217 * last purchase) is one click away in the pane, which has room to say
218 * it properly.
219 *
220 * Two rejected alternatives, both tried: `<os-ribbon>`, the 45°
221 * corner banner the Products grid uses — right across a product
222 * photo, vandalism across a face, covering a third of the avatar at
223 * this size. And a line of text under the name — spend and order
224 * count stacked above a 48px avatar crowd the tile past reading, and
225 * they push the name down the grid.
226 */
227 .os-woo-customer-avatar {
228 position: relative;
229 /* The badge is wider than 48px and must not be clipped. */
230 overflow: visible;
231 }
232
233 .os-woo-customer-band {
234 position: absolute;
235 inset-block-end: -4px;
236 inset-inline-start: 50%;
237 transform: translateX( -50% );
238 z-index: 1;
239 padding: 0 5px;
240 border-radius: 999px;
241 font-size: 8px;
242 font-weight: 700;
243 line-height: 14px;
244 letter-spacing: 0.04em;
245 text-transform: uppercase;
246 white-space: nowrap;
247 pointer-events: none;
248 }
249
250 /*
251 * A solid surface under the tone, because this sits ON a photograph:
252 * the 12%-alpha wash `<os-badge>` uses would take whatever colour the
253 * avatar happens to be. The tone survives as the text and the ring,
254 * read from the same tokens (and the same fallback literals) the
255 * panel's band pill uses — so tile and pane can never disagree, and a
256 * desktop theme moves both at once.
257 */
258 .os-woo-customer-band--vip,
259 .os-woo-customer-band--lapsed {
260 background: var( --os-ui-surface, #fff );
261 box-shadow:
262 inset 0 0 0 1px currentColor,
263 0 1px 3px rgba( 0, 0, 0, 0.35 );
264 }
265
266 .os-woo-customer-band--vip {
267 color: var( --os-ui-badge-success, var( --os-ui-success-fg, #1a7f37 ) );
268 }
269
270 .os-woo-customer-band--lapsed {
271 color: var( --os-ui-badge-warning, var( --os-ui-warning-fg, #9a6700 ) );
272 }
273
274 /*
275 * RTL: `translateX(-50%)` is a physical transform, so the logical
276 * `inset-inline-start` above would place the badge correctly and the
277 * transform would then drag it the wrong way.
278 */
279 [ dir='rtl' ] .os-woo-customer-band {
280 transform: translateX( 50% );
281 }
282
283 /* ----- Customer panel ----- */
284
285 /*
286 * The band pill sits inline after the lifetime-spend figure, so it
287 * needs to sit on the text baseline rather than on the line box —
288 * otherwise it rides high next to the larger spend number.
289 */
290 .os-woo-panel--customer .os-woo-panel__pill {
291 vertical-align: baseline;
292 }
293
294 /* ----- The Customer window ----- */
295
296 /*
297 * A native window on one person. The layout is a single column with
298 * generous vertical rhythm rather than a dashboard grid: this is a
299 * thing you READ — who they are, what they're worth, what they
300 * bought — not a control panel you operate.
301 */
302 .os-woo-customer-window {
303 display: flex;
304 flex-direction: column;
305 gap: 20px;
306 padding: 20px 24px 24px;
307 box-sizing: border-box;
308 min-height: 100%;
309 color: var( --os-ui-fg, #1e1e1e );
310 font-size: 13px;
311 line-height: 1.5;
312 }
313
314 .os-woo-customer-window__loading,
315 .os-woo-customer-window__empty {
316 display: flex;
317 align-items: center;
318 justify-content: center;
319 flex: 1;
320 min-height: 160px;
321 color: var( --os-ui-fg-muted, rgba( 0, 0, 0, 0.6 ) );
322 }
323
324 /* ----- Identity strip ----- */
325
326 .os-woo-customer-window__header {
327 display: flex;
328 align-items: center;
329 gap: 16px;
330 }
331
332 .os-woo-customer-window__avatar {
333 width: 64px;
334 height: 64px;
335 border-radius: 50%;
336 object-fit: cover;
337 flex: none;
338 }
339
340 .os-woo-customer-window__identity {
341 display: flex;
342 flex-direction: column;
343 gap: 4px;
344 min-width: 0;
345 }
346
347 .os-woo-customer-window__name {
348 margin: 0;
349 font-size: 20px;
350 font-weight: 600;
351 line-height: 1.2;
352 }
353
354 .os-woo-customer-window__contact {
355 margin: 0;
356 color: var( --os-ui-fg-muted, rgba( 0, 0, 0, 0.6 ) );
357 overflow-wrap: anywhere;
358 }
359
360 .os-woo-customer-window__band {
361 align-self: flex-start;
362 }
363
364 /* ----- The four numbers ----- */
365
366 /*
367 * `auto-fit` rather than a fixed four-up: the window is resizable and
368 * a merchant may well park it narrow beside an order. Four cards
369 * become two rows, then one, without a media query.
370 */
371 .os-woo-customer-window__stats {
372 display: grid;
373 grid-template-columns: repeat( auto-fit, minmax( 150px, 1fr ) );
374 gap: 12px;
375 }
376
377 .os-woo-customer-window__stat {
378 display: flex;
379 flex-direction: column;
380 gap: 2px;
381 padding: 12px 14px;
382 border-radius: 8px;
383 background: var( --os-ui-surface-2, rgba( 0, 0, 0, 0.04 ) );
384 }
385
386 .os-woo-customer-window__stat-value {
387 font-size: 19px;
388 font-weight: 600;
389 line-height: 1.2;
390 overflow-wrap: anywhere;
391 }
392
393 .os-woo-customer-window__stat-label {
394 font-size: 11px;
395 font-weight: 600;
396 text-transform: uppercase;
397 letter-spacing: 0.04em;
398 color: var( --os-ui-fg-muted, rgba( 0, 0, 0, 0.6 ) );
399 }
400
401 .os-woo-customer-window__stat-hint {
402 font-size: 11px;
403 color: var( --os-ui-fg-muted, rgba( 0, 0, 0, 0.6 ) );
404 }
405
406 /* ----- Sections ----- */
407
408 .os-woo-customer-window__section {
409 display: flex;
410 flex-direction: column;
411 gap: 8px;
412 }
413
414 .os-woo-customer-window__section-title {
415 margin: 0;
416 font-size: 11px;
417 font-weight: 700;
418 text-transform: uppercase;
419 letter-spacing: 0.04em;
420 color: var( --os-ui-fg-muted, rgba( 0, 0, 0, 0.6 ) );
421 }
422
423 .os-woo-customer-window__favourite {
424 margin: 0;
425 }
426
427 /* ----- Order history ----- */
428
429 /*
430 * Three columns per row — identity, context, money — with the total
431 * pinned to the end so a column of prices lines up and can be
432 * scanned vertically. A table would give the same alignment and cost
433 * a header row saying "Order / Date / Total", which the rows already
434 * say for themselves.
435 */
436 .os-woo-customer-window__orders {
437 margin: 0;
438 padding: 0;
439 list-style: none;
440 display: flex;
441 flex-direction: column;
442 }
443
444 .os-woo-customer-window__order {
445 display: grid;
446 grid-template-columns: minmax( 0, auto ) 1fr auto;
447 align-items: center;
448 gap: 4px 12px;
449 padding: 8px 0;
450 border-block-end: 1px solid
451 var( --os-ui-border, rgba( 0, 0, 0, 0.08 ) );
452 }
453
454 .os-woo-customer-window__order:last-child {
455 border-block-end: 0;
456 }
457
458 .os-woo-customer-window__order-head {
459 display: flex;
460 align-items: center;
461 gap: 8px;
462 min-width: 0;
463 }
464
465 .os-woo-customer-window__order-meta {
466 color: var( --os-ui-fg-muted, rgba( 0, 0, 0, 0.6 ) );
467 font-size: 12px;
468 min-width: 0;
469 }
470
471 .os-woo-customer-window__order-total {
472 font-weight: 600;
473 text-align: end;
474 white-space: nowrap;
475 }
476
477 /* ----- Addresses ----- */
478
479 .os-woo-customer-window__addresses {
480 display: grid;
481 grid-template-columns: repeat( auto-fit, minmax( 200px, 1fr ) );
482 gap: 12px;
483 }
484
485 .os-woo-customer-window__address-label {
486 font-size: 11px;
487 font-weight: 600;
488 text-transform: uppercase;
489 letter-spacing: 0.04em;
490 color: var( --os-ui-fg-muted, rgba( 0, 0, 0, 0.6 ) );
491 margin-block-end: 2px;
492 }
493
494 .os-woo-customer-window__address-value {
495 overflow-wrap: anywhere;
496 }
497
498 /* ----- Actions ----- */
499
500 /*
501 * `margin-block-start: auto` pins the row to the bottom of a window
502 * taller than its content, so the buttons are where the hand expects
503 * them regardless of how much order history a customer has.
504 */
505 .os-woo-customer-window__actions {
506 display: flex;
507 flex-wrap: wrap;
508 gap: 8px;
509 margin-block-start: auto;
510 padding-block-start: 4px;
511 }
512