Block Editor: Bug fixes targeted for WordPress 5.3 RC4.

Merges [46656] to the 5.3 branch.
Fixes #48502

Built from https://develop.svn.wordpress.org/trunk@46663


git-svn-id: http://core.svn.wordpress.org/trunk@46463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2019-11-05 21:53:03 +00:00
parent eda6a9e111
commit 13f3142222
28 changed files with 158 additions and 290 deletions

View File

@ -527,6 +527,23 @@
.block-editor-block-list__block.is-multi-selected > .block-editor-block-mover { .block-editor-block-list__block.is-multi-selected > .block-editor-block-mover {
right: -30px; } right: -30px; }
.block-editor-block-list__block[data-align="left"].is-selected > .block-editor-block-list__block-edit > .block-editor-block-mover, .block-editor-block-list__block[data-align="right"].is-selected > .block-editor-block-list__block-edit > .block-editor-block-mover {
display: none; }
@media (min-width: 600px) {
.block-editor-block-list__block[data-align="left"].is-selected > .block-editor-block-list__block-edit > .block-editor-block-mover, .block-editor-block-list__block[data-align="right"].is-selected > .block-editor-block-list__block-edit > .block-editor-block-mover {
display: block;
opacity: 1;
animation: none;
width: 45px;
height: auto;
padding-bottom: 14px;
margin-top: 0; } }
.block-editor-block-list__block[data-align="left"].is-hovered > .block-editor-block-list__block-edit > .block-editor-block-mover,
.block-editor-block-list__block[data-align="left"].is-dragging > .block-editor-block-list__block-edit > .block-editor-block-mover, .block-editor-block-list__block[data-align="right"].is-hovered > .block-editor-block-list__block-edit > .block-editor-block-mover,
.block-editor-block-list__block[data-align="right"].is-dragging > .block-editor-block-list__block-edit > .block-editor-block-mover {
display: none; }
/** /**
* Mobile unified toolbar. * Mobile unified toolbar.
*/ */

File diff suppressed because one or more lines are too long

View File

@ -539,6 +539,23 @@
.block-editor-block-list__block.is-multi-selected > .block-editor-block-mover { .block-editor-block-list__block.is-multi-selected > .block-editor-block-mover {
left: -30px; } left: -30px; }
.block-editor-block-list__block[data-align="left"].is-selected > .block-editor-block-list__block-edit > .block-editor-block-mover, .block-editor-block-list__block[data-align="right"].is-selected > .block-editor-block-list__block-edit > .block-editor-block-mover {
display: none; }
@media (min-width: 600px) {
.block-editor-block-list__block[data-align="left"].is-selected > .block-editor-block-list__block-edit > .block-editor-block-mover, .block-editor-block-list__block[data-align="right"].is-selected > .block-editor-block-list__block-edit > .block-editor-block-mover {
display: block;
opacity: 1;
animation: none;
width: 45px;
height: auto;
padding-bottom: 14px;
margin-top: 0; } }
.block-editor-block-list__block[data-align="left"].is-hovered > .block-editor-block-list__block-edit > .block-editor-block-mover,
.block-editor-block-list__block[data-align="left"].is-dragging > .block-editor-block-list__block-edit > .block-editor-block-mover, .block-editor-block-list__block[data-align="right"].is-hovered > .block-editor-block-list__block-edit > .block-editor-block-mover,
.block-editor-block-list__block[data-align="right"].is-dragging > .block-editor-block-list__block-edit > .block-editor-block-mover {
display: none; }
/** /**
* Mobile unified toolbar. * Mobile unified toolbar.
*/ */

File diff suppressed because one or more lines are too long

View File

