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

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

* Update editor placeholder text to use the correct font family.
* 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 the 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 #45246.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
laurelfulford 2018-11-06 06:17:47 +00:00
parent c42f50371e
commit 1e73770c39
3 changed files with 51 additions and 8 deletions

View File

@ -97,11 +97,14 @@ p.has-drop-cap:not(:focus)::first-letter {
width: 100%;
}
/* Cover Image */
/* Cover */
.wp-block-cover-image.alignright,
.wp-block-cover.alignright,
.wp-block-cover-image.alignleft,
.wp-block-cover-image.aligncenter {
.wp-block-cover.alignleft,
.wp-block-cover-image.aligncenter,
.wp-block-cover.aligncenter {
display: flex;
}
@ -219,10 +222,29 @@ p.has-drop-cap:not(:focus)::first-letter {
max-width: 100px;
}
/* Media & Text */
.wp-block-media-text {
margin-bottom: 1.5em;
}
.wp-block-media-text *:last-child {
margin-bottom: 0;
}
/*--------------------------------------------------------------
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;
text-align: center;
}
/* Comments */
.wp-block-latest-comments article {

View File

@ -25,6 +25,10 @@ Description: Used to style Gutenberg Blocks in the editor.
font-size: 0.9375rem;
}
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
}
.edit-post-visual-editor .editor-block-list__block {
color: #333;
}
@ -346,10 +350,12 @@ html[lang="th"] .edit-post-visual-editor * {
/* Main column width */
body.gutenberg-editor-page .edit-post-visual-editor .editor-post-title__block,
body.gutenberg-editor-page .edit-post-visual-editor .editor-default-block-appender,
body.gutenberg-editor-page .edit-post-visual-editor .editor-block-list__block {
max-width: 740px;
.editor-styles-wrapper {
max-width: 100% !important; /* Override where editor-style.css is affecting this. */
}
.wp-block {
max-width: 674px; /* Based on one-column post width; 644px + 30px to account for padding. */
}
/* Background color */
@ -695,7 +701,7 @@ table.wp-block-table td:last-child {
5.0 Blocks - Layout Elements
--------------------------------------------------------------*/
/* Separators */
/* Separator */
.edit-post-visual-editor .wp-block-separator {
border: 0;
@ -721,10 +727,25 @@ table.wp-block-table td:last-child {
transition: background-color 0.2s ease-in-out;
white-space: nowrap;
}
/* Media & Text */
.wp-block-media-text *:last-child {
margin-bottom: 0;
}
/*--------------------------------------------------------------
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;
}
/* Latest Comments */
.editor-block-list__block ol.wp-block-latest-comments > li:before {

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-beta3-43875';
$wp_version = '5.0-beta3-43876';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.