Make WordPress Core

Changeset 43870


Ignore:
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/* Media & Text */
     267
     268.wp-block-media-text {
     269    margin-bottom: 1.625em;
     270}
     271
     272.wp-block-media-text *:last-child {
     273    margin-bottom: 0;
     274}
     275
    263276/*--------------------------------------------------------------
    2642775.0 Blocks - Widgets
    265278--------------------------------------------------------------*/
     279
     280/* Archives, Categories & Latest Posts */
     281
     282.wp-block-archives.aligncenter,
     283.wp-block-categories.aligncenter,
     284.wp-block-latest-posts.aligncenter {
     285    list-style-position: inside;
     286    margin-left: 2.5em;
     287    text-align: center;
     288}
     289
     290.rtl .wp-block-archives.aligncenter,
     291.rtl .wp-block-categories.aligncenter,
     292.rtl .wp-block-latest-posts.aligncenter {
     293    margin-left: 0;
     294    margin-right: 2.5em;
     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 p.wp-block-cover-text {
    295297    font-size: 30px;
    296298    line-height: 37.5px;
     
    386388}
    387389
     390/* Media & Text */
     391
     392.wp-block-media-text *:last-child {
     393    margin-bottom: 0;
     394}
     395
    388396/*--------------------------------------------------------------
    3893976.0 Blocks - Widgets
    390398--------------------------------------------------------------*/
     399
     400/* Archives, Categories & Latest Posts */
     401
     402[data-align="center"] .wp-block-archives ul,
     403[data-align="center"] .wp-block-categories ul,
     404[data-align="center"] .wp-block-latest-posts ul {
     405    list-style-position: inside;
     406    margin-left: 2.5em;
     407    text-align: center;
     408}
    391409
    392410/* Latest Comments */
Note: See TracChangeset for help on using the changeset viewer.