Twenty Eleven: Fix issues with theme's Gutenberg support.

A handful of issues were missed in Twenty Eleven's Gutenberg support, added in #45039. This commit includes the following fixes:

* Center text and bullets in list-based widget blocks when block itself is centered.
* Include non "image" variations of the Cover block classes `.wp-block-cover` and `.wp-block-cover-text` in the styles.
* Add spacing underneath the Media & Text block, but make sure final paragraph in the block doesn't add too much space.
* Simplify selectors used to set editor width to just `.wp-block`.
* Prevent margin from theme's editor-style.css from interfering with editor alignment. 

Props pento, davidakennedy.
Fixes #45239.


Built from https://develop.svn.wordpress.org/branches/5.0@43870


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
laurelfulford 2018-11-06 01:01:48 +00:00
parent 8532f185b6
commit f89d4e6bb2
3 changed files with 60 additions and 12 deletions

View File

@ -130,18 +130,21 @@ p.has-drop-cap:not(:focus)::first-letter {
width: 100%; width: 100%;
} }
/* Cover Image */ /* Cover */
.wp-block-cover-image.aligncenter { .wp-block-cover-image.aligncenter,
.wp-block-cover.aligncenter {
clear: both; clear: both;
display: flex; display: flex;
} }
.wp-block-cover-image.alignleft { .wp-block-cover-image.alignleft,
.wp-block-cover.alignleft {
margin-right: 1.625em; margin-right: 1.625em;
} }
.wp-block-cover-image.alignright { .wp-block-cover-image.alignright,
.wp-block-cover.alignright {
margin-left: 1.625em; margin-left: 1.625em;
} }
@ -260,10 +263,37 @@ p.has-drop-cap:not(:focus)::first-letter {
max-width: 100%; max-width: 100%;
} }
/* Media & Text */
.wp-block-media-text {
margin-bottom: 1.625em;
}
.wp-block-media-text *:last-child {
margin-bottom: 0;
}
/*-------------------------------------------------------------- /*--------------------------------------------------------------
5.0 Blocks - Widgets 5.0 Blocks - Widgets
--------------------------------------------------------------*/ --------------------------------------------------------------*/
/* Archives, Categories & Latest Posts */
.wp-block-archives.aligncenter,
.wp-block-categories.aligncenter,
.wp-block-latest-posts.aligncenter {
list-style-position: inside;
margin-left: 2.5em;
text-align: center;
}
.rtl .wp-block-archives.aligncenter,
.rtl .wp-block-categories.aligncenter,
.rtl .wp-block-latest-posts.aligncenter {
margin-left: 0;
margin-right: 2.5em;
}
/* Latest Comments */ /* Latest Comments */
.wp-block-latest-comments { .wp-block-latest-comments {

View File

@ -72,10 +72,12 @@ Description: Used to style Gutenberg Blocks in the editor.
/* Main column width */ /* Main column width */
body.gutenberg-editor-page .edit-post-visual-editor .editor-post-title__block, .editor-styles-wrapper {
body.gutenberg-editor-page .edit-post-visual-editor .editor-default-block-appender, max-width: 100% !important; /* Override where editor-style.css is affecting this. */
body.gutenberg-editor-page .edit-post-visual-editor .editor-block-list__block { }
max-width: 614px;
.wp-block {
max-width: 614px; /* 584px + 30px to account for padding */
} }
/* Link styles */ /* Link styles */
@ -288,10 +290,10 @@ p.has-drop-cap:not(:focus)::first-letter {
font-size: 16px; font-size: 16px;
} }
/* Cover */
/* Cover Image */ .edit-post-visual-editor .editor-block-list__block .wp-block-cover-image p.wp-block-cover-image-text,
.edit-post-visual-editor .editor-block-list__block .wp-block-cover p.wp-block-cover-text {
.edit-post-visual-editor .editor-block-list__block .wp-block-cover-image p.wp-block-cover-image-text {
font-size: 30px; font-size: 30px;
line-height: 37.5px; line-height: 37.5px;
} }
@ -385,10 +387,26 @@ p.has-drop-cap:not(:focus)::first-letter {
text-shadow: 0 -1px 0 rgba(0,0,0,0.3); text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
} }
/* Media & Text */
.wp-block-media-text *:last-child {
margin-bottom: 0;
}
/*-------------------------------------------------------------- /*--------------------------------------------------------------
6.0 Blocks - Widgets 6.0 Blocks - Widgets
--------------------------------------------------------------*/ --------------------------------------------------------------*/
/* Archives, Categories & Latest Posts */
[data-align="center"] .wp-block-archives ul,
[data-align="center"] .wp-block-categories ul,
[data-align="center"] .wp-block-latest-posts ul {
list-style-position: inside;
margin-left: 2.5em;
text-align: center;
}
/* Latest Comments */ /* Latest Comments */
.wp-block-latest-comments { .wp-block-latest-comments {

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.0-beta3-43869'; $wp_version = '5.0-beta3-43870';
/** /**
* 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.