| @@ -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,236 +111,8 @@ | ||
| 105 | 111 | --wp-admin-border-width-focus: 1.5px; |
| 106 | 112 | } |
| 107 | 113 | } |
| 108 | 114 | |
| 109 | -.admin-ui-page { | |
| 110 | - display: flex; | |
| 111 | - height: 100%; | |
| 112 | - background-color: var(--wpds-color-bg-surface-neutral, #fcfcfc); | |
| 113 | - color: var(--wpds-color-fg-content-neutral, #1e1e1e); | |
| 114 | - position: relative; | |
| 115 | - z-index: 1; | |
| 116 | - flex-flow: column; | |
| 117 | - text-wrap: pretty; | |
| 118 | -} | |
| 119 | - | |
| 120 | -.admin-ui-page__header { | |
| 121 | - padding: var(--wpds-dimension-padding-lg, 16px) var(--wpds-dimension-padding-2xl, 24px); | |
| 122 | - border-bottom: var(--wpds-border-width-xs, 1px) solid var(--wpds-color-stroke-surface-neutral-weak, #e4e4e4); | |
| 123 | - background: var(--wpds-color-bg-surface-neutral-strong, #ffffff); | |
| 124 | - position: sticky; | |
| 125 | - top: 0; | |
| 126 | - z-index: 1; | |
| 127 | -} | |
| 128 | - | |
| 129 | -.admin-ui-page__header-title { | |
| 130 | - font-family: var(--wpds-typography-font-family-heading, -apple-system, system-ui, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif); | |
| 131 | - font-size: var(--wpds-typography-font-size-lg, 15px); | |
| 132 | - font-weight: var(--wpds-typography-font-weight-medium, 499); | |
| 133 | - line-height: var(--wpds-typography-line-height-lg, 28px); | |
| 134 | - margin: 0; | |
| 135 | - overflow: hidden; | |
| 136 | - text-overflow: ellipsis; | |
| 137 | - white-space: nowrap; | |
| 138 | -} | |
| 139 | - | |
| 140 | -.admin-ui-page__sidebar-toggle-slot:empty { | |
| 141 | - display: none; | |
| 142 | -} | |
| 143 | - | |
| 144 | -.admin-ui-page__header-subtitle { | |
| 145 | - padding-block-end: var(--wpds-dimension-padding-xs, 4px); | |
| 146 | - color: var(--wpds-color-fg-content-neutral-weak, #707070); | |
| 147 | - font-size: var(--wpds-typography-font-size-md, 13px); | |
| 148 | - line-height: var(--wpds-typography-line-height-md, 24px); | |
| 149 | - margin: 0; | |
| 150 | -} | |
| 151 | - | |
| 152 | -.admin-ui-page__content { | |
| 153 | - flex-grow: 1; | |
| 154 | - overflow: auto; | |
| 155 | - display: flex; | |
| 156 | - flex-direction: column; | |
| 157 | -} | |
| 158 | - | |
| 159 | -.admin-ui-page__content.has-padding { | |
| 160 | - padding: var(--wpds-dimension-padding-lg, 16px) var(--wpds-dimension-padding-2xl, 24px); | |
| 161 | -} | |
| 162 | - | |
| 163 | -.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon { | |
| 164 | - width: auto; | |
| 165 | - padding: 0 var(--wpds-dimension-padding-xs, 4px); | |
| 166 | -} | |
| 167 | - | |
| 168 | -.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg { | |
| 169 | - display: none; | |
| 170 | -} | |
| 171 | - | |
| 172 | -.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon::after { | |
| 173 | - content: attr(aria-label); | |
| 174 | - font-size: var(--wpds-typography-font-size-sm, 12px); | |
| 175 | -} | |
| 176 | - | |
| 177 | -/** | |
| 178 | - * SCSS Variables. | |
| 179 | - * | |
| 180 | - * Please use variables from this sheet to ensure consistency across the UI. | |
| 181 | - * Don't add to this sheet unless you're pretty sure the value will be reused in many places. | |
| 182 | - * For example, don't add rules to this sheet that affect block visuals. It's purely for UI. | |
| 183 | - */ | |
| 184 | -/** | |
| 185 | - * Colors | |
| 186 | - */ | |
| 187 | -/** | |
| 188 | - * Fonts & basic variables. | |
| 189 | - */ | |
| 190 | -/** | |
| 191 | - * Typography | |
| 192 | - */ | |
| 193 | -/** | |
| 194 | - * Grid System. | |
| 195 | - * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/ | |
| 196 | - */ | |
| 197 | -/** | |
| 198 | - * Radius scale. | |
| 199 | - */ | |
| 200 | -/** | |
| 201 | - * Elevation scale. | |
| 202 | - */ | |
| 203 | -/** | |
| 204 | - * Dimensions. | |
| 205 | - */ | |
| 206 | -/** | |
| 207 | - * Mobile specific styles | |
| 208 | - */ | |
| 209 | -/** | |
| 210 | - * Editor styles. | |
| 211 | - */ | |
| 212 | -/** | |
| 213 | - * Block & Editor UI. | |
| 214 | - */ | |
| 215 | -/** | |
| 216 | - * Block paddings. | |
| 217 | - */ | |
| 218 | -/** | |
| 219 | - * React Native specific. | |
| 220 | - * These variables do not appear to be used anywhere else. | |
| 221 | - */ | |
| 222 | -.admin-ui-breadcrumbs__list { | |
| 223 | - font-family: var(--wpds-typography-font-family-heading, -apple-system, system-ui, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif); | |
| 224 | - font-size: var(--wpds-typography-font-size-lg, 15px); | |
| 225 | - font-weight: var(--wpds-typography-font-weight-medium, 499); | |
| 226 | - line-height: var(--wpds-typography-line-height-lg, 28px); | |
| 227 | - list-style: none; | |
| 228 | - padding: 0; | |
| 229 | - margin: 0; | |
| 230 | - gap: 0; | |
| 231 | - min-height: 32px; | |
| 232 | -} | |
| 233 | - | |
| 234 | -.admin-ui-breadcrumbs__list li:not(:last-child)::after { | |
| 235 | - content: "/"; | |
| 236 | - margin: 0 8px; | |
| 237 | -} | |
| 238 | - | |
| 239 | -.admin-ui-breadcrumbs__list h1 { | |
| 240 | - font-size: inherit; | |
| 241 | - line-height: inherit; | |
| 242 | -} | |
| 243 | - | |
| 244 | -.edit-post-fullscreen-mode-close__view-mode-toggle { | |
| 245 | - top: 0; | |
| 246 | - left: 0; | |
| 247 | - height: 64px; | |
| 248 | - width: 64px; | |
| 249 | - z-index: 100; | |
| 250 | -} | |
| 251 | -.edit-post-fullscreen-mode-close__view-mode-toggle .components-button { | |
| 252 | - color: #fff; | |
| 253 | - height: 100%; | |
| 254 | - width: 100%; | |
| 255 | - border-radius: 0; | |
| 256 | - overflow: hidden; | |
| 257 | - padding: 0; | |
| 258 | - display: flex; | |
| 259 | - align-items: center; | |
| 260 | - justify-content: center; | |
| 261 | -} | |
| 262 | -.edit-post-fullscreen-mode-close__view-mode-toggle .components-button:hover, .edit-post-fullscreen-mode-close__view-mode-toggle .components-button:active { | |
| 263 | - color: #fff; | |
| 264 | -} | |
| 265 | -.edit-post-fullscreen-mode-close__view-mode-toggle .components-button:focus { | |
| 266 | - box-shadow: none; | |
| 267 | -} | |
| 268 | -.edit-post-fullscreen-mode-close__view-mode-toggle .edit-post-fullscreen-mode-close__view-mode-toggle-icon svg, | |
| 269 | -.edit-post-fullscreen-mode-close__view-mode-toggle .edit-post-fullscreen-mode-close__view-mode-toggle-icon img { | |
| 270 | - background: #1e1e1e; | |
| 271 | - display: block; | |
| 272 | -} | |
| 273 | - | |
| 274 | -.edit-post-fullscreen-mode-close-site-icon__icon { | |
| 275 | - fill: currentColor; | |
| 276 | - width: 100%; | |
| 277 | - height: 100%; | |
| 278 | - padding: 12px; | |
| 279 | -} | |
| 280 | - | |
| 281 | -.edit-post-fullscreen-mode-close-site-icon__image { | |
| 282 | - width: 100%; | |
| 283 | - height: 100%; | |
| 284 | - object-fit: cover; | |
| 285 | - background: #333; | |
| 286 | - aspect-ratio: 1/1; | |
| 287 | -} | |
| 288 | - | |
| 289 | -.edit-post-fullscreen-mode-close.components-button:focus { | |
| 290 | - position: relative; | |
| 291 | -} | |
| 292 | -.edit-post-fullscreen-mode-close.components-button:focus::before { | |
| 293 | - content: ""; | |
| 294 | - display: block; | |
| 295 | - position: absolute; | |
| 296 | - z-index: 1; | |
| 297 | - top: 0; | |
| 298 | - right: 0; | |
| 299 | - bottom: 0; | |
| 300 | - left: 0; | |
| 301 | - 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; | |
| 302 | -} | |
| 303 | - | |
| 304 | -.edit-post-fullscreen-mode-close__back-icon { | |
| 305 | - position: absolute; | |
| 306 | - top: 0; | |
| 307 | - left: 0; | |
| 308 | - width: 64px; | |
| 309 | - height: 64px; | |
| 310 | - display: flex; | |
| 311 | - align-items: center; | |
| 312 | - justify-content: center; | |
| 313 | - background-color: hsl(0, 0%, 80%); | |
| 314 | - pointer-events: none; | |
| 315 | -} | |
| 316 | -.edit-post-fullscreen-mode-close__back-icon svg { | |
| 317 | - fill: currentColor; | |
| 318 | -} | |
| 319 | -.edit-post-fullscreen-mode-close__back-icon.has-site-icon { | |
| 320 | - background-color: hsla(0, 0%, 100%, 0.6); | |
| 321 | - backdrop-filter: saturate(180%) blur(15px); | |
| 322 | -} | |
| 323 | - | |
| 324 | -/** | |
| 325 | - * Show icon label overrides. | |
| 326 | - */ | |
| 327 | -.show-icon-labels .editor-header .edit-post-fullscreen-mode-close.has-icon { | |
| 328 | - width: 64px; | |
| 329 | -} | |
| 330 | -.show-icon-labels .editor-header .edit-post-fullscreen-mode-close.has-icon svg { | |
| 331 | - display: block; | |
| 332 | -} | |
| 333 | -.show-icon-labels .editor-header .edit-post-fullscreen-mode-close.has-icon::after { | |
| 334 | - content: none; | |
| 335 | -} | |
| 336 | - | |
| 337 | 115 | .edit-post-meta-boxes-main { |
| 338 | 116 | filter: drop-shadow(0 -1px rgba(0, 0, 0, 0.133)); |
| 339 | 117 | outline: 1px solid transparent; |
| 340 | 118 | background-color: #fff; |
| @@ -366,9 +144,9 @@ | ||
| 366 | 144 | background-color: transparent; |
| 367 | 145 | touch-action: none; |
| 368 | 146 | } |
| 369 | 147 | .edit-post-meta-boxes-main__presenter > button[aria-expanded] { |
| 370 | - cursor: pointer; | |
| 148 | + cursor: var(--wpds-cursor-control, pointer); | |
| 371 | 149 | width: 100%; |
| 372 | 150 | display: flex; |
| 373 | 151 | justify-content: space-between; |
| 374 | 152 | align-items: center; |
| @@ -428,18 +206,24 @@ | ||
| 428 | 206 | .edit-post-layout__metaboxes { |
| 429 | 207 | clear: both; |
| 430 | 208 | } |
| 431 | 209 | |
| 432 | -.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 { | |
| 433 | 212 | flex-shrink: 1; |
| 434 | 213 | flex-basis: 0%; |
| 214 | + isolation: isolate; | |
| 215 | +} | |
| 216 | +.has-metaboxes .interface-interface-skeleton__content:has(.edit-post-meta-boxes-main) .editor-visual-editor { | |
| 435 | 217 | overflow: hidden; |
| 436 | - isolation: isolate; | |
| 437 | 218 | } |
| 219 | +.has-metaboxes .interface-interface-skeleton__content:has(.edit-post-meta-boxes-main) .editor-text-editor { | |
| 220 | + overflow: auto; | |
| 221 | +} | |
| 438 | 222 | |
| 439 | 223 | .edit-post-layout__snackbar { |
| 440 | 224 | position: fixed; |
| 441 | - bottom: 24px; | |
| 225 | + bottom: var(--wpds-dimension-size-md, 32px); | |
| 442 | 226 | left: 0; |
| 443 | 227 | right: 0; |
| 444 | 228 | padding-inline: 16px; |
| 445 | 229 | box-sizing: border-box; |
| @@ -469,9 +253,9 @@ | ||
| 469 | 253 | .edit-post-meta-boxes-area input { |
| 470 | 254 | box-sizing: border-box; |
| 471 | 255 | } |
| 472 | 256 | .edit-post-meta-boxes-area .postbox-header { |
| 473 | - border-top: 1px solid #ddd; | |
| 257 | + border-top: 1px solid #e0e0e0; | |
| 474 | 258 | border-bottom: 0; |
| 475 | 259 | } |
| 476 | 260 | .edit-post-meta-boxes-area { |
| 477 | 261 | /* Match width and positioning of the meta boxes. Override default styles. */ |
| @@ -487,10 +271,11 @@ | ||
| 487 | 271 | .edit-post-meta-boxes-area #poststuff h3.hndle, |
| 488 | 272 | .edit-post-meta-boxes-area #poststuff .stuffbox > h3, |
| 489 | 273 | .edit-post-meta-boxes-area #poststuff h2.hndle { /* WordPress selectors yolo */ |
| 490 | 274 | box-sizing: border-box; |
| 491 | - color: inherit; | |
| 492 | - font-weight: 600; | |
| 275 | + color: #1e1e1e; | |
| 276 | + font-size: 13px; | |
| 277 | + font-weight: var(--wpds-typography-font-weight-emphasis, 600); | |
| 493 | 278 | outline: none; |
| 494 | 279 | padding: 0 24px; |
| 495 | 280 | position: relative; |
| 496 | 281 | width: 100%; |
| @@ -518,13 +303,13 @@ | ||
| 518 | 303 | content: ""; |
| 519 | 304 | background: transparent; |
| 520 | 305 | z-index: 1; |
| 521 | 306 | } |
| 522 | -.edit-post-meta-boxes-area .components-spinner { | |
| 307 | +.edit-post-meta-boxes-area .edit-post-meta-boxes-area__spinner { | |
| 523 | 308 | position: absolute; |
| 524 | 309 | top: 10px; |
| 525 | 310 | right: 20px; |
| 526 | - z-index: 5; | |
| 311 | + z-index: 2; | |
| 527 | 312 | } |
| 528 | 313 | .edit-post-meta-boxes-area .is-hidden { |
| 529 | 314 | display: none; |
| 530 | 315 | } |
| @@ -549,9 +334,9 @@ | ||
| 549 | 334 | object-fit: cover; |
| 550 | 335 | } |
| 551 | 336 | .edit-post-welcome-guide__heading, |
| 552 | 337 | .edit-template-welcome-guide__heading { |
| 553 | - 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; | |
| 554 | 339 | font-size: 24px; |
| 555 | 340 | line-height: 1.4; |
| 556 | 341 | margin: 16px 0 16px 0; |
| 557 | 342 | padding: 0 24px; |
| @@ -569,13 +354,13 @@ | ||
| 569 | 354 | vertical-align: text-top; |
| 570 | 355 | } |
| 571 | 356 | .edit-post-welcome-guide .components-button:hover svg, |
| 572 | 357 | .edit-template-welcome-guide .components-button:hover svg { |
| 573 | - fill: #fff; | |
| 358 | + color: #fff; | |
| 574 | 359 | } |
| 575 | 360 | |
| 576 | 361 | .edit-template-welcome-guide .components-button svg { |
| 577 | - fill: #fff; | |
| 362 | + color: #fff; | |
| 578 | 363 | } |
| 579 | 364 | |
| 580 | 365 | body.js.block-editor-page { |
| 581 | 366 | background: #fff; |
| @@ -607,8 +392,17 @@ | ||
| 607 | 392 | body.js.block-editor-page .media-frame select.attachment-filters:last-of-type { |
| 608 | 393 | width: auto; |
| 609 | 394 | max-width: 100%; |
| 610 | 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 | +} | |
| 611 | 405 | |
| 612 | 406 | .block-editor-page #wpwrap { |
| 613 | 407 | overflow-y: auto; |
| 614 | 408 | } |
| @@ -617,14 +411,14 @@ | ||
| 617 | 411 | overflow-y: initial; |
| 618 | 412 | } |
| 619 | 413 | } |
| 620 | 414 | |
| 621 | -.edit-post-visual-editor.is-iframed { | |
| 415 | +.edit-post-visual-editor { | |
| 622 | 416 | box-sizing: border-box; |
| 623 | 417 | } |
| 624 | -.edit-post-visual-editor.is-iframed *, | |
| 625 | -.edit-post-visual-editor.is-iframed *::before, | |
| 626 | -.edit-post-visual-editor.is-iframed *::after { | |
| 418 | +.edit-post-visual-editor *, | |
| 419 | +.edit-post-visual-editor *::before, | |
| 420 | +.edit-post-visual-editor *::after { | |
| 627 | 421 | box-sizing: inherit; |
| 628 | 422 | } |
| 629 | 423 | |
| 630 | 424 | @media (min-width: 600px) { |
| @@ -638,12 +432,9 @@ | ||
| 638 | 432 | } |
| 639 | 433 | } |
| 640 | 434 | @media (min-width: 782px) { |
| 641 | 435 | .block-editor__container { |
| 642 | - min-height: calc(100vh - 32px); | |
| 643 | - } | |
| 644 | - body.is-fullscreen-mode .block-editor__container { | |
| 645 | - min-height: 100vh; | |
| 436 | + min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px)); | |
| 646 | 437 | } |
| 647 | 438 | } |
| 648 | 439 | .block-editor__container img { |
| 649 | 440 | max-width: 100%; |