Make WordPress Core

Changeset 43875

Timestamp:
11/06/2018 06:06:00 AM (6 years 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
     80
     81
     82
     83
    7784}
    7885
     
    241248}
    242249
     250
     251
     252
     253
     254
     255
     256
     257
     258
     259
    243260/*--------------------------------------------------------------
    2442615.0 Blocks - Widget Blocks
    245262--------------------------------------------------------------*/
     263
     264
     265
     266
     267
     268
     269
     270
     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
     554
     555
     556
     557
     558
    551559/*--------------------------------------------------------------
    5525606.0 Blocks - Widgets
    553561--------------------------------------------------------------*/
     562
     563
     564
     565
     566
     567
     568
     569
    554570
    555571/* Latest Comments */
Note: See TracChangeset for help on using the changeset viewer.