Make WordPress Core

Changeset 43870

Timestamp:
11/06/2018 01:00:58 AM (6 years ago)
Author:
laurelfulford
Message:

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.

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

Legend:

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

    r43794 r43870  
    131131}
    132132
    133 /* Cover Image */
    134 
    135 .wp-block-cover-image.aligncenter {
     133/* Cover */
     134
     135.wp-block-cover-image.aligncenter,
     136.wp-block-cover.aligncenter {
    136137    clear: both;
    137138    display: flex;
    138139}
    139140
    140 .wp-block-cover-image.alignleft {
     141.wp-block-cover-image.alignleft,
     142.wp-block-cover.alignleft {
    141143    margin-right: 1.625em;
    142144}
    143145
    144 .wp-block-cover-image.alignright {
     146.wp-block-cover-image.alignright,
     147.wp-block-cover.alignright {
    145148    margin-left: 1.625em;
    146149}
     
    261264}
    262265
     266
     267
     268
     269
     270
     271
     272
     273
     274
     275
    263276/*--------------------------------------------------------------
    2642775.0 Blocks - Widgets
    265278--------------------------------------------------------------*/
     279
     280
     281
     282
     283
     284
     285
     286
     287
     288
     289
     290
     291
     292
     293
     294
     295
    266296
    267297/* Latest Comments */
  • branches/5.0/src/wp-content/themes/twentyeleven/editor-blocks.css

    r43794 r43870  
    7373/* Main column width */
    7474
    75 body.gutenberg-editor-page .edit-post-visual-editor .editor-post-title__block,
    76 body.gutenberg-editor-page .edit-post-visual-editor .editor-default-block-appender,
    77 body.gutenberg-editor-page .edit-post-visual-editor .editor-block-list__block {
    78     max-width: 614px;
     75.editor-styles-wrapper {
     76    max-width: 100% !important; /* Override where editor-style.css is affecting this. */
     77}
     78
     79.wp-block {
     80    max-width: 614px; /* 584px + 30px to account for padding */
    7981}
    8082
     
    289291}
    290292
    291 
    292 /* Cover Image */
    293 
    294 .edit-post-visual-editor .editor-block-list__block .wp-block-cover-image p.wp-block-cover-image-text {
     293/* Cover */
     294
     295.edit-post-visual-editor .editor-block-list__block .wp-block-cover-image p.wp-block-cover-image-text,
     296.edit-post-visual-editor .editor-block-list__block .wp-block-cover-text {
    295297    font-size: 30px;
    296298    line-height: 37.5px;
     
    386388}
    387389
     390
     391
     392
     393
     394
     395
    388396/*--------------------------------------------------------------
    3893976.0 Blocks - Widgets
    390398--------------------------------------------------------------*/
     399
     400
     401
     402
     403
     404
     405
     406
     407
     408
    391409
    392410/* Latest Comments */
Note: See TracChangeset for help on using the changeset viewer.