Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#45239 closed defect (bug) (fixed)

Twenty Eleven: Issues in theme’s Gutenberg support & styles

Reported by: laurelfulford's profile laurelfulford Owned by: laurelfulford's profile laurelfulford
Milestone: 5.0 Priority: normal
Severity: normal Version: 5.0
Component: Bundled Theme Keywords: has-patch, has-screenshots, commit, dev-reviewed, fixed-5.0
Focuses: Cc:

Description

I’ve re-reviewed the Gutenberg support that added in #45039, primarily to find anything that might have been missed, but also make sure none of the other changes happening during 5.0 development so far created a need for theme updates, too.

I opted to combine my findings per theme into one ticket, since many of the issues showed up in more than one of the default themes — it seemed easier for patching and reviewing, given the timeframe.

In Twenty Eleven, I found these issues:

  1. Centred widget lists (Categories, Archives…) need to have the text centred, like the editor.
  2. The cover blocks need to have their styles updated to add the newer non -image- variations of the cover block classes (.wp-block-cover and .wp-block-cover-text)
  3. The Media & Text block does not have spacing underneath it.
  4. Editor width selectors can be simplified to just use wp-block in Gutenberg 4.2 RC
  5. The margin styles being pulled in from the theme’s original editor styles are causing the content in Gutenberg to sit on the the left. This is new in Gutenberg’s 4.2 RC 1 as well.

Attachments (11)

twenty-eleven-centred-categories-before.png (62.0 KB) - added by laurelfulford 6 years ago.
1. Centred category widget, not being centred
twenty-eleven-media-text-before.png (176.3 KB) - added by laurelfulford 6 years ago.
3. Media & Text block, without spacing underneath it
twenty-eleven-editor-width-before.png (79.1 KB) - added by laurelfulford 6 years ago.
5. Editor, with content sitting to the left
45239.patch (2.6 KB) - added by laurelfulford 6 years ago.
twenty-eleven-centred-categories-after.png (70.5 KB) - added by laurelfulford 6 years ago.
1. Centred category widget, fixed
twenty-eleven-media-text-after.png (175.9 KB) - added by laurelfulford 6 years ago.
3. Media & Text block, after fix
twenty-eleven-editor-width-after.png (94.5 KB) - added by laurelfulford 6 years ago.
5. Editor alignment, after fix
Centered points.png (41.0 KB) - added by pento 6 years ago.
45239.1.patch (3.3 KB) - added by laurelfulford 6 years ago.
twenty-eleven-centred-widgets-bullet-position (90.3 KB) - added by laurelfulford 6 years ago.
Twenty Eleven - move centred widget bullets to a centred position as well
twenty-eleven-media-text-margin-last-child.png (167.9 KB) - added by laurelfulford 6 years ago.
Twenty Eleven - remove bottom margin from last child in Media & Text block

Download all attachments as: .zip

Change History (20)

@laurelfulford
6 years ago

  1. Centred category widget, not being centred

@laurelfulford
6 years ago

  1. Media & Text block, without spacing underneath it

@laurelfulford
6 years ago

  1. Editor, with content sitting to the left

@laurelfulford
6 years ago

@laurelfulford
6 years ago

  1. Centred category widget, fixed

@laurelfulford
6 years ago

  1. Media & Text block, after fix

@laurelfulford
6 years ago

  1. Editor alignment, after fix

#1 @laurelfulford
6 years ago

45239.patch addresses all of the issues listed above, though I only included screenshots where it seemed relevant.

#2 @davidakennedy
6 years ago

  • Keywords commit added; needs-testing removed

@laurelfulford This one looks good as well. Marking it to commit.

@pento
6 years ago

#3 @pento
6 years ago

  • Keywords dev-reviewed added

It looks kind of weird to have the text centred, but the dot points aren't. I'm not sure if centring the points helps, though.

If y'all are happy with the current behaviour, 45239.patch is good to commit.

@laurelfulford
6 years ago

Twenty Eleven - move centred widget bullets to a centred position as well

@laurelfulford
6 years ago

Twenty Eleven - remove bottom margin from last child in Media & Text block

#4 @laurelfulford
6 years ago

Thanks @pento & @davidakennedy!

45239.1.patch makes sure the bullets are centred with the content in centred widget blocks. It was originally acting inconsistently across browsers -- I personally think the centred bullets look more "right" ("righter"?), so this change should make that consistent across the board.

It also fixes an issue @davidakennedy noted in other tickets, removing the margin from the bottom of the last child of a Media & Text block, which was otherwise adding too much space under the block.

Last edited 6 years ago by laurelfulford (previous) (diff)

#5 @pento
6 years ago

💯

#6 @davidakennedy
6 years ago

The latest patch looks good to me, @laurelfulford.

#7 @laurelfulford
6 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 43870:

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.

#8 @SergeyBiryukov
6 years ago

  • Keywords fixed-5.0 added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for trunk.

#9 @desrosj
6 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 44152:

Bundled Themes: Expand initial block editor support.

A handful of items were missed when adding initial support for the new block editor to bundled themes in [43793]-[43800]. This adds support for those missed items.

Props pento, davidakennedy, laurelfulford.

Merges [43869], [43870], [43871], [43872], [43873], [43874], [43875], [43876] to trunk.

Fixes #45238, #45239, #45240, #45242, #45243, #45244, #45245, #45246.

Note: See TracTickets for help on using tickets.