@ -180,7 +180,7 @@ div[data-type="core/button"] div[data-block] {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex: 1 1 auto; } flex: 1 1 auto; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"], .wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"],
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit, .wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit,
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit > div[data-block], .wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit > div[data-block],
@ -600,7 +600,6 @@ div[data-type="core/freeform"].is-selected .block-library-rich-text__tinymce::af
display: none; display: none;
width: auto; width: auto;
margin: 0 -14px; margin: 0 -14px;
position: -webkit-sticky;
position: sticky; position: sticky;
z-index: 10; z-index: 10;
top: 14px; top: 14px;
@ -698,7 +697,7 @@ body.admin-color-light .blocks-gallery-item figure.is-selected {
max-height: 100%; max-height: 100%;
overflow-y: auto; } overflow-y: auto; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.blocks-gallery-item .is-selected .block-editor-rich-text { .blocks-gallery-item .is-selected .block-editor-rich-text {
left: 0; left: 0;
right: 0; right: 0;
@ -1135,7 +1134,6 @@ figure.block-library-media-text__media-container {
.wp-block-navigation-menu { .wp-block-navigation-menu {
display: -ms-grid; display: -ms-grid;
display: grid; display: grid;
grid-auto-columns: -webkit-min-content;
grid-auto-columns: min-content; grid-auto-columns: min-content;
grid-auto-flow: column; grid-auto-flow: column;
align-items: center; align-items: center;
@ -1148,7 +1146,6 @@ figure.block-library-media-text__media-container {
.wp-block-navigation-menu-item__edit-container { .wp-block-navigation-menu-item__edit-container {
display: -ms-grid; display: -ms-grid;
display: grid; display: grid;
grid-auto-columns: -webkit-min-content;
grid-auto-columns: min-content; grid-auto-columns: min-content;
grid-auto-flow: column; grid-auto-flow: column;
align-items: center; align-items: center;

File diff suppressed because one or more lines are too long

View File

@ -181,7 +181,7 @@ div[data-type="core/button"] div[data-block] {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex: 1 1 auto; } flex: 1 1 auto; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"], .wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"],
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit, .wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit,
.wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit > div[data-block], .wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit > div[data-block],
@ -605,7 +605,6 @@ div[data-type="core/freeform"].is-selected .block-library-rich-text__tinymce::af
display: none; display: none;
width: auto; width: auto;
margin: 0 -14px; margin: 0 -14px;
position: -webkit-sticky;
position: sticky; position: sticky;
z-index: 10; z-index: 10;
top: 14px; top: 14px;
@ -703,7 +702,7 @@ body.admin-color-light .blocks-gallery-item figure.is-selected {
max-height: 100%; max-height: 100%;
overflow-y: auto; } overflow-y: auto; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.blocks-gallery-item .is-selected .block-editor-rich-text { .blocks-gallery-item .is-selected .block-editor-rich-text {
right: 0; right: 0;
left: 0; left: 0;
@ -1140,7 +1139,6 @@ figure.block-library-media-text__media-container {
.wp-block-navigation-menu { .wp-block-navigation-menu {
display: -ms-grid; display: -ms-grid;
display: grid; display: grid;
grid-auto-columns: -webkit-min-content;
grid-auto-columns: min-content; grid-auto-columns: min-content;
grid-auto-flow: column; grid-auto-flow: column;
align-items: center; align-items: center;
@ -1153,7 +1151,6 @@ figure.block-library-media-text__media-container {
.wp-block-navigation-menu-item__edit-container { .wp-block-navigation-menu-item__edit-container {
display: -ms-grid; display: -ms-grid;
display: grid; display: grid;
grid-auto-columns: -webkit-min-content;
grid-auto-columns: min-content; grid-auto-columns: min-content;
grid-auto-flow: column; grid-auto-flow: column;
align-items: center; align-items: center;

File diff suppressed because one or more lines are too long

View File

@ -38,10 +38,6 @@
/** /**
* Reset the WP Admin page styles for Gutenberg-like pages. * Reset the WP Admin page styles for Gutenberg-like pages.
*/ */
.wp-block-audio figcaption {
margin-top: 0.5em;
margin-bottom: 1em; }
.wp-block-audio audio { .wp-block-audio audio {
width: 100%; width: 100%;
min-width: 300px; } min-width: 300px; }
@ -238,7 +234,7 @@
content: ""; content: "";
font-size: 0; font-size: 0;
min-height: inherit; } min-height: inherit; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.wp-block-cover-image::after, .wp-block-cover-image::after,
.wp-block-cover::after { .wp-block-cover::after {
content: none; } } content: none; } }
@ -339,9 +335,6 @@ section.wp-block-cover-image > h2,
.wp-block-embed { .wp-block-embed {
margin-bottom: 1em; } margin-bottom: 1em; }
.wp-block-embed figcaption {
margin-top: 0.5em;
margin-bottom: 1em; }
.wp-embed-responsive .wp-block-embed.wp-embed-aspect-21-9 .wp-block-embed__wrapper, .wp-embed-responsive .wp-block-embed.wp-embed-aspect-21-9 .wp-block-embed__wrapper,
.wp-embed-responsive .wp-block-embed.wp-embed-aspect-18-9 .wp-block-embed__wrapper, .wp-embed-responsive .wp-block-embed.wp-embed-aspect-18-9 .wp-block-embed__wrapper,
@ -442,7 +435,7 @@ section.wp-block-cover-image > h2,
.blocks-gallery-grid .blocks-gallery-item figure { .blocks-gallery-grid .blocks-gallery-item figure {
margin: 0; margin: 0;
height: 100%; } height: 100%; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.wp-block-gallery .blocks-gallery-image figure, .wp-block-gallery .blocks-gallery-image figure,
.wp-block-gallery .blocks-gallery-item figure, .wp-block-gallery .blocks-gallery-item figure,
.blocks-gallery-grid .blocks-gallery-image figure, .blocks-gallery-grid .blocks-gallery-image figure,
@ -462,7 +455,7 @@ section.wp-block-cover-image > h2,
.blocks-gallery-grid .blocks-gallery-image img, .blocks-gallery-grid .blocks-gallery-image img,
.blocks-gallery-grid .blocks-gallery-item img { .blocks-gallery-grid .blocks-gallery-item img {
width: 100%; } width: 100%; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.wp-block-gallery .blocks-gallery-image img, .wp-block-gallery .blocks-gallery-image img,
.wp-block-gallery .blocks-gallery-item img, .wp-block-gallery .blocks-gallery-item img,
.blocks-gallery-grid .blocks-gallery-image img, .blocks-gallery-grid .blocks-gallery-image img,
@ -496,7 +489,7 @@ section.wp-block-cover-image > h2,
.blocks-gallery-grid.is-cropped .blocks-gallery-item a, .blocks-gallery-grid.is-cropped .blocks-gallery-item a,
.blocks-gallery-grid.is-cropped .blocks-gallery-item img { .blocks-gallery-grid.is-cropped .blocks-gallery-item img {
width: 100%; } width: 100%; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.wp-block-gallery.is-cropped .blocks-gallery-image a, .wp-block-gallery.is-cropped .blocks-gallery-image a,
.wp-block-gallery.is-cropped .blocks-gallery-image img, .wp-block-gallery.is-cropped .blocks-gallery-image img,
.wp-block-gallery.is-cropped .blocks-gallery-item a, .wp-block-gallery.is-cropped .blocks-gallery-item a,
@ -682,25 +675,18 @@ section.wp-block-cover-image > h2,
.wp-block-image .aligncenter { .wp-block-image .aligncenter {
margin-right: auto; margin-right: auto;
margin-left: auto; } margin-left: auto; }
.wp-block-image figcaption {
margin-top: 0.5em;
margin-bottom: 1em; }
.is-style-circle-mask img { .is-style-circle-mask img {
border-radius: 9999px; } border-radius: 9999px; }
@supports ((-webkit-mask-image: none) or (mask-image: none)) or (-webkit-mask-image: none) { @supports (mask-image: none) or (-webkit-mask-image: none) {
.is-style-circle-mask img { .is-style-circle-mask img {
/* stylelint-disable */ /* stylelint-disable */
-webkit-mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>'); mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>');
mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>');
/* stylelint-enable */ /* stylelint-enable */
mask-mode: alpha; mask-mode: alpha;
-webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
mask-repeat: no-repeat; mask-size: contain;
-webkit-mask-size: contain; mask-position: center;
mask-size: contain;
-webkit-mask-position: center;
mask-position: center;
border-radius: none; } } border-radius: none; } }
.wp-block-latest-comments__comment { .wp-block-latest-comments__comment {
@ -1415,15 +1401,12 @@ pre.wp-block-verse {
margin-left: 0; } margin-left: 0; }
.wp-block-video video { .wp-block-video video {
max-width: 100%; } max-width: 100%; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.wp-block-video [poster] { .wp-block-video [poster] {
-o-object-fit: cover; -o-object-fit: cover;
object-fit: cover; } } object-fit: cover; } }
.wp-block-video.aligncenter { .wp-block-video.aligncenter {
text-align: center; } text-align: center; }
.wp-block-video figcaption {
margin-top: 0.5em;
margin-bottom: 1em; }
:root .has-pale-pink-background-color { :root .has-pale-pink-background-color {
background-color: #f78da7; } background-color: #f78da7; }
@ -1522,3 +1505,19 @@ pre.wp-block-verse {
.has-text-align-right { .has-text-align-right {
text-align: right; } text-align: right; }
/**
* Vanilla Block Styles
* These are base styles that apply across blocks, meant to provide a baseline.
* They are applied both to the editor and the theme, so we should have as few of these as possible.
* Please note that some styles are stored in packages/editor/src/editor-styles.scss, as they pertain to CSS bleed for the editor only.
*/
figcaption {
margin-top: 0.5em; }
img {
max-width: 100%;
height: auto; }
iframe {
width: 100%; }

File diff suppressed because one or more lines are too long

View File

@ -38,10 +38,6 @@
/** /**
* Reset the WP Admin page styles for Gutenberg-like pages. * Reset the WP Admin page styles for Gutenberg-like pages.
*/ */
.wp-block-audio figcaption {
margin-top: 0.5em;
margin-bottom: 1em; }
.wp-block-audio audio { .wp-block-audio audio {
width: 100%; width: 100%;
min-width: 300px; } min-width: 300px; }
@ -241,7 +237,7 @@
content: ""; content: "";
font-size: 0; font-size: 0;
min-height: inherit; } min-height: inherit; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.wp-block-cover-image::after, .wp-block-cover-image::after,
.wp-block-cover::after { .wp-block-cover::after {
content: none; } } content: none; } }
@ -342,9 +338,6 @@ section.wp-block-cover-image > h2,
.wp-block-embed { .wp-block-embed {
margin-bottom: 1em; } margin-bottom: 1em; }
.wp-block-embed figcaption {
margin-top: 0.5em;
margin-bottom: 1em; }
.wp-embed-responsive .wp-block-embed.wp-embed-aspect-21-9 .wp-block-embed__wrapper, .wp-embed-responsive .wp-block-embed.wp-embed-aspect-21-9 .wp-block-embed__wrapper,
.wp-embed-responsive .wp-block-embed.wp-embed-aspect-18-9 .wp-block-embed__wrapper, .wp-embed-responsive .wp-block-embed.wp-embed-aspect-18-9 .wp-block-embed__wrapper,
@ -446,7 +439,7 @@ section.wp-block-cover-image > h2,
.blocks-gallery-grid .blocks-gallery-item figure { .blocks-gallery-grid .blocks-gallery-item figure {
margin: 0; margin: 0;
height: 100%; } height: 100%; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.wp-block-gallery .blocks-gallery-image figure, .wp-block-gallery .blocks-gallery-image figure,
.wp-block-gallery .blocks-gallery-item figure, .wp-block-gallery .blocks-gallery-item figure,
.blocks-gallery-grid .blocks-gallery-image figure, .blocks-gallery-grid .blocks-gallery-image figure,
@ -466,7 +459,7 @@ section.wp-block-cover-image > h2,
.blocks-gallery-grid .blocks-gallery-image img, .blocks-gallery-grid .blocks-gallery-image img,
.blocks-gallery-grid .blocks-gallery-item img { .blocks-gallery-grid .blocks-gallery-item img {
width: 100%; } width: 100%; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.wp-block-gallery .blocks-gallery-image img, .wp-block-gallery .blocks-gallery-image img,
.wp-block-gallery .blocks-gallery-item img, .wp-block-gallery .blocks-gallery-item img,
.blocks-gallery-grid .blocks-gallery-image img, .blocks-gallery-grid .blocks-gallery-image img,
@ -500,7 +493,7 @@ section.wp-block-cover-image > h2,
.blocks-gallery-grid.is-cropped .blocks-gallery-item a, .blocks-gallery-grid.is-cropped .blocks-gallery-item a,
.blocks-gallery-grid.is-cropped .blocks-gallery-item img { .blocks-gallery-grid.is-cropped .blocks-gallery-item img {
width: 100%; } width: 100%; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.wp-block-gallery.is-cropped .blocks-gallery-image a, .wp-block-gallery.is-cropped .blocks-gallery-image a,
.wp-block-gallery.is-cropped .blocks-gallery-image img, .wp-block-gallery.is-cropped .blocks-gallery-image img,
.wp-block-gallery.is-cropped .blocks-gallery-item a, .wp-block-gallery.is-cropped .blocks-gallery-item a,
@ -690,25 +683,18 @@ section.wp-block-cover-image > h2,
.wp-block-image .aligncenter { .wp-block-image .aligncenter {
margin-left: auto; margin-left: auto;
margin-right: auto; } margin-right: auto; }
.wp-block-image figcaption {
margin-top: 0.5em;
margin-bottom: 1em; }
.is-style-circle-mask img { .is-style-circle-mask img {
border-radius: 9999px; } border-radius: 9999px; }
@supports ((-webkit-mask-image: none) or (mask-image: none)) or (-webkit-mask-image: none) { @supports (mask-image: none) or (-webkit-mask-image: none) {
.is-style-circle-mask img { .is-style-circle-mask img {
/* stylelint-disable */ /* stylelint-disable */
-webkit-mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>'); mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>');
mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>');
/* stylelint-enable */ /* stylelint-enable */
mask-mode: alpha; mask-mode: alpha;
-webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
mask-repeat: no-repeat; mask-size: contain;
-webkit-mask-size: contain; mask-position: center;
mask-size: contain;
-webkit-mask-position: center;
mask-position: center;
border-radius: none; } } border-radius: none; } }
.wp-block-latest-comments__comment { .wp-block-latest-comments__comment {
@ -1427,15 +1413,12 @@ pre.wp-block-verse {
margin-right: 0; } margin-right: 0; }
.wp-block-video video { .wp-block-video video {
max-width: 100%; } max-width: 100%; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.wp-block-video [poster] { .wp-block-video [poster] {
-o-object-fit: cover; -o-object-fit: cover;
object-fit: cover; } } object-fit: cover; } }
.wp-block-video.aligncenter { .wp-block-video.aligncenter {
text-align: center; } text-align: center; }
.wp-block-video figcaption {
margin-top: 0.5em;
margin-bottom: 1em; }
:root .has-pale-pink-background-color { :root .has-pale-pink-background-color {
background-color: #f78da7; } background-color: #f78da7; }
@ -1536,3 +1519,19 @@ pre.wp-block-verse {
.has-text-align-right { .has-text-align-right {
/*rtl:ignore*/ /*rtl:ignore*/
text-align: right; } text-align: right; }
/**
* Vanilla Block Styles
* These are base styles that apply across blocks, meant to provide a baseline.
* They are applied both to the editor and the theme, so we should have as few of these as possible.
* Please note that some styles are stored in packages/editor/src/editor-styles.scss, as they pertain to CSS bleed for the editor only.
*/
figcaption {
margin-top: 0.5em; }
img {
max-width: 100%;
height: auto; }
iframe {
width: 100%; }

File diff suppressed because one or more lines are too long

View File

@ -82,7 +82,6 @@
.edit-post-header { .edit-post-header {
height: 56px; height: 56px;
top: 0; top: 0;
position: -webkit-sticky;
position: sticky; position: sticky;
flex-wrap: nowrap; } } flex-wrap: nowrap; } }
@media (min-width: 600px) { @media (min-width: 600px) {
@ -97,7 +96,7 @@
top: 0; } } top: 0; } }
.edit-post-header > .edit-post-header__settings { .edit-post-header > .edit-post-header__settings {
order: 1; } order: 1; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.edit-post-header > .edit-post-header__settings { .edit-post-header > .edit-post-header__settings {
order: initial; } } order: initial; } }
@ -439,7 +438,7 @@ body.is-fullscreen-mode .edit-post-layout__content .components-editor-notices__s
overscroll-behavior-y: none; } } overscroll-behavior-y: none; } }
.edit-post-layout__content .edit-post-visual-editor { .edit-post-layout__content .edit-post-visual-editor {
flex: 1 1 auto; } flex: 1 1 auto; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.edit-post-layout__content .edit-post-visual-editor { .edit-post-layout__content .edit-post-visual-editor {
flex-basis: 100%; } } flex-basis: 100%; } }
.edit-post-layout__content .edit-post-layout__metaboxes { .edit-post-layout__content .edit-post-layout__metaboxes {
@ -578,7 +577,6 @@ body.is-fullscreen-mode .edit-post-layout__content .components-editor-notices__s
margin: 0 0 2rem 0; } margin: 0 0 2rem 0; }
.edit-post-manage-blocks-modal__category-title { .edit-post-manage-blocks-modal__category-title {
position: -webkit-sticky;
position: sticky; position: sticky;
top: 0; top: 0;
padding: 16px 0; padding: 16px 0;
@ -688,12 +686,15 @@ body.is-fullscreen-mode .edit-post-layout__content .components-editor-notices__s
z-index: 5; } z-index: 5; }
.edit-post-meta-boxes-area .is-hidden { .edit-post-meta-boxes-area .is-hidden {
display: none; } display: none; }
.edit-post-meta-boxes-area .metabox-location-side .postbox input[type="checkbox"] { .edit-post-meta-boxes-area .postbox-container .postbox input[type="checkbox"],
.edit-post-meta-boxes-area .postbox-container .postbox input[type="radio"] {
border: 1px solid #6c7781; } border: 1px solid #6c7781; }
.edit-post-meta-boxes-area .metabox-location-side .postbox input[type="checkbox"]:checked { .edit-post-meta-boxes-area .postbox-container .postbox input[type="checkbox"]:checked,
.edit-post-meta-boxes-area .postbox-container .postbox input[type="radio"]:checked {
background: #fff; background: #fff;
border-color: #6c7781; } border-color: #6c7781; }
.edit-post-meta-boxes-area .metabox-location-side .postbox input[type="checkbox"]::before { .edit-post-meta-boxes-area .postbox-container .postbox input[type="checkbox"]::before,
.edit-post-meta-boxes-area .postbox-container .postbox input[type="radio"]::before {
margin: -3px -4px; } margin: -3px -4px; }
.edit-post-meta-boxes-area__clear { .edit-post-meta-boxes-area__clear {
@ -871,7 +872,7 @@ body.is-fullscreen-mode .edit-post-layout__content .components-editor-notices__s
.editor-post-author__select { .editor-post-author__select {
margin: -5px 0; margin: -5px 0;
width: 100%; } width: 100%; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.editor-post-author__select { .editor-post-author__select {
width: auto; } } width: auto; } }
@ -940,7 +941,6 @@ body.is-fullscreen-mode .edit-post-layout__content .components-editor-notices__s
padding-right: 0; padding-right: 0;
padding-left: 4px; padding-left: 4px;
border-top: 0; border-top: 0;
position: -webkit-sticky;
position: sticky; position: sticky;
z-index: -1; z-index: -1;
top: 0; } top: 0; }
@ -2164,13 +2164,6 @@ body.block-editor-page {
body.is-fullscreen-mode .block-editor__container { body.is-fullscreen-mode .block-editor__container {
min-height: 100vh; } } min-height: 100vh; } }
.block-editor__container img {
max-width: 100%;
height: auto; }
.block-editor__container iframe {
width: 100%; }
.block-editor__container .components-navigate-regions { .block-editor__container .components-navigate-regions {
height: 100%; } height: 100%; }

File diff suppressed because one or more lines are too long

View File

@ -82,7 +82,6 @@
.edit-post-header { .edit-post-header {
height: 56px; height: 56px;
top: 0; top: 0;
position: -webkit-sticky;
position: sticky; position: sticky;
flex-wrap: nowrap; } } flex-wrap: nowrap; } }
@media (min-width: 600px) { @media (min-width: 600px) {
@ -97,7 +96,7 @@
top: 0; } } top: 0; } }
.edit-post-header > .edit-post-header__settings { .edit-post-header > .edit-post-header__settings {
order: 1; } order: 1; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.edit-post-header > .edit-post-header__settings { .edit-post-header > .edit-post-header__settings {
order: initial; } } order: initial; } }
@ -439,7 +438,7 @@ body.is-fullscreen-mode .edit-post-layout__content .components-editor-notices__s
overscroll-behavior-y: none; } } overscroll-behavior-y: none; } }
.edit-post-layout__content .edit-post-visual-editor { .edit-post-layout__content .edit-post-visual-editor {
flex: 1 1 auto; } flex: 1 1 auto; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.edit-post-layout__content .edit-post-visual-editor { .edit-post-layout__content .edit-post-visual-editor {
flex-basis: 100%; } } flex-basis: 100%; } }
.edit-post-layout__content .edit-post-layout__metaboxes { .edit-post-layout__content .edit-post-layout__metaboxes {
@ -578,7 +577,6 @@ body.is-fullscreen-mode .edit-post-layout__content .components-editor-notices__s
margin: 0 0 2rem 0; } margin: 0 0 2rem 0; }
.edit-post-manage-blocks-modal__category-title { .edit-post-manage-blocks-modal__category-title {
position: -webkit-sticky;
position: sticky; position: sticky;
top: 0; top: 0;
padding: 16px 0; padding: 16px 0;
@ -688,12 +686,15 @@ body.is-fullscreen-mode .edit-post-layout__content .components-editor-notices__s
z-index: 5; } z-index: 5; }
.edit-post-meta-boxes-area .is-hidden { .edit-post-meta-boxes-area .is-hidden {
display: none; } display: none; }
.edit-post-meta-boxes-area .metabox-location-side .postbox input[type="checkbox"] { .edit-post-meta-boxes-area .postbox-container .postbox input[type="checkbox"],
.edit-post-meta-boxes-area .postbox-container .postbox input[type="radio"] {
border: 1px solid #6c7781; } border: 1px solid #6c7781; }
.edit-post-meta-boxes-area .metabox-location-side .postbox input[type="checkbox"]:checked { .edit-post-meta-boxes-area .postbox-container .postbox input[type="checkbox"]:checked,
.edit-post-meta-boxes-area .postbox-container .postbox input[type="radio"]:checked {
background: #fff; background: #fff;
border-color: #6c7781; } border-color: #6c7781; }
.edit-post-meta-boxes-area .metabox-location-side .postbox input[type="checkbox"]::before { .edit-post-meta-boxes-area .postbox-container .postbox input[type="checkbox"]::before,
.edit-post-meta-boxes-area .postbox-container .postbox input[type="radio"]::before {
margin: -3px -4px; } margin: -3px -4px; }
.edit-post-meta-boxes-area__clear { .edit-post-meta-boxes-area__clear {
@ -871,7 +872,7 @@ body.is-fullscreen-mode .edit-post-layout__content .components-editor-notices__s
.editor-post-author__select { .editor-post-author__select {
margin: -5px 0; margin: -5px 0;
width: 100%; } width: 100%; }
@supports ((position: -webkit-sticky) or (position: sticky)) { @supports (position: sticky) {
.editor-post-author__select { .editor-post-author__select {
width: auto; } } width: auto; } }
@ -944,7 +945,6 @@ body.is-fullscreen-mode .edit-post-layout__content .components-editor-notices__s
padding-left: 0; padding-left: 0;
padding-right: 4px; padding-right: 4px;
border-top: 0; border-top: 0;
position: -webkit-sticky;
position: sticky; position: sticky;
z-index: -1; z-index: -1;
top: 0; } top: 0; }
@ -2168,13 +2168,6 @@ body.block-editor-page {
body.is-fullscreen-mode .block-editor__container { body.is-fullscreen-mode .block-editor__container {
min-height: 100vh; } } min-height: 100vh; } }
.block-editor__container img {
max-width: 100%;
height: auto; }
.block-editor__container iframe {
width: 100%; }
.block-editor__container .components-navigate-regions { .block-editor__container .components-navigate-regions {
height: 100%; } height: 100%; }

File diff suppressed because one or more lines are too long

View File

@ -128,7 +128,6 @@
padding: 1px 0; } padding: 1px 0; }
.components-editor-notices__dismissible { .components-editor-notices__dismissible {
position: -webkit-sticky;
position: sticky; position: sticky;
top: 56px; top: 56px;
left: 0; left: 0;
@ -379,8 +378,6 @@
display: block; display: block;
position: absolute; position: absolute;
-webkit-touch-callout: none; -webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none; -ms-user-select: none;
user-select: none; user-select: none;
pointer-events: none; pointer-events: none;

File diff suppressed because one or more lines are too long

View File

@ -128,7 +128,6 @@
padding: 1px 0; } padding: 1px 0; }
.components-editor-notices__dismissible { .components-editor-notices__dismissible {
position: -webkit-sticky;
position: sticky; position: sticky;
top: 56px; top: 56px;
right: 0; right: 0;
@ -381,8 +380,6 @@
display: block; display: block;
position: absolute; position: absolute;
-webkit-touch-callout: none; -webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none; -ms-user-select: none;
user-select: none; user-select: none;
pointer-events: none; pointer-events: none;

File diff suppressed because one or more lines are too long

View File

@ -15169,7 +15169,6 @@ var SOLID_COLOR_CLASS = "is-style-".concat(SOLID_COLOR_STYLE_NAME);
/** /**
* External dependencies * External dependencies
*/ */
@ -15212,116 +15211,10 @@ var pullquote_deprecated_blockAttributes = {
type: 'string' type: 'string'
} }
}; };
function parseBorderColor(styleString) {
if (!styleString) {
return;
}
var matches = styleString.match(/border-color:([^;]+)[;]?/);
if (matches && matches[1]) {
return matches[1];
}
}
var pullquote_deprecated_deprecated = [{ var pullquote_deprecated_deprecated = [{
attributes: Object(objectSpread["a" /* default */])({}, pullquote_deprecated_blockAttributes, { attributes: pullquote_deprecated_blockAttributes,
// figureStyle is an attribute that never existed.
// We are using it as a way to access the styles previously applied to the figure.
figureStyle: {
source: 'attribute',
selector: 'figure',
attribute: 'style'
}
}),
save: function save(_ref) { save: function save(_ref) {
var attributes = _ref.attributes; var attributes = _ref.attributes;
var mainColor = attributes.mainColor,
customMainColor = attributes.customMainColor,
textColor = attributes.textColor,
customTextColor = attributes.customTextColor,
value = attributes.value,
citation = attributes.citation,
className = attributes.className,
figureStyle = attributes.figureStyle;
var isSolidColorStyle = Object(external_lodash_["includes"])(className, SOLID_COLOR_CLASS);
var figureClasses, figureStyles; // Is solid color style
if (isSolidColorStyle) {
var backgroundClass = Object(external_this_wp_blockEditor_["getColorClassName"])('background-color', mainColor);
figureClasses = classnames_default()(Object(defineProperty["a" /* default */])({
'has-background': backgroundClass || customMainColor
}, backgroundClass, backgroundClass));
figureStyles = {
backgroundColor: backgroundClass ? undefined : customMainColor
}; // Is normal style and a custom color is being used ( we can set a style directly with its value)
} else if (customMainColor) {
figureStyles = {
borderColor: customMainColor
}; // If normal style and a named color are being used, we need to retrieve the color value to set the style,
// as there is no expectation that themes create classes that set border colors.
} else if (mainColor) {
// Previously here we queried the color settings to know the color value
// of a named color. This made the save function impure and the block was refactored,
// because meanwhile a change in the editor made it impossible to query color settings in the save function.
// Here instead of querying the color settings to know the color value, we retrieve the value
// directly from the style previously serialized.
var borderColor = parseBorderColor(figureStyle);
figureStyles = {
borderColor: borderColor
};
}
var blockquoteTextColorClass = Object(external_this_wp_blockEditor_["getColorClassName"])('color', textColor);
var blockquoteClasses = (textColor || customTextColor) && classnames_default()('has-text-color', Object(defineProperty["a" /* default */])({}, blockquoteTextColorClass, blockquoteTextColorClass));
var blockquoteStyles = blockquoteTextColorClass ? undefined : {
color: customTextColor
};
return Object(external_this_wp_element_["createElement"])("figure", {
className: figureClasses,
style: figureStyles
}, Object(external_this_wp_element_["createElement"])("blockquote", {
className: blockquoteClasses,
style: blockquoteStyles
}, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
value: value,
multiline: true
}), !external_this_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
tagName: "cite",
value: citation
})));
},
migrate: function migrate(_ref2) {
var className = _ref2.className,
figureStyle = _ref2.figureStyle,
mainColor = _ref2.mainColor,
attributes = Object(objectWithoutProperties["a" /* default */])(_ref2, ["className", "figureStyle", "mainColor"]);
var isSolidColorStyle = Object(external_lodash_["includes"])(className, SOLID_COLOR_CLASS); // If is the default style, and a main color is set,
// migrate the main color value into a custom color.
// The custom color value is retrived by parsing the figure styles.
if (!isSolidColorStyle && mainColor && figureStyle) {
var borderColor = parseBorderColor(figureStyle);
if (borderColor) {
return Object(objectSpread["a" /* default */])({}, attributes, {
className: className,
customMainColor: borderColor
});
}
}
return Object(objectSpread["a" /* default */])({
className: className,
mainColor: mainColor
}, attributes);
}
}, {
attributes: pullquote_deprecated_blockAttributes,
save: function save(_ref3) {
var attributes = _ref3.attributes;
var mainColor = attributes.mainColor, var mainColor = attributes.mainColor,
customMainColor = attributes.customMainColor, customMainColor = attributes.customMainColor,
textColor = attributes.textColor, textColor = attributes.textColor,
@ -15375,8 +15268,8 @@ var pullquote_deprecated_deprecated = [{
} }
}, { }, {
attributes: Object(objectSpread["a" /* default */])({}, pullquote_deprecated_blockAttributes), attributes: Object(objectSpread["a" /* default */])({}, pullquote_deprecated_blockAttributes),
save: function save(_ref4) { save: function save(_ref2) {
var attributes = _ref4.attributes; var attributes = _ref2.attributes;
var value = attributes.value, var value = attributes.value,
citation = attributes.citation; citation = attributes.citation;
return Object(external_this_wp_element_["createElement"])("blockquote", null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, { return Object(external_this_wp_element_["createElement"])("blockquote", null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
@ -15399,8 +15292,8 @@ var pullquote_deprecated_deprecated = [{
default: 'none' default: 'none'
} }
}), }),
save: function save(_ref5) { save: function save(_ref3) {
var attributes = _ref5.attributes; var attributes = _ref3.attributes;
var value = attributes.value, var value = attributes.value,
citation = attributes.citation, citation = attributes.citation,
align = attributes.align; align = attributes.align;
@ -15469,24 +15362,13 @@ function (_Component) {
var _this$props = this.props, var _this$props = this.props,
colorUtils = _this$props.colorUtils, colorUtils = _this$props.colorUtils,
textColor = _this$props.textColor, textColor = _this$props.textColor,
setAttributes = _this$props.setAttributes,
setTextColor = _this$props.setTextColor, setTextColor = _this$props.setTextColor,
setMainColor = _this$props.setMainColor, setMainColor = _this$props.setMainColor,
className = _this$props.className; className = _this$props.className;
var isSolidColorStyle = Object(external_lodash_["includes"])(className, SOLID_COLOR_CLASS); var isSolidColorStyle = Object(external_lodash_["includes"])(className, SOLID_COLOR_CLASS);
var needTextColor = !textColor.color || this.wasTextColorAutomaticallyComputed; var needTextColor = !textColor.color || this.wasTextColorAutomaticallyComputed;
var shouldSetTextColor = isSolidColorStyle && needTextColor && colorValue; var shouldSetTextColor = isSolidColorStyle && needTextColor && colorValue;
setMainColor(colorValue);
if (isSolidColorStyle) {
// If we use the solid color style, set the color using the normal mechanism.
setMainColor(colorValue);
} else {
// If we use the default style, set the color as a custom color to force the usage of an inline style.
// Default style uses a border color for which classes are not available.
setAttributes({
customMainColor: colorValue
});
}
if (shouldSetTextColor) { if (shouldSetTextColor) {
this.wasTextColorAutomaticallyComputed = true; this.wasTextColorAutomaticallyComputed = true;
@ -15500,36 +15382,16 @@ function (_Component) {
setTextColor(colorValue); setTextColor(colorValue);
this.wasTextColorAutomaticallyComputed = false; this.wasTextColorAutomaticallyComputed = false;
} }
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
var _this$props2 = this.props,
attributes = _this$props2.attributes,
className = _this$props2.className,
mainColor = _this$props2.mainColor,
setAttributes = _this$props2.setAttributes; // If the block includes a named color and we switched from the
// solid color style to the default style.
if (attributes.mainColor && !Object(external_lodash_["includes"])(className, SOLID_COLOR_CLASS) && Object(external_lodash_["includes"])(prevProps.className, SOLID_COLOR_CLASS)) {
// Remove the named color, and set the color as a custom color.
// This is done because named colors use classes, in the default style we use a border color,
// and themes don't set classes for border colors.
setAttributes({
mainColor: undefined,
customMainColor: mainColor.color
});
}
}
}, { }, {
key: "render", key: "render",
value: function render() { value: function render() {
var _this$props3 = this.props, var _this$props2 = this.props,
attributes = _this$props3.attributes, attributes = _this$props2.attributes,
mainColor = _this$props3.mainColor, mainColor = _this$props2.mainColor,
textColor = _this$props3.textColor, textColor = _this$props2.textColor,
setAttributes = _this$props3.setAttributes, setAttributes = _this$props2.setAttributes,
isSelected = _this$props3.isSelected, isSelected = _this$props2.isSelected,
className = _this$props3.className; className = _this$props2.className;
var value = attributes.value, var value = attributes.value,
citation = attributes.citation; citation = attributes.citation;
var isSolidColorStyle = Object(external_lodash_["includes"])(className, SOLID_COLOR_CLASS); var isSolidColorStyle = Object(external_lodash_["includes"])(className, SOLID_COLOR_CLASS);
@ -15635,6 +15497,7 @@ function (_Component) {
*/ */
/** /**
* Internal dependencies * Internal dependencies
*/ */
@ -15663,6 +15526,13 @@ function pullquote_save_save(_ref) {
} else if (customMainColor) { } else if (customMainColor) {
figureStyles = { figureStyles = {
borderColor: customMainColor borderColor: customMainColor
}; // If normal style and a named color are being used, we need to retrieve the color value to set the style,
// as there is no expectation that themes create classes that set border colors.
} else if (mainColor) {
var colors = Object(external_lodash_["get"])(Object(external_this_wp_data_["select"])('core/block-editor').getSettings(), ['colors'], []);
var colorObject = Object(external_this_wp_blockEditor_["getColorObjectByAttributeValues"])(colors, mainColor);
figureStyles = {
borderColor: colorObject.color
}; };
} }

File diff suppressed because one or more lines are too long

View File

@ -2234,12 +2234,10 @@ function (_Component) {
var _this$props = this.props, var _this$props = this.props,
postId = _this$props.postId, postId = _this$props.postId,
postStatus = _this$props.postStatus, postStatus = _this$props.postStatus,
postType = _this$props.postType, postType = _this$props.postType;
isSavingPost = _this$props.isSavingPost; var historyId = this.state.historyId;
var historyId = this.state.historyId; // Posts are still dirty while saving so wait for saving to finish
// to avoid the unsaved changes warning when trashing posts.
if (postStatus === 'trash' && !isSavingPost) { if (postStatus === 'trash') {
this.setTrashURL(postId, postType); this.setTrashURL(postId, postType);
return; return;
} }
@ -2293,8 +2291,7 @@ function (_Component) {
}(external_this_wp_element_["Component"]); }(external_this_wp_element_["Component"]);
/* harmony default export */ var browser_url = (Object(external_this_wp_data_["withSelect"])(function (select) { /* harmony default export */ var browser_url = (Object(external_this_wp_data_["withSelect"])(function (select) {
var _select = select('core/editor'), var _select = select('core/editor'),
getCurrentPost = _select.getCurrentPost, getCurrentPost = _select.getCurrentPost;
isSavingPost = _select.isSavingPost;
var _getCurrentPost = getCurrentPost(), var _getCurrentPost = getCurrentPost(),
id = _getCurrentPost.id, id = _getCurrentPost.id,
@ -2304,8 +2301,7 @@ function (_Component) {
return { return {
postId: id, postId: id,
postStatus: status, postStatus: status,
postType: type, postType: type
isSavingPost: isSavingPost()
}; };
})(browser_url_BrowserURL)); })(browser_url_BrowserURL));

File diff suppressed because one or more lines are too long

View File

@ -12329,9 +12329,9 @@ function (_Component) {
}, { }, {
key: "warnIfUnsavedChanges", key: "warnIfUnsavedChanges",
value: function warnIfUnsavedChanges(event) { value: function warnIfUnsavedChanges(event) {
var isEditedPostDirty = this.props.isEditedPostDirty; var isDirty = this.props.isDirty;
if (isEditedPostDirty()) { if (isDirty) {
event.returnValue = Object(external_this_wp_i18n_["__"])('You have unsaved changes. If you proceed, they will be lost.'); event.returnValue = Object(external_this_wp_i18n_["__"])('You have unsaved changes. If you proceed, they will be lost.');
return event.returnValue; return event.returnValue;
} }
@ -12348,11 +12348,7 @@ function (_Component) {
/* harmony default export */ var unsaved_changes_warning = (Object(external_this_wp_data_["withSelect"])(function (select) { /* harmony default export */ var unsaved_changes_warning = (Object(external_this_wp_data_["withSelect"])(function (select) {
return { return {
// We need to call the selector directly in the listener to avoid race isDirty: select('core/editor').isEditedPostDirty()
// conditions with `BrowserURL` where `componentDidUpdate` gets the
// new value of `isEditedPostDirty` before this component does,
// causing this component to incorrectly think a trashed post is still dirty.
isEditedPostDirty: select('core/editor').isEditedPostDirty
}; };
})(unsaved_changes_warning_UnsavedChangesWarning)); })(unsaved_changes_warning_UnsavedChangesWarning));

File diff suppressed because one or more lines are too long

View File

@ -229,8 +229,8 @@ function wp_default_packages_scripts( &$scripts ) {
'api-fetch' => '3.6.4', 'api-fetch' => '3.6.4',
'autop' => '2.5.1', 'autop' => '2.5.1',
'blob' => '2.5.1', 'blob' => '2.5.1',
'block-editor' => '3.2.4', 'block-editor' => '3.2.3',
'block-library' => '2.9.5', 'block-library' => '2.9.4',
'block-serialization-default-parser' => '3.4.1', 'block-serialization-default-parser' => '3.4.1',
'blocks' => '6.7.2', 'blocks' => '6.7.2',
'components' => '8.3.2', 'components' => '8.3.2',
@ -242,11 +242,11 @@ function wp_default_packages_scripts( &$scripts ) {
'deprecated' => '2.6.1', 'deprecated' => '2.6.1',
'dom-ready' => '2.5.1', 'dom-ready' => '2.5.1',
'dom' => '2.5.2', 'dom' => '2.5.2',
'edit-post' => '3.8.5', 'edit-post' => '3.8.4',
'editor' => '9.7.5', 'editor' => '9.7.4',
'element' => '2.8.2', 'element' => '2.8.2',
'escape-html' => '1.5.1', 'escape-html' => '1.5.1',
'format-library' => '1.9.4', 'format-library' => '1.9.3',
'hooks' => '2.6.0', 'hooks' => '2.6.0',
'html-entities' => '2.5.0', 'html-entities' => '2.5.0',
'i18n' => '3.6.1', 'i18n' => '3.6.1',

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.4-alpha-46662'; $wp_version = '5.4-alpha-46663';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.