WordPress.org

Make WordPress Core

Changeset 43875


Ignore:
Timestamp:
11/06/2018 06:06:00 AM (12 months ago)
Author:
laurelfulford
Message:

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

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

  • Center text and bullets in list-based widget blocks, when block itself is centered.
  • Correct styles for the editor placeholder text, so it's not inheriting a darker gray from the theme's CSS.
  • Include non "image" variations of the Cover block classes .wp-block-cover and .wp-block-cover-text in the styles.
  • Reset Cover blocks as display: flex when they are centered, to maintain their original appearance.
  • 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 #45245.

Location:
branches/5.0/src/wp-content/themes/twentysixteen/css
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-content/themes/twentysixteen/css/blocks.css

    r43799 r43875  
    7575    display: block;
    7676    width: 100%;
     77}
     78
     79/* Cover */
     80
     81.wp-block-cover-image.aligncenter,
     82.wp-block-cover.aligncenter {
     83    display: flex;
    7784}
    7885
     
    241248}
    242249
     250/* Media & Text */
     251
     252.wp-block-media-text {
     253    margin-bottom: 1.75em;
     254}
     255
     256.wp-block-media-text *:last-child {
     257    margin-bottom: 0;
     258}
     259
    243260/*--------------------------------------------------------------
    2442615.0 Blocks - Widget Blocks
    245262--------------------------------------------------------------*/
     263
     264/* Archives, Categories & Latest Posts */
     265
     266.wp-block-archives.aligncenter,
     267.wp-block-categories.aligncenter,
     268.wp-block-latest-posts.aligncenter {
     269    list-style-position: inside;
     270    text-align: center;
     271}
    246272
    247273/* Latest Comments */
  • branches/5.0/src/wp-content/themes/twentysixteen/css/editor-blocks.css

    r43799 r43875  
    2121.edit-post-visual-editor .editor-block-list__block,
    2222.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
    23     color: #1a1a1a;
    2423    font-family: Merriweather, Georgia, serif;
    2524    font-size: 16px;
     
    174173/* Main column width */
    175174
    176 body.gutenberg-editor-page .edit-post-visual-editor .editor-post-title__block,
    177 body.gutenberg-editor-page .edit-post-visual-editor .editor-default-block-appender,
    178 body.gutenberg-editor-page .edit-post-visual-editor .editor-block-list__block {
    179     max-width: 630px; /* 600px + 30px for padding; should be 840px for pages */
     175.editor-styles-wrapper {
     176    max-width: 100% !important; /* Override where editor-style.css is affecting this */
     177}
     178
     179.wp-block {
     180    max-width: 630px; /* 600px + 30px to account for padding. */
    180181}
    181182
     
    536537
    537538/* Buttons */
     539
    538540.wp-block-button .wp-block-button__link {
    539541    background: #1a1a1a;
     
    549551}
    550552
     553/* Media & Text */
     554
     555.wp-block-media-text *:last-child {
     556    margin-bottom: 0;
     557}
     558
    551559/*--------------------------------------------------------------
    5525606.0 Blocks - Widgets
    553561--------------------------------------------------------------*/
     562
     563/* Archives, Categories & Latest Posts */
     564
     565[data-align="center"] .wp-block-archives ul,
     566[data-align="center"] .wp-block-categories ul,
     567[data-align="center"] .wp-block-latest-posts ul {
     568    list-style-position: inside;
     569}
    554570
    555571/* Latest Comments */
Note: See TracChangeset for help on using the changeset viewer.