| @@ -67,8 +67,14 @@ | ||
| 67 | 67 | /** |
| 68 | 68 | * Focus styles. |
| 69 | 69 | */ |
| 70 | 70 | /** |
| 71 | + * Standard focus rings for the WordPress Design System. | |
| 72 | + * | |
| 73 | + * Apply `outset-ring__focus` inside the relevant pseudo-class at the call site, | |
| 74 | + * e.g. `&:focus { @include outset-ring__focus(); }`. | |
| 75 | + */ | |
| 76 | +/** | |
| 71 | 77 | * Applies editor left position to the selector passed as argument |
| 72 | 78 | */ |
| 73 | 79 | /** |
| 74 | 80 | * Styles that are reused verbatim in a few places |
| @@ -105,102 +111,8 @@ | ||
| 105 | 111 | --wp-admin-border-width-focus: 1.5px; |
| 106 | 112 | } |
| 107 | 113 | } |
| 108 | 114 | |
| 109 | -.edit-post-fullscreen-mode-close__view-mode-toggle { | |
| 110 | - top: 0; | |
| 111 | - left: 0; | |
| 112 | - height: 64px; | |
| 113 | - width: 64px; | |
| 114 | - z-index: 100; | |
| 115 | -} | |
| 116 | -.edit-post-fullscreen-mode-close__view-mode-toggle .components-button { | |
| 117 | - color: #fff; | |
| 118 | - height: 100%; | |
| 119 | - width: 100%; | |
| 120 | - border-radius: 0; | |
| 121 | - overflow: hidden; | |
| 122 | - padding: 0; | |
| 123 | - display: flex; | |
| 124 | - align-items: center; | |
| 125 | - justify-content: center; | |
| 126 | -} | |
| 127 | -.edit-post-fullscreen-mode-close__view-mode-toggle .components-button:hover, .edit-post-fullscreen-mode-close__view-mode-toggle .components-button:active { | |
| 128 | - color: #fff; | |
| 129 | -} | |
| 130 | -.edit-post-fullscreen-mode-close__view-mode-toggle .components-button:focus { | |
| 131 | - box-shadow: none; | |
| 132 | -} | |
| 133 | -.edit-post-fullscreen-mode-close__view-mode-toggle .edit-post-fullscreen-mode-close__view-mode-toggle-icon svg, | |
| 134 | -.edit-post-fullscreen-mode-close__view-mode-toggle .edit-post-fullscreen-mode-close__view-mode-toggle-icon img { | |
| 135 | - background: #1e1e1e; | |
| 136 | - display: block; | |
| 137 | -} | |
| 138 | - | |
| 139 | -.edit-post-fullscreen-mode-close-site-icon__icon { | |
| 140 | - fill: currentColor; | |
| 141 | - width: 100%; | |
| 142 | - height: 100%; | |
| 143 | - padding: 12px; | |
| 144 | -} | |
| 145 | - | |
| 146 | -.edit-post-fullscreen-mode-close-site-icon__image { | |
| 147 | - width: 100%; | |
| 148 | - height: 100%; | |
| 149 | - -o-object-fit: cover; | |
| 150 | - object-fit: cover; | |
| 151 | - background: #333; | |
| 152 | - aspect-ratio: 1/1; | |
| 153 | -} | |
| 154 | - | |
| 155 | -.edit-post-fullscreen-mode-close.components-button:focus { | |
| 156 | - position: relative; | |
| 157 | -} | |
| 158 | -.edit-post-fullscreen-mode-close.components-button:focus::before { | |
| 159 | - content: ""; | |
| 160 | - display: block; | |
| 161 | - position: absolute; | |
| 162 | - z-index: 1; | |
| 163 | - top: 0; | |
| 164 | - right: 0; | |
| 165 | - bottom: 0; | |
| 166 | - left: 0; | |
| 167 | - box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 calc(1px + var(--wp-admin-border-width-focus)) #fff; | |
| 168 | -} | |
| 169 | - | |
| 170 | -.edit-post-fullscreen-mode-close__back-icon { | |
| 171 | - position: absolute; | |
| 172 | - top: 0; | |
| 173 | - left: 0; | |
| 174 | - width: 64px; | |
| 175 | - height: 64px; | |
| 176 | - display: flex; | |
| 177 | - align-items: center; | |
| 178 | - justify-content: center; | |
| 179 | - background-color: hsl(0, 0%, 80%); | |
| 180 | - pointer-events: none; | |
| 181 | -} | |
| 182 | -.edit-post-fullscreen-mode-close__back-icon svg { | |
| 183 | - fill: currentColor; | |
| 184 | -} | |
| 185 | -.edit-post-fullscreen-mode-close__back-icon.has-site-icon { | |
| 186 | - background-color: hsla(0, 0%, 100%, 0.6); | |
| 187 | - backdrop-filter: saturate(180%) blur(15px); | |
| 188 | -} | |
| 189 | - | |
| 190 | -/** | |
| 191 | - * Show icon label overrides. | |
| 192 | - */ | |
| 193 | -.show-icon-labels .editor-header .edit-post-fullscreen-mode-close.has-icon { | |
| 194 | - width: 64px; | |
| 195 | -} | |
| 196 | -.show-icon-labels .editor-header .edit-post-fullscreen-mode-close.has-icon svg { | |
| 197 | - display: block; | |
| 198 | -} | |
| 199 | -.show-icon-labels .editor-header .edit-post-fullscreen-mode-close.has-icon::after { | |
| 200 | - content: none; | |
| 201 | -} | |
| 202 | - | |
| 203 | 115 | .edit-post-meta-boxes-main { |
| 204 | 116 | filter: drop-shadow(0 -1px rgba(0, 0, 0, 0.133)); |
| 205 | 117 | outline: 1px solid transparent; |
| 206 | 118 | background-color: #fff; |
| @@ -224,11 +136,9 @@ | ||
| 224 | 136 | height: 36px; |
| 225 | 137 | } |
| 226 | 138 | } |
| 227 | 139 | .edit-post-meta-boxes-main__presenter > button { |
| 228 | - -webkit-appearance: none; | |
| 229 | - -moz-appearance: none; | |
| 230 | - appearance: none; | |
| 140 | + appearance: none; | |
| 231 | 141 | padding: 0; |
| 232 | 142 | border: none; |
| 233 | 143 | outline: none; |
| 234 | 144 | background-color: transparent; |
| @@ -296,18 +206,24 @@ | ||
| 296 | 206 | .edit-post-layout__metaboxes { |
| 297 | 207 | clear: both; |
| 298 | 208 | } |
| 299 | 209 | |
| 300 | -.has-metaboxes .interface-interface-skeleton__content:has(.edit-post-meta-boxes-main) .editor-visual-editor { | |
| 210 | +.has-metaboxes .interface-interface-skeleton__content:has(.edit-post-meta-boxes-main) .editor-visual-editor, | |
| 211 | +.has-metaboxes .interface-interface-skeleton__content:has(.edit-post-meta-boxes-main) .editor-text-editor { | |
| 301 | 212 | flex-shrink: 1; |
| 302 | 213 | flex-basis: 0%; |
| 214 | + isolation: isolate; | |
| 215 | +} | |
| 216 | +.has-metaboxes .interface-interface-skeleton__content:has(.edit-post-meta-boxes-main) .editor-visual-editor { | |
| 303 | 217 | overflow: hidden; |
| 304 | - isolation: isolate; | |
| 305 | 218 | } |
| 219 | +.has-metaboxes .interface-interface-skeleton__content:has(.edit-post-meta-boxes-main) .editor-text-editor { | |
| 220 | + overflow: auto; | |
| 221 | +} | |
| 306 | 222 | |
| 307 | 223 | .edit-post-layout__snackbar { |
| 308 | 224 | position: fixed; |
| 309 | - bottom: 24px; | |
| 225 | + bottom: var(--wpds-dimension-size-md, 32px); | |
| 310 | 226 | left: 0; |
| 311 | 227 | right: 0; |
| 312 | 228 | padding-inline: 16px; |
| 313 | 229 | box-sizing: border-box; |
| @@ -337,9 +253,9 @@ | ||
| 337 | 253 | .edit-post-meta-boxes-area input { |
| 338 | 254 | box-sizing: border-box; |
| 339 | 255 | } |
| 340 | 256 | .edit-post-meta-boxes-area .postbox-header { |
| 341 | - border-top: 1px solid #ddd; | |
| 257 | + border-top: 1px solid #e0e0e0; | |
| 342 | 258 | border-bottom: 0; |
| 343 | 259 | } |
| 344 | 260 | .edit-post-meta-boxes-area { |
| 345 | 261 | /* Match width and positioning of the meta boxes. Override default styles. */ |
| @@ -355,10 +271,11 @@ | ||
| 355 | 271 | .edit-post-meta-boxes-area #poststuff h3.hndle, |
| 356 | 272 | .edit-post-meta-boxes-area #poststuff .stuffbox > h3, |
| 357 | 273 | .edit-post-meta-boxes-area #poststuff h2.hndle { /* WordPress selectors yolo */ |
| 358 | 274 | box-sizing: border-box; |
| 359 | - color: inherit; | |
| 360 | - font-weight: 600; | |
| 275 | + color: #1e1e1e; | |
| 276 | + font-size: 13px; | |
| 277 | + font-weight: var(--wpds-typography-font-weight-emphasis, 600); | |
| 361 | 278 | outline: none; |
| 362 | 279 | padding: 0 24px; |
| 363 | 280 | position: relative; |
| 364 | 281 | width: 100%; |
| @@ -413,14 +330,13 @@ | ||
| 413 | 330 | .edit-post-welcome-guide__image > img, |
| 414 | 331 | .edit-template-welcome-guide__image > img { |
| 415 | 332 | display: block; |
| 416 | 333 | max-width: 100%; |
| 417 | - -o-object-fit: cover; | |
| 418 | - object-fit: cover; | |
| 334 | + object-fit: cover; | |
| 419 | 335 | } |
| 420 | 336 | .edit-post-welcome-guide__heading, |
| 421 | 337 | .edit-template-welcome-guide__heading { |
| 422 | - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | |
| 338 | + font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | |
| 423 | 339 | font-size: 24px; |
| 424 | 340 | line-height: 1.4; |
| 425 | 341 | margin: 16px 0 16px 0; |
| 426 | 342 | padding: 0 24px; |
| @@ -438,66 +354,15 @@ | ||
| 438 | 354 | vertical-align: text-top; |
| 439 | 355 | } |
| 440 | 356 | .edit-post-welcome-guide .components-button:hover svg, |
| 441 | 357 | .edit-template-welcome-guide .components-button:hover svg { |
| 442 | - fill: #fff; | |
| 358 | + color: #fff; | |
| 443 | 359 | } |
| 444 | 360 | |
| 445 | 361 | .edit-template-welcome-guide .components-button svg { |
| 446 | - fill: #fff; | |
| 362 | + color: #fff; | |
| 447 | 363 | } |
| 448 | 364 | |
| 449 | -body.has-admin-bar-in-editor .edit-post-fullscreen-mode-close__view-mode-toggle { | |
| 450 | - display: flex; | |
| 451 | - align-items: center; | |
| 452 | - justify-content: center; | |
| 453 | - width: 32px; | |
| 454 | - height: 32px; | |
| 455 | -} | |
| 456 | -body.has-admin-bar-in-editor .edit-post-fullscreen-mode-close__view-mode-toggle .edit-post-fullscreen-mode-close__back-icon { | |
| 457 | - top: auto; | |
| 458 | - left: auto; | |
| 459 | - width: 32px; | |
| 460 | - height: 32px; | |
| 461 | - background: transparent; | |
| 462 | -} | |
| 463 | -body.has-admin-bar-in-editor .edit-post-fullscreen-mode-close__view-mode-toggle:hover .edit-post-fullscreen-mode-close__back-icon { | |
| 464 | - color: var(--wp-admin-theme-color); | |
| 465 | -} | |
| 466 | -body.has-admin-bar-in-editor.is-fullscreen-mode .editor-header:has(> .editor-header__back-button) { | |
| 467 | - grid-template-columns: 32px minmax(0, max-content) minmax(min-content, 1fr) 64px; | |
| 468 | -} | |
| 469 | -body.has-admin-bar-in-editor.is-fullscreen-mode .editor-header:has(> .editor-header__back-button):has(> .editor-header__center) { | |
| 470 | - grid-template-columns: 32px min-content 1fr min-content 64px; | |
| 471 | -} | |
| 472 | -body.has-admin-bar-in-editor.is-fullscreen-mode .editor-header__back-button { | |
| 473 | - padding-left: 8px; | |
| 474 | -} | |
| 475 | -@media (min-width: 782px) { | |
| 476 | - body.has-admin-bar-in-editor.is-fullscreen-mode { | |
| 477 | - margin-top: 0; | |
| 478 | - height: 100%; | |
| 479 | - } | |
| 480 | - body.has-admin-bar-in-editor.is-fullscreen-mode #wpadminbar { | |
| 481 | - display: block; | |
| 482 | - } | |
| 483 | - body.has-admin-bar-in-editor.is-fullscreen-mode .interface-interface-skeleton, | |
| 484 | - body.has-admin-bar-in-editor.is-fullscreen-mode .editor-post-publish-panel, | |
| 485 | - body.has-admin-bar-in-editor.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus, | |
| 486 | - body.has-admin-bar-in-editor.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within { | |
| 487 | - top: var(--wp-admin--admin-bar--height, 0); | |
| 488 | - } | |
| 489 | - body.has-admin-bar-in-editor.is-fullscreen-mode .block-editor__container { | |
| 490 | - min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0)); | |
| 491 | - } | |
| 492 | - body.has-admin-bar-in-editor.is-fullscreen-mode:has(.editor-editor-interface.is-distraction-free) { | |
| 493 | - --wp-admin--admin-bar--height: 0; | |
| 494 | - } | |
| 495 | - body.has-admin-bar-in-editor.is-fullscreen-mode:has(.editor-editor-interface.is-distraction-free) #wpadminbar { | |
| 496 | - display: none; | |
| 497 | - } | |
| 498 | -} | |
| 499 | - | |
| 500 | 365 | body.js.block-editor-page { |
| 501 | 366 | background: #fff; |
| 502 | 367 | } |
| 503 | 368 | body.js.block-editor-page #wpcontent { |
| @@ -527,8 +392,17 @@ | ||
| 527 | 392 | body.js.block-editor-page .media-frame select.attachment-filters:last-of-type { |
| 528 | 393 | width: auto; |
| 529 | 394 | max-width: 100%; |
| 530 | 395 | } |
| 396 | +@media (min-width: 782px) { | |
| 397 | + body.js.block-editor-page.is-fullscreen-mode:has(.editor-editor-interface.is-distraction-free) { | |
| 398 | + --wp-admin--admin-bar--height: 0px; | |
| 399 | + --wp-editor-admin-bar-display: none; | |
| 400 | + } | |
| 401 | + body.js.block-editor-page.is-fullscreen-mode #wpadminbar { | |
| 402 | + display: var(--wp-editor-admin-bar-display, block); | |
| 403 | + } | |
| 404 | +} | |
| 531 | 405 | |
| 532 | 406 | .block-editor-page #wpwrap { |
| 533 | 407 | overflow-y: auto; |
| 534 | 408 | } |
| @@ -537,14 +411,14 @@ | ||
| 537 | 411 | overflow-y: initial; |
| 538 | 412 | } |
| 539 | 413 | } |
| 540 | 414 | |
| 541 | -.edit-post-visual-editor.is-iframed { | |
| 415 | +.edit-post-visual-editor { | |
| 542 | 416 | box-sizing: border-box; |
| 543 | 417 | } |
| 544 | -.edit-post-visual-editor.is-iframed *, | |
| 545 | -.edit-post-visual-editor.is-iframed *::before, | |
| 546 | -.edit-post-visual-editor.is-iframed *::after { | |
| 418 | +.edit-post-visual-editor *, | |
| 419 | +.edit-post-visual-editor *::before, | |
| 420 | +.edit-post-visual-editor *::after { | |
| 547 | 421 | box-sizing: inherit; |
| 548 | 422 | } |
| 549 | 423 | |
| 550 | 424 | @media (min-width: 600px) { |
| @@ -558,12 +432,9 @@ | ||
| 558 | 432 | } |
| 559 | 433 | } |
| 560 | 434 | @media (min-width: 782px) { |
| 561 | 435 | .block-editor__container { |
| 562 | - min-height: calc(100vh - 32px); | |
| 563 | - } | |
| 564 | - body.is-fullscreen-mode .block-editor__container { | |
| 565 | - min-height: 100vh; | |
| 436 | + min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px)); | |
| 566 | 437 | } |
| 567 | 438 | } |
| 568 | 439 | .block-editor__container img { |
| 569 | 440 | max-width: 100%; |