| 1 | /* editor.css — the editor's chrome (templates/editor.html, spec §3.1). |
| 2 | |
| 3 | What a slide looks like is slides.css; this file only places the |
| 4 | editor's own parts around it. Every selector here is an app |
| 5 | attribute (slides-*), so nothing can collide with the rst-* grammar |
| 6 | the chrome inside it uses. |
| 7 | |
| 8 | Two layouts, one document order. From 1100px the three panes sit |
| 9 | side by side — the strip at 200px, the stage flexible, the inspector |
| 10 | at 320px. Below it they stack in the order the markup has them: the |
| 11 | bar, a horizontal filmstrip, the stage, the inspector as a details |
| 12 | sheet at the foot. Nothing is hidden in either, and the reflow holds |
| 13 | at 320px (spec §8): the stage scrolls inside its own region, which |
| 14 | is the one allowance the spec makes. */ |
| 15 | |
| 16 | /* The editor wants the whole viewport, not the reading column every |
| 17 | other screen sits in. Scoped to a page holding the editor so no |
| 18 | other screen widens. */ |
| 19 | [rst-page]:has([slides-editor]) { |
| 20 | max-width: none; |
| 21 | padding-inline: var(--rst-sp-3); |
| 22 | } |
| 23 | |
| 24 | /* `hidden` must actually hide. The bundle shows and hides most of the |
| 25 | inspector with the hidden PROPERTY, and the UA's own |
| 26 | [hidden]{display:none} loses to every author `display` in this file |
| 27 | and in rastrillo's — [rst-form], [rst-box-head], [rst-callout], |
| 28 | [rst-field-row] are all flex. Without this the Block section, the |
| 29 | delete confirmation and the phone-override badge are on screen |
| 30 | whether or not they apply to anything. Scoped to the editor and |
| 31 | deliberately !important: it is a reset, and anything it beats is a |
| 32 | layout rule that has no business showing a hidden element. */ |
| 33 | [slides-editor] [hidden] { |
| 34 | display: none !important; |
| 35 | } |
| 36 | |
| 37 | [slides-editor] { |
| 38 | display: grid; |
| 39 | gap: var(--rst-sp-3); |
| 40 | grid-template-areas: |
| 41 | "bar" |
| 42 | "strip" |
| 43 | "stage" |
| 44 | "inspector"; |
| 45 | grid-template-columns: minmax(0, 1fr); |
| 46 | } |
| 47 | |
| 48 | /* ── The bar ─────────────────────────────────────────────────────── */ |
| 49 | |
| 50 | [slides-editor-bar] { |
| 51 | align-items: center; |
| 52 | display: flex; |
| 53 | flex-wrap: wrap; |
| 54 | gap: var(--rst-sp-2) var(--rst-sp-3); |
| 55 | grid-area: bar; |
| 56 | } |
| 57 | [slides-editor-bar] [rst-back-nav] { |
| 58 | margin: 0; |
| 59 | } |
| 60 | /* Rastrillo's general dropdown anchor name is shared by the strip's |
| 61 | per-slide kebab menus. In browsers with CSS anchor positioning, that |
| 62 | can anchor this bar menu to an off-screen strip item. The editor's |
| 63 | command menu owns a name of its own, so Undo and Redo stay reachable. */ |
| 64 | @supports (position-area: block-end) and (position-try-fallbacks: flip-block) { |
| 65 | [slides-editor-bar] [slides-menu] { |
| 66 | anchor-name: --slides-editor-menu; |
| 67 | } |
| 68 | [slides-editor-bar] [slides-menu] > [rst-dropdown-menu] { |
| 69 | position-anchor: --slides-editor-menu; |
| 70 | } |
| 71 | } |
| 72 | [slides-editor-title] { |
| 73 | flex: 1 1 12rem; |
| 74 | font-size: var(--rst-fs-lg); |
| 75 | margin: 0; |
| 76 | min-width: 0; |
| 77 | overflow: hidden; |
| 78 | text-overflow: ellipsis; |
| 79 | white-space: nowrap; |
| 80 | } |
| 81 | [slides-present-form] { |
| 82 | margin: 0; |
| 83 | } |
| 84 | /* The save line is estilo's savestatus and styles itself |
| 85 | (static/estilo/save-status.css). The load error beside it is text |
| 86 | in the same weight as a save line that is not "saved" — never colour |
| 87 | alone — and takes no room while there is nothing to say. */ |
| 88 | [slides-load-error] { |
| 89 | font-size: var(--rst-fs-sm); |
| 90 | font-weight: 600; |
| 91 | } |
| 92 | [slides-load-error]:empty { |
| 93 | display: none; |
| 94 | } |
| 95 | |
| 96 | /* ── The strip ───────────────────────────────────────────────────── */ |
| 97 | |
| 98 | [slides-strip-nav] { |
| 99 | grid-area: strip; |
| 100 | min-width: 0; |
| 101 | } |
| 102 | [slides-strip] { |
| 103 | display: flex; |
| 104 | gap: var(--rst-sp-2); |
| 105 | list-style: none; |
| 106 | margin: 0; |
| 107 | overflow-x: auto; |
| 108 | padding: 0 0 var(--rst-sp-2); |
| 109 | } |
| 110 | /* An item is a row of the list, not a card: the thumbnail carries the |
| 111 | frame, and the current item is a square band behind it — an in-flow |
| 112 | highlight, so square, like every other selected row in the suite. |
| 113 | The band is a fill AND a border, and aria-current plus the |
| 114 | screen-reader "Current slide" say it in words (never colour alone). */ |
| 115 | [slides-strip-item] { |
| 116 | border: 1px solid transparent; |
| 117 | box-sizing: border-box; |
| 118 | display: grid; |
| 119 | flex: none; |
| 120 | gap: var(--rst-sp-1); |
| 121 | padding: var(--rst-sp-2); |
| 122 | position: relative; |
| 123 | width: 200px; |
| 124 | } |
| 125 | [slides-strip-item][data-current="true"] { |
| 126 | background: var(--rst-accent-soft); |
| 127 | border-color: var(--rst-accent); |
| 128 | } |
| 129 | |
| 130 | /* The thumbnail: a 16:9 box holding one <img> of the server's SVG of |
| 131 | the slide (internal/slides/thumbs.go). It used to be the slide's own |
| 132 | HTML laid out at 900px and shrunk by a transform — nine live copies |
| 133 | of a document in the page, and a second opinion about what a slide |
| 134 | looks like. The picture is drawn from the same paint list the PDF |
| 135 | export is. |
| 136 | |
| 137 | A background under it so a picture still loading, or one that |
| 138 | failed, is a slide-shaped space rather than a hole in the row. */ |
| 139 | [slides-thumb] { |
| 140 | aspect-ratio: 16 / 9; |
| 141 | background: var(--rst-surface-2); |
| 142 | border-radius: var(--rst-radius-sm); |
| 143 | box-shadow: 0 0 0 1px var(--rst-line); |
| 144 | overflow: hidden; |
| 145 | position: relative; |
| 146 | width: 180px; |
| 147 | } |
| 148 | [slides-thumb-img] { |
| 149 | block-size: 100%; |
| 150 | display: block; |
| 151 | inline-size: 100%; |
| 152 | object-fit: contain; |
| 153 | } |
| 154 | /* The whole item is the target: the link's box stretches over the |
| 155 | thumbnail above it, so a click on the picture opens the slide and |
| 156 | the focus ring frames the item. */ |
| 157 | [slides-strip-link] { |
| 158 | color: inherit; |
| 159 | display: grid; |
| 160 | font-size: var(--rst-fs-sm); |
| 161 | gap: 2px; |
| 162 | min-height: 24px; |
| 163 | text-decoration: none; |
| 164 | } |
| 165 | [slides-strip-link]::after { |
| 166 | content: ""; |
| 167 | inset: 0; |
| 168 | position: absolute; |
| 169 | } |
| 170 | [slides-strip-link]:focus-visible { |
| 171 | outline: none; |
| 172 | } |
| 173 | [slides-strip-link]:focus-visible::after { |
| 174 | outline: 2px solid var(--rst-accent); |
| 175 | outline-offset: 2px; |
| 176 | } |
| 177 | [slides-strip-label] { |
| 178 | font-weight: 600; |
| 179 | overflow: hidden; |
| 180 | text-overflow: ellipsis; |
| 181 | white-space: nowrap; |
| 182 | } |
| 183 | /* "Current slide" is for a screen reader: the band says it on screen. |
| 184 | Visually hidden the way rst-sr-only is, kept in the link's name. */ |
| 185 | [slides-strip-current] { |
| 186 | block-size: 1px; |
| 187 | clip-path: inset(50%); |
| 188 | inline-size: 1px; |
| 189 | overflow: hidden; |
| 190 | position: absolute; |
| 191 | white-space: nowrap; |
| 192 | } |
| 193 | [slides-strip-item]:not([data-current="true"]) [slides-strip-current] { |
| 194 | display: none; |
| 195 | } |
| 196 | |
| 197 | /* ── The stage ───────────────────────────────────────────────────── */ |
| 198 | |
| 199 | [slides-stage-pane] { |
| 200 | display: grid; |
| 201 | gap: var(--rst-sp-3); |
| 202 | grid-area: stage; |
| 203 | min-width: 0; |
| 204 | } |
| 205 | [slides-stage] { |
| 206 | border: 1px solid var(--rst-line); |
| 207 | border-radius: var(--rst-radius); |
| 208 | overflow: auto; |
| 209 | } |
| 210 | [slides-notes-heading] { |
| 211 | font-size: var(--rst-fs-sm); |
| 212 | color: var(--rst-text-muted); |
| 213 | margin: 0 0 var(--rst-sp-1); |
| 214 | } |
| 215 | [slides-notes] { |
| 216 | border: 1px solid var(--rst-line); |
| 217 | border-radius: var(--rst-radius); |
| 218 | min-height: 3rem; |
| 219 | padding: var(--rst-sp-2) var(--rst-sp-3); |
| 220 | } |
| 221 | [slides-notes] p { |
| 222 | margin: 0; |
| 223 | } |
| 224 | [slides-notes] p + p { |
| 225 | margin-block-start: 0.5em; |
| 226 | } |
| 227 | |
| 228 | /* ProseMirror inside a block. The editable node IS the block element |
| 229 | (or the blockquote / code inside it), so the block's own styling |
| 230 | from slides.css still applies; these rules only give the paragraphs |
| 231 | ProseMirror draws the same shape the renderer's had, and make focus |
| 232 | visible on a surface that has no border of its own. */ |
| 233 | [slides-editor] .ProseMirror { |
| 234 | display: block; |
| 235 | outline: none; |
| 236 | white-space: pre-wrap; |
| 237 | word-wrap: break-word; |
| 238 | } |
| 239 | [slides-editor] .ProseMirror:focus-visible, |
| 240 | [slides-editor] .ProseMirror.ProseMirror-focused { |
| 241 | outline: 2px solid var(--rst-accent); |
| 242 | outline-offset: 3px; |
| 243 | border-radius: 2px; |
| 244 | } |
| 245 | [slides-editor] .ProseMirror > * { |
| 246 | margin: 0; |
| 247 | } |
| 248 | [slides-editor] .ProseMirror > * + * { |
| 249 | margin-block-start: 0.6em; |
| 250 | } |
| 251 | [slides-editor] [data-block="heading"] .ProseMirror > * + *, |
| 252 | [slides-editor] [data-block="code"] .ProseMirror > * + * { |
| 253 | margin-block-start: 0; |
| 254 | } |
| 255 | |
| 256 | /* ── The inspector ───────────────────────────────────────────────── */ |
| 257 | |
| 258 | [slides-inspector] { |
| 259 | border: 1px solid var(--rst-line); |
| 260 | border-radius: var(--rst-radius); |
| 261 | grid-area: inspector; |
| 262 | min-width: 0; |
| 263 | padding: var(--rst-sp-2) var(--rst-sp-3); |
| 264 | } |
| 265 | [slides-inspector] > summary { |
| 266 | cursor: pointer; |
| 267 | font-weight: 600; |
| 268 | min-height: 24px; |
| 269 | } |
| 270 | [slides-inspector-empty] { |
| 271 | font-size: var(--rst-fs-sm); |
| 272 | margin: var(--rst-sp-2) 0 0; |
| 273 | } |
| 274 | /* The three sections are forms in boxes, one under the other, and |
| 275 | their fields sit closer than a settings screen's: this is a panel |
| 276 | read while looking at the stage, not a form read top to bottom. */ |
| 277 | [slides-inspector] [rst-box-head] { |
| 278 | margin-top: var(--rst-sp-3); |
| 279 | } |
| 280 | [slides-inspector] [rst-box-head] h2 { |
| 281 | font-size: var(--rst-fs-sm); |
| 282 | } |
| 283 | [slides-inspector-form] { |
| 284 | margin: 0; |
| 285 | max-width: none; |
| 286 | padding: var(--rst-sp-2) var(--rst-sp-3); |
| 287 | } |
| 288 | [slides-inspector-form] [rst-field], |
| 289 | [slides-inspector-form] [rst-field-range], |
| 290 | [slides-inspector-form] [rst-choice] { |
| 291 | margin: var(--rst-sp-2) 0; |
| 292 | } |
| 293 | [slides-inspector-form] [rst-field-row] { |
| 294 | margin: var(--rst-sp-2) 0; |
| 295 | } |
| 296 | [slides-inspector-form] [rst-field-row] > [rst-field] { |
| 297 | min-inline-size: 5rem; |
| 298 | } |
| 299 | [slides-inspector-form] p { |
| 300 | margin: var(--rst-sp-2) 0; |
| 301 | } |
| 302 | [slides-inspector-actions] { |
| 303 | display: flex; |
| 304 | flex-wrap: wrap; |
| 305 | gap: var(--rst-sp-1) var(--rst-sp-2); |
| 306 | margin: var(--rst-sp-2) 0; |
| 307 | } |
| 308 | [slides-inspector-form] [rst-callout] { |
| 309 | margin: var(--rst-sp-2) 0; |
| 310 | } |
| 311 | [slides-block-type] { |
| 312 | color: var(--rst-text-muted); |
| 313 | font-weight: 400; |
| 314 | } |
| 315 | [slides-phone-badge] { |
| 316 | align-items: center; |
| 317 | display: flex; |
| 318 | flex-wrap: wrap; |
| 319 | gap: var(--rst-sp-2); |
| 320 | } |
| 321 | /* The Blocks list: one button per block, the selected one pressed. |
| 322 | Pressed is a fill AND aria-pressed, never a tint alone. */ |
| 323 | /* Images: the block's upload status, and the Deck section's list of |
| 324 | the ones no slide uses. The status line is text and only text — |
| 325 | "error" is a colour ON a sentence that already says what happened, |
| 326 | never the sentence itself (§8, WCAG 1.4.1). */ |
| 327 | [slides-asset-status]:empty { |
| 328 | display: none; |
| 329 | } |
| 330 | [slides-asset-status] { |
| 331 | font-size: var(--rst-fs-sm); |
| 332 | margin: var(--rst-sp-1) 0 0; |
| 333 | } |
| 334 | [slides-asset-status][data-state="error"] { |
| 335 | color: var(--rst-tone-negative-fg); |
| 336 | } |
| 337 | [slides-unused-assets] { |
| 338 | border: 0; |
| 339 | margin: var(--rst-sp-3) 0 0; |
| 340 | padding: 0; |
| 341 | } |
| 342 | [slides-unused-assets] > legend { |
| 343 | font-size: var(--rst-fs-sm); |
| 344 | font-weight: 600; |
| 345 | margin: 0 0 var(--rst-sp-1); |
| 346 | padding: 0; |
| 347 | } |
| 348 | [slides-unused-none] { |
| 349 | font-size: var(--rst-fs-sm); |
| 350 | } |
| 351 | [slides-unused-list] { |
| 352 | display: grid; |
| 353 | gap: var(--rst-sp-1); |
| 354 | list-style: none; |
| 355 | margin: 0; |
| 356 | padding: 0; |
| 357 | } |
| 358 | [slides-unused-list] > li { |
| 359 | align-items: center; |
| 360 | display: flex; |
| 361 | gap: var(--rst-sp-2); |
| 362 | justify-content: space-between; |
| 363 | } |
| 364 | [slides-asset-name] { |
| 365 | font-size: var(--rst-fs-sm); |
| 366 | overflow: hidden; |
| 367 | text-overflow: ellipsis; |
| 368 | white-space: nowrap; |
| 369 | } |
| 370 | |
| 371 | [slides-blocks-list] { |
| 372 | border: 0; |
| 373 | margin: var(--rst-sp-3) 0 var(--rst-sp-2); |
| 374 | padding: 0; |
| 375 | } |
| 376 | [slides-blocks-list] > legend { |
| 377 | font-size: var(--rst-fs-sm); |
| 378 | font-weight: 600; |
| 379 | margin: 0 0 var(--rst-sp-1); |
| 380 | padding: 0; |
| 381 | } |
| 382 | [slides-blocks-none] { |
| 383 | font-size: var(--rst-fs-sm); |
| 384 | } |
| 385 | [slides-blocks-buttons] { |
| 386 | display: grid; |
| 387 | gap: var(--rst-sp-1); |
| 388 | } |
| 389 | [slides-blocks-buttons] > button { |
| 390 | justify-content: flex-start; |
| 391 | overflow: hidden; |
| 392 | text-align: start; |
| 393 | text-overflow: ellipsis; |
| 394 | white-space: nowrap; |
| 395 | } |
| 396 | [slides-blocks-buttons] > button[aria-pressed="true"] { |
| 397 | background: var(--rst-accent-soft); |
| 398 | border-color: var(--rst-accent); |
| 399 | border-radius: 0; |
| 400 | } |
| 401 | |
| 402 | /* ── The stage bar: the switcher and the notes toggle ────────────── */ |
| 403 | |
| 404 | [slides-stage-bar] { |
| 405 | align-items: center; |
| 406 | display: flex; |
| 407 | flex-wrap: wrap; |
| 408 | gap: var(--rst-sp-2) var(--rst-sp-4); |
| 409 | } |
| 410 | /* Three radios drawn as a segmented control. The input is visually |
| 411 | hidden and keyboard-intact (arrows move between them), the label |
| 412 | is the target, the checked one is lifted; focus is drawn on the |
| 413 | label from the input's own focus-visible. */ |
| 414 | [slides-switcher] { |
| 415 | background: var(--rst-accent-soft); |
| 416 | border: 0; |
| 417 | border-radius: var(--rst-radius); |
| 418 | display: flex; |
| 419 | gap: 2px; |
| 420 | margin: 0; |
| 421 | padding: 2px; |
| 422 | } |
| 423 | [slides-switcher] > label { |
| 424 | border-radius: var(--rst-radius-sm); |
| 425 | color: var(--rst-text-muted); |
| 426 | cursor: pointer; |
| 427 | font-size: var(--rst-fs-sm); |
| 428 | font-weight: 550; |
| 429 | min-height: 24px; |
| 430 | padding: 5px 16px; |
| 431 | position: relative; |
| 432 | } |
| 433 | [slides-switcher] > label > input { |
| 434 | height: 1px; |
| 435 | opacity: 0; |
| 436 | position: absolute; |
| 437 | width: 1px; |
| 438 | } |
| 439 | [slides-switcher] > label:has(input:checked) { |
| 440 | background: var(--rst-surface); |
| 441 | box-shadow: var(--rst-shadow-lift); |
| 442 | color: var(--rst-text); |
| 443 | font-weight: 600; |
| 444 | } |
| 445 | [slides-switcher] > label:has(input:focus-visible) { |
| 446 | outline: 2px solid var(--rst-accent); |
| 447 | outline-offset: 2px; |
| 448 | } |
| 449 | |
| 450 | /* ── The stages: one, or two side by side ─────────────────────────── */ |
| 451 | |
| 452 | [slides-stages] { |
| 453 | display: grid; |
| 454 | gap: var(--rst-sp-3); |
| 455 | min-width: 0; |
| 456 | } |
| 457 | /* Room around the slide for the selection outline and the resize |
| 458 | handles, which sit half outside the block's edge. */ |
| 459 | [slides-stage] { |
| 460 | padding: 14px; |
| 461 | position: relative; |
| 462 | } |
| 463 | [slides-stage-pane][data-view="phone"] [slides-stage] { |
| 464 | justify-self: center; |
| 465 | width: calc(390px + 28px); |
| 466 | } |
| 467 | [slides-stage-pane][data-view="both"] [slides-stages] { |
| 468 | grid-template-columns: minmax(0, 1fr) 390px; |
| 469 | } |
| 470 | [slides-stage-phone] { |
| 471 | border: 1px solid var(--rst-line); |
| 472 | border-radius: var(--rst-radius); |
| 473 | overflow: auto; |
| 474 | width: 390px; |
| 475 | } |
| 476 | @media (max-width: 899px) { |
| 477 | [slides-stage-pane][data-view="both"] [slides-stages] { |
| 478 | grid-template-columns: minmax(0, 1fr); |
| 479 | } |
| 480 | [slides-stage-phone] { |
| 481 | justify-self: center; |
| 482 | } |
| 483 | } |
| 484 | [slides-stage-empty] { |
| 485 | margin: 0; |
| 486 | } |
| 487 | |
| 488 | /* Selection: an outline on the block, and aria-selected for the |
| 489 | reader. On a canvas slide the overlay draws over it. */ |
| 490 | [slides-stage] [slides-block][data-selected] { |
| 491 | outline: 2px solid var(--rst-accent); |
| 492 | outline-offset: 3px; |
| 493 | } |
| 494 | |
| 495 | /* ── The canvas overlay ──────────────────────────────────────────── */ |
| 496 | |
| 497 | /* The overlay is placed over the selected block. It takes no pointer |
| 498 | itself — the block's text underneath stays reachable — only its |
| 499 | drag surfaces and handles do. A text block drags by its edges (four |
| 500 | 10px strips inside the border); any other block by its whole body. */ |
| 501 | [slides-canvas-overlay] { |
| 502 | box-sizing: border-box; |
| 503 | pointer-events: none; |
| 504 | position: absolute; |
| 505 | z-index: 5; |
| 506 | } |
| 507 | [slides-canvas-overlay]:focus-visible { |
| 508 | outline: 3px solid var(--rst-accent); |
| 509 | outline-offset: 5px; |
| 510 | } |
| 511 | [slides-canvas-overlay] [slides-drag] { |
| 512 | pointer-events: auto; |
| 513 | position: absolute; |
| 514 | touch-action: none; |
| 515 | } |
| 516 | [slides-canvas-overlay] [slides-drag][data-surface="body"] { |
| 517 | cursor: move; |
| 518 | inset: 0; |
| 519 | } |
| 520 | [slides-canvas-overlay][data-text="true"] [slides-drag][data-surface="body"] { |
| 521 | display: none; |
| 522 | } |
| 523 | [slides-canvas-overlay]:not([data-text="true"]) [slides-drag][data-surface="edge"] { |
| 524 | display: none; |
| 525 | } |
| 526 | [slides-canvas-overlay] [slides-drag][data-surface="edge"] { |
| 527 | cursor: move; |
| 528 | } |
| 529 | [slides-canvas-overlay] [slides-drag][data-side="n"] { inset: 0 0 auto 0; height: 10px; } |
| 530 | [slides-canvas-overlay] [slides-drag][data-side="s"] { inset: auto 0 0 0; height: 10px; } |
| 531 | [slides-canvas-overlay] [slides-drag][data-side="w"] { inset: 0 auto 0 0; width: 10px; } |
| 532 | [slides-canvas-overlay] [slides-drag][data-side="e"] { inset: 0 0 0 auto; width: 10px; } |
| 533 | /* Eight handles, 24px square (the target minimum), a 12px visible |
| 534 | square in the middle so the block underneath stays readable. */ |
| 535 | [slides-handle] { |
| 536 | background: none; |
| 537 | height: 24px; |
| 538 | pointer-events: auto; |
| 539 | position: absolute; |
| 540 | touch-action: none; |
| 541 | width: 24px; |
| 542 | } |
| 543 | [slides-handle]::after { |
| 544 | background: var(--rst-surface); |
| 545 | border: 2px solid var(--rst-accent); |
| 546 | border-radius: 2px; |
| 547 | content: ""; |
| 548 | height: 8px; |
| 549 | left: 6px; |
| 550 | position: absolute; |
| 551 | top: 6px; |
| 552 | width: 8px; |
| 553 | } |
| 554 | [slides-handle][data-handle="nw"] { left: -12px; top: -12px; cursor: nwse-resize; } |
| 555 | [slides-handle][data-handle="n"] { left: calc(50% - 12px); top: -12px; cursor: ns-resize; } |
| 556 | [slides-handle][data-handle="ne"] { right: -12px; top: -12px; cursor: nesw-resize; } |
| 557 | [slides-handle][data-handle="e"] { right: -12px; top: calc(50% - 12px); cursor: ew-resize; } |
| 558 | [slides-handle][data-handle="se"] { right: -12px; bottom: -12px; cursor: nwse-resize; } |
| 559 | [slides-handle][data-handle="s"] { left: calc(50% - 12px); bottom: -12px; cursor: ns-resize; } |
| 560 | [slides-handle][data-handle="sw"] { left: -12px; bottom: -12px; cursor: nesw-resize; } |
| 561 | [slides-handle][data-handle="w"] { left: -12px; top: calc(50% - 12px); cursor: ew-resize; } |
| 562 | |
| 563 | /* ── The strip's menu, and reordering ────────────────────────────── */ |
| 564 | |
| 565 | /* The item menu sits inside the thumbnail's top-right corner, above |
| 566 | the link's stretched box so it is pressable, and clear of the label |
| 567 | under the thumbnail. A compact icon button — 28px, over the 24px |
| 568 | target minimum — shown on the current item, on hover, while the |
| 569 | item holds focus and while the menu is open; hidden with opacity, not |
| 570 | display, so it stays in the tab order and focus is what reveals it. |
| 571 | A device with no hover shows it always. */ |
| 572 | [slides-strip-menu] { |
| 573 | position: absolute; |
| 574 | right: calc(var(--rst-sp-2) + 4px); |
| 575 | top: calc(var(--rst-sp-2) + 4px); |
| 576 | z-index: 2; |
| 577 | } |
| 578 | [slides-strip-menu] > summary { |
| 579 | block-size: 28px; |
| 580 | box-sizing: border-box; |
| 581 | inline-size: 28px; |
| 582 | justify-content: center; |
| 583 | opacity: 0; |
| 584 | padding: 0; |
| 585 | } |
| 586 | [slides-strip-item][data-current="true"] [slides-strip-menu] > summary, |
| 587 | [slides-strip-item]:hover [slides-strip-menu] > summary, |
| 588 | [slides-strip-item]:focus-within [slides-strip-menu] > summary, |
| 589 | [slides-strip-menu][open] > summary { |
| 590 | opacity: 1; |
| 591 | } |
| 592 | @media (hover: none) { |
| 593 | [slides-strip-menu] > summary { |
| 594 | opacity: 1; |
| 595 | } |
| 596 | } |
| 597 | [slides-strip-item][draggable] { |
| 598 | cursor: grab; |
| 599 | } |
| 600 | [slides-strip-item][data-dragging] { |
| 601 | opacity: 0.5; |
| 602 | } |
| 603 | /* The drop line: before or after the item under the pointer, on the |
| 604 | side the strip runs — a row below 1100px, a column above it. */ |
| 605 | [slides-strip-item][data-drop="before"] { |
| 606 | box-shadow: -4px 0 0 0 var(--rst-accent); |
| 607 | } |
| 608 | [slides-strip-item][data-drop="after"] { |
| 609 | box-shadow: 4px 0 0 0 var(--rst-accent); |
| 610 | } |
| 611 | |
| 612 | /* ── Presence (spec §3.3): who else has this deck open ────────────── |
| 613 | Never colour alone (WCAG 2.2 1.4.1): every avatar and every mark |
| 614 | carries the name too, in `title` and its accessible label — the |
| 615 | colour on screen is decoration on top of that, not the message. */ |
| 616 | |
| 617 | /* Up to three faces inside the thumbnail of the slide each person is |
| 618 | on (presence-view.mjs appends them to [slides-thumb], which is |
| 619 | positioned), at its bottom-left corner: free of the item menu at |
| 620 | the top-right, and never over the label under the thumbnail. */ |
| 621 | [slides-presence-avatars] { |
| 622 | bottom: var(--rst-sp-1); |
| 623 | display: flex; |
| 624 | gap: 2px; |
| 625 | left: var(--rst-sp-1); |
| 626 | position: absolute; |
| 627 | } |
| 628 | [slides-presence-avatar], |
| 629 | [slides-presence-more] { |
| 630 | align-items: center; |
| 631 | background: var(--slides-presence-colour, var(--rst-text-muted)); |
| 632 | border: 2px solid var(--rst-surface); |
| 633 | border-radius: 999px; |
| 634 | box-sizing: border-box; |
| 635 | color: #fff; |
| 636 | display: flex; |
| 637 | font-size: 10px; |
| 638 | font-weight: 700; |
| 639 | height: 22px; |
| 640 | justify-content: center; |
| 641 | line-height: 1; |
| 642 | width: 22px; |
| 643 | } |
| 644 | [slides-presence-more] { |
| 645 | background: var(--rst-text-muted); |
| 646 | font-size: 9px; |
| 647 | } |
| 648 | |
| 649 | /* The outline on a block a colleague has selected, and their name in |
| 650 | a chip above it — an overlay over the stage, positioned in JS from |
| 651 | the block's own rectangle the way the canvas overlay is (above). |
| 652 | Below the canvas overlay's z-index: this tab's own drag handles, if |
| 653 | any are showing, stay reachable over another person's mark. */ |
| 654 | [slides-presence-marks] { |
| 655 | inset: 0; |
| 656 | pointer-events: none; |
| 657 | position: absolute; |
| 658 | z-index: 4; |
| 659 | } |
| 660 | [slides-presence-mark] { |
| 661 | border: 2px solid var(--slides-presence-colour, var(--rst-accent)); |
| 662 | border-radius: var(--rst-radius-sm); |
| 663 | box-sizing: border-box; |
| 664 | position: absolute; |
| 665 | } |
| 666 | [slides-presence-chip] { |
| 667 | background: var(--slides-presence-colour, var(--rst-accent)); |
| 668 | border-radius: var(--rst-radius-sm); |
| 669 | color: #fff; |
| 670 | font-size: var(--rst-fs-xs); |
| 671 | font-weight: 600; |
| 672 | left: -2px; |
| 673 | max-width: calc(100% + 4px); |
| 674 | overflow: hidden; |
| 675 | padding: 1px 6px; |
| 676 | pointer-events: auto; |
| 677 | position: absolute; |
| 678 | text-overflow: ellipsis; |
| 679 | top: -22px; |
| 680 | white-space: nowrap; |
| 681 | } |
| 682 | |
| 683 | /* ── The link dialog ─────────────────────────────────────────────── */ |
| 684 | |
| 685 | [slides-link-dialog] { |
| 686 | background: var(--rst-bg); |
| 687 | border: 1px solid var(--rst-line); |
| 688 | border-radius: var(--rst-radius); |
| 689 | box-shadow: var(--rst-shadow-pop); |
| 690 | color: var(--rst-text); |
| 691 | max-width: min(28rem, calc(100vw - 2rem)); |
| 692 | padding: var(--rst-sp-4); |
| 693 | } |
| 694 | [slides-link-dialog]::backdrop { |
| 695 | background: rgba(0, 0, 0, 0.35); |
| 696 | } |
| 697 | [slides-link-dialog] h2 { |
| 698 | font-size: var(--rst-fs-lg); |
| 699 | margin: 0 0 var(--rst-sp-3); |
| 700 | } |
| 701 | [slides-link-dialog] [rst-form-actions] { |
| 702 | display: flex; |
| 703 | flex-wrap: wrap; |
| 704 | gap: var(--rst-sp-2); |
| 705 | margin-top: var(--rst-sp-3); |
| 706 | } |
| 707 | |
| 708 | /* ── Three panes side by side ────────────────────────────────────── */ |
| 709 | |
| 710 | @media (min-width: 1100px) { |
| 711 | [slides-editor] { |
| 712 | grid-template-areas: |
| 713 | "bar bar bar" |
| 714 | "strip stage inspector"; |
| 715 | grid-template-columns: 200px minmax(0, 1fr) 320px; |
| 716 | align-items: start; |
| 717 | } |
| 718 | [slides-strip-nav] { |
| 719 | max-height: calc(100vh - 8rem); |
| 720 | overflow-y: auto; |
| 721 | position: sticky; |
| 722 | top: var(--rst-sp-3); |
| 723 | } |
| 724 | [slides-strip] { |
| 725 | flex-direction: column; |
| 726 | overflow-x: visible; |
| 727 | padding: 0; |
| 728 | } |
| 729 | [slides-strip-item] { |
| 730 | width: 100%; |
| 731 | } |
| 732 | [slides-thumb] { |
| 733 | width: 100%; |
| 734 | } |
| 735 | [slides-strip-item][data-drop="before"] { |
| 736 | box-shadow: 0 -4px 0 0 var(--rst-accent); |
| 737 | } |
| 738 | [slides-strip-item][data-drop="after"] { |
| 739 | box-shadow: 0 4px 0 0 var(--rst-accent); |
| 740 | } |
| 741 | [slides-inspector] { |
| 742 | max-height: calc(100vh - 4rem); |
| 743 | overflow-y: auto; |
| 744 | position: sticky; |
| 745 | top: var(--rst-sp-3); |
| 746 | } |
| 747 | } |
| 748 | |