| 1 |
/* |
| 2 |
* Workspaces — the wizard. |
| 3 |
* |
| 4 |
* The workspace ACTIONS are not here: Restore and Edit are controls |
| 5 |
* under the overview tiles and are styled with the rest of that bar in |
| 6 |
* `window-overview.css`. That is deliberate and worth stating, because |
| 7 |
* the obvious alternative — a picker floating at the corner of the |
| 8 |
* desk — is the wrong shape. Overview is already the Spaces surface, |
| 9 |
* and the desk belongs to the user's windows, not to shell chrome |
| 10 |
* hovering over them. |
| 11 |
* |
| 12 |
* `<os-modal>` draws the dialog surface and owns the scrim, the focus |
| 13 |
* trap and Escape; `<os-steps>`, `<os-card>`, `<os-swatch-grid>` and |
| 14 |
* the fields draw themselves. Everything here is the body's own |
| 15 |
* stacking — where the trail sits, how the pane scrolls, how the |
| 16 |
* footer splits its buttons. |
| 17 |
*/ |
| 18 |
|
| 19 |
.os-workspace-wizard__body { |
| 20 |
display: flex; |
| 21 |
flex-direction: column; |
| 22 |
gap: 16px; |
| 23 |
} |
| 24 |
|
| 25 |
/* |
| 26 |
* The trail reads left-to-right across the top and never wraps: a |
| 27 |
* wizard whose header reflows between steps looks like a different |
| 28 |
* dialog every time. Six steps at the modal's `lg` width fit with |
| 29 |
* room; a plugin that adds none can never make it seven. |
| 30 |
*/ |
| 31 |
.os-workspace-wizard__trail { |
| 32 |
--os-ui-steps-gap: 10px; |
| 33 |
--os-ui-step-gap: 7px; |
| 34 |
--os-ui-step-chip-size: 22px; |
| 35 |
--os-ui-step-chip-font-size: 11px; |
| 36 |
--os-ui-step-chip-family: var( --os-ui-font-mono, ui-monospace, monospace ); |
| 37 |
--os-ui-step-title-size: 11px; |
| 38 |
--os-ui-step-title-family: var( --os-ui-font-mono, ui-monospace, monospace ); |
| 39 |
--os-ui-step-title-transform: uppercase; |
| 40 |
--os-ui-step-title-spacing: 0.08em; |
| 41 |
padding-bottom: 12px; |
| 42 |
border-bottom: 1px solid var( --os-ui-border, rgba( 255, 251, 255, 0.14 ) ); |
| 43 |
white-space: nowrap; |
| 44 |
overflow-x: auto; |
| 45 |
} |
| 46 |
|
| 47 |
/* |
| 48 |
* A step you have not reached is an outline, not a filled dot. Six |
| 49 |
* filled chips in a row made the trail the loudest thing in a dialog |
| 50 |
* whose whole point is that step one and Enter is enough, and they |
| 51 |
* carried no state either: current, done and not-yet all looked the |
| 52 |
* same, so only the label weight said where you were. The lit chip has |
| 53 |
* to be the only one lit for it to mean anything. |
| 54 |
* |
| 55 |
* Same treatment as the agent wizard's trail, through the component's |
| 56 |
* own theming hooks. The host elements are in this light DOM, so the |
| 57 |
* per-state overrides can select them directly. |
| 58 |
*/ |
| 59 |
.os-workspace-wizard__trail os-step:not( [ done ] ):not( [ current ] ) { |
| 60 |
--os-ui-step-chip-bg: transparent; |
| 61 |
--os-ui-step-chip-border: 1px solid var( --os-ui-border-strong, #8c8f94 ); |
| 62 |
--os-ui-step-chip-fg: var( --os-ui-fg-muted, #646970 ); |
| 63 |
} |
| 64 |
|
| 65 |
/* Done is quiet: a filled tick, muted like its label. History, not a |
| 66 |
second highlight. */ |
| 67 |
.os-workspace-wizard__trail os-step[ done ] { |
| 68 |
--os-ui-step-chip-done-bg: var( --os-ui-surface-elevated, #f0f0f1 ); |
| 69 |
--os-ui-step-chip-fg: var( --os-ui-fg-muted, #646970 ); |
| 70 |
} |
| 71 |
|
| 72 |
/* |
| 73 |
* The pane has ONE height and keeps it. A wizard that grew and shrank |
| 74 |
* with each step moved its own footer under the user's pointer between |
| 75 |
* clicks — Next in one place, then Next somewhere else. The tallest |
| 76 |
* step (Apps on a site with forty plugins) scrolls inside it. |
| 77 |
* |
| 78 |
* Sized to the steps that have something in them, not to the tallest |
| 79 |
* one. Three of the six are a heading and a single switch until that |
| 80 |
* switch is turned on, and at the old height they were about 45% |
| 81 |
* empty: far enough past "roomy" that the dialog read as one that |
| 82 |
* had failed to load. Room is cheaper than a jumping button; this much |
| 83 |
* room was not buying anything. |
| 84 |
* |
| 85 |
* The remaining gap on those three steps is a content problem rather |
| 86 |
* than a height one. The fix worth having is a preview of the desk |
| 87 |
* being described, which would fill the space and answer "what am I |
| 88 |
* actually choosing" on Look and Windows at the same time. |
| 89 |
* |
| 90 |
* The pane scrolls, the dialog does not. A Save button below the fold |
| 91 |
* is a Save button the user cannot find. |
| 92 |
*/ |
| 93 |
.os-workspace-wizard__pane { |
| 94 |
display: flex; |
| 95 |
flex-direction: column; |
| 96 |
gap: 14px; |
| 97 |
height: min( 52vh, 320px ); |
| 98 |
overflow-y: auto; |
| 99 |
/* The pane scrolls DOWN and only down. A child that wants to be |
| 100 |
wider than the dialog is a bug in the child, and a horizontal |
| 101 |
scrollbar under a wizard is a worse symptom than a clipped |
| 102 |
edge — it reads as the whole dialog being broken. */ |
| 103 |
overflow-x: hidden; |
| 104 |
/* |
| 105 |
* Room for the rings. A selected chip's ring sits 4px OUTSIDE its |
| 106 |
* box, and a focused field's bloom further still; a clipping pane |
| 107 |
* with 2px of padding cut the leading edge off both. The inline |
| 108 |
* padding pays for the ring and the matching negative margin gives |
| 109 |
* the width back, so the pane's content still lines up with the |
| 110 |
* dialog's own edges — the room is inside the clip, not inside the |
| 111 |
* layout. |
| 112 |
*/ |
| 113 |
padding: 6px 8px 8px; |
| 114 |
margin-inline: -8px; |
| 115 |
} |
| 116 |
|
| 117 |
/* |
| 118 |
* Every child is boxed to the pane. `min-width: 0` is the part that |
| 119 |
* matters: a flex item's minimum is its content width by default, so |
| 120 |
* a grid or a long label could push past the dialog edge instead of |
| 121 |
* wrapping or shrinking. |
| 122 |
*/ |
| 123 |
.os-workspace-wizard__pane > * { |
| 124 |
min-width: 0; |
| 125 |
max-width: 100%; |
| 126 |
box-sizing: border-box; |
| 127 |
} |
| 128 |
|
| 129 |
.os-workspace-wizard__pane > os-swatch-grid, |
| 130 |
.os-workspace-wizard__pickers > os-swatch-grid { |
| 131 |
width: 100%; |
| 132 |
} |
| 133 |
|
| 134 |
.os-workspace-wizard__heading { |
| 135 |
display: flex; |
| 136 |
flex-direction: column; |
| 137 |
gap: 4px; |
| 138 |
} |
| 139 |
|
| 140 |
.os-workspace-wizard__title { |
| 141 |
margin: 0; |
| 142 |
font-size: 16px; |
| 143 |
font-weight: 600; |
| 144 |
line-height: 1.3; |
| 145 |
color: var( --os-ui-fg, #fffbff ); |
| 146 |
} |
| 147 |
|
| 148 |
/* |
| 149 |
* A label and the control it names. The pane's gap is the step |
| 150 |
* between fields; inside one, label and control are a pair. |
| 151 |
*/ |
| 152 |
.os-workspace-wizard__field { |
| 153 |
display: flex; |
| 154 |
flex-direction: column; |
| 155 |
gap: 6px; |
| 156 |
} |
| 157 |
|
| 158 |
.os-workspace-wizard__label { |
| 159 |
font-size: 12px; |
| 160 |
font-weight: 500; |
| 161 |
color: var( --os-ui-fg-muted, rgba( 255, 251, 255, 0.66 ) ); |
| 162 |
} |
| 163 |
|
| 164 |
.os-workspace-wizard__hint { |
| 165 |
margin: 0; |
| 166 |
color: var( --os-ui-fg-muted, rgba( 255, 251, 255, 0.66 ) ); |
| 167 |
font-size: 12px; |
| 168 |
line-height: 1.5; |
| 169 |
} |
| 170 |
|
| 171 |
/* --- Start: the cards ---------------------------------------- */ |
| 172 |
|
| 173 |
.os-workspace-wizard__card { |
| 174 |
--os-ui-card-gap: 6px; |
| 175 |
min-height: 96px; |
| 176 |
cursor: pointer; |
| 177 |
} |
| 178 |
|
| 179 |
.os-workspace-wizard__card-header { |
| 180 |
display: flex; |
| 181 |
align-items: center; |
| 182 |
gap: 10px; |
| 183 |
font-size: 14px; |
| 184 |
} |
| 185 |
|
| 186 |
/* |
| 187 |
* One tone for every card's glyph. These used to wear the preset's own |
| 188 |
* colour, which is the product's hex rather than ours, so the step |
| 189 |
* opened on a purple cart, a green cap and a red pen: three brands and |
| 190 |
* none of them the station's. The desk's colour still shows where it |
| 191 |
* is useful, on its overview tile. |
| 192 |
*/ |
| 193 |
.os-workspace-wizard__card-icon { |
| 194 |
flex: 0 0 auto; |
| 195 |
color: var( --os-ui-fg-muted, rgba( 255, 251, 255, 0.66 ) ); |
| 196 |
} |
| 197 |
|
| 198 |
/* The chosen card lights its glyph, so the eye lands on the answer. */ |
| 199 |
.os-workspace-wizard__card[ selected ] .os-workspace-wizard__card-icon { |
| 200 |
color: var( --os-ui-accent, #f252fc ); |
| 201 |
} |
| 202 |
|
| 203 |
.os-workspace-wizard__card-desc { |
| 204 |
color: var( --os-ui-fg-muted, rgba( 255, 251, 255, 0.66 ) ); |
| 205 |
font-size: 12px; |
| 206 |
line-height: 1.45; |
| 207 |
} |
| 208 |
|
| 209 |
/* --- Name: glyph and colour ---------------------------------- */ |
| 210 |
|
| 211 |
/* |
| 212 |
* Glyph swatches are the kit's 28px accent chips (`size="small" |
| 213 |
* variant="accent"`, in a `mode="row"` grid) painted transparent, with |
| 214 |
* a slotted icon; the swatch's own selected ring is what marks the |
| 215 |
* choice. The slot is anchored for overlays, so the icon only has to |
| 216 |
* fill and centre. |
| 217 |
*/ |
| 218 |
.os-workspace-wizard__icon-swatch os-icon { |
| 219 |
position: absolute; |
| 220 |
inset: 0; |
| 221 |
/* The component sizes its host to the glyph (16px), and `inset: 0` |
| 222 |
on a 16px box pins it to the top-left corner rather than |
| 223 |
stretching it. Own the box, then let the component's own flex |
| 224 |
centring put the glyph in the middle of it. */ |
| 225 |
width: 100%; |
| 226 |
height: 100%; |
| 227 |
display: flex; |
| 228 |
align-items: center; |
| 229 |
justify-content: center; |
| 230 |
color: var( --os-ui-fg, #fffbff ); |
| 231 |
pointer-events: none; |
| 232 |
} |
| 233 |
|
| 234 |
/* --- Apps / Widgets: the checklist ---------------------------- */ |
| 235 |
|
| 236 |
/* |
| 237 |
* The list scrolls inside the pane's own scroll, capped so the mode |
| 238 |
* switch above it stays in view while the user ticks boxes below. |
| 239 |
*/ |
| 240 |
.os-workspace-wizard__list { |
| 241 |
display: flex; |
| 242 |
flex-direction: column; |
| 243 |
gap: 2px; |
| 244 |
max-height: 260px; |
| 245 |
overflow-y: auto; |
| 246 |
padding: 4px; |
| 247 |
border: 1px solid var( --os-ui-border, rgba( 255, 251, 255, 0.14 ) ); |
| 248 |
border-radius: 8px; |
| 249 |
} |
| 250 |
|
| 251 |
/* --- Look: the pickers ----------------------------------------- */ |
| 252 |
|
| 253 |
.os-workspace-wizard__pickers { |
| 254 |
display: flex; |
| 255 |
flex-direction: column; |
| 256 |
gap: 12px; |
| 257 |
} |
| 258 |
|
| 259 |
/* |
| 260 |
* The wallpaper's name, on its tile. The swatch's wallpaper variant |
| 261 |
* slots content at the bottom-left; this is the same caption the |
| 262 |
* Preferences grid paints, at the same weight, so the same wallpaper |
| 263 |
* looks the same in both places. Above the live-preview overlay |
| 264 |
* (z-index 0) so it stays readable over a moving canvas. |
| 265 |
*/ |
| 266 |
.os-workspace-wizard__swatch-label { |
| 267 |
display: inline-block; |
| 268 |
position: relative; |
| 269 |
z-index: 1; |
| 270 |
max-width: 100%; |
| 271 |
padding: 2px 7px; |
| 272 |
font-size: 11px; |
| 273 |
font-weight: 500; |
| 274 |
line-height: 1.4; |
| 275 |
color: var( --os-ui-fg-on-accent, #fff ); |
| 276 |
background: var( --os-ui-scrim, rgba( 0, 0, 0, 0.45 ) ); |
| 277 |
border-radius: 6px; |
| 278 |
white-space: nowrap; |
| 279 |
overflow: hidden; |
| 280 |
text-overflow: ellipsis; |
| 281 |
pointer-events: none; |
| 282 |
} |
| 283 |
|
| 284 |
/* |
| 285 |
* A canvas wallpaper's live preview, mounted into the tile by the |
| 286 |
* same manager Preferences uses. Declared here rather than borrowed |
| 287 |
* from `os-settings.css`, which is a deferred sheet the wizard cannot |
| 288 |
* assume is loaded. |
| 289 |
*/ |
| 290 |
.os-workspace-wizard .os-settings__wallpaper-live-preview { |
| 291 |
position: absolute; |
| 292 |
inset: 0; |
| 293 |
z-index: 0; |
| 294 |
overflow: hidden; |
| 295 |
pointer-events: none; |
| 296 |
border-radius: 10px; |
| 297 |
} |
| 298 |
|
| 299 |
.os-workspace-wizard .os-settings__wallpaper-live-preview canvas { |
| 300 |
display: block; |
| 301 |
width: 100%; |
| 302 |
height: 100%; |
| 303 |
} |
| 304 |
|
| 305 |
/* --- Windows: chips and actions -------------------------------- */ |
| 306 |
|
| 307 |
.os-workspace-wizard__chips { |
| 308 |
display: flex; |
| 309 |
flex-wrap: wrap; |
| 310 |
gap: 6px; |
| 311 |
} |
| 312 |
|
| 313 |
.os-workspace-wizard__actions { |
| 314 |
display: flex; |
| 315 |
flex-wrap: wrap; |
| 316 |
gap: 8px; |
| 317 |
} |
| 318 |
|
| 319 |
/* --- Footer ---------------------------------------------------- */ |
| 320 |
|
| 321 |
/* |
| 322 |
* Delete leads and everything else is pushed to the trailing edge — |
| 323 |
* the destructive action sits apart from the pair the user is |
| 324 |
* actually choosing between. The spacer is what does the pushing, so |
| 325 |
* a footer with no Delete still lays out the same. |
| 326 |
*/ |
| 327 |
.os-workspace-wizard__footer { |
| 328 |
display: flex; |
| 329 |
align-items: center; |
| 330 |
gap: 8px; |
| 331 |
width: 100%; |
| 332 |
} |
| 333 |
|
| 334 |
.os-workspace-wizard__spacer { |
| 335 |
flex: 1 1 auto; |
| 336 |
} |
| 337 |
|