WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#45043 closed task (blessed) (fixed)

Twenty Fifteen: Update theme to add Gutenberg styles and support

Reported by: laurelfulford Owned by: laurelfulford
Milestone: 5.0 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch, commit, fixed-5.0
Focuses: Cc:

Description

This ticket is to add Gutenberg styles and support for Twenty Fifteen, so it best takes advantage of the new editor.

For default themes, at the very least this would include adding styles for blocks to make sure they match the rest of the theme’s design, adding Gutenberg-specific editor styles for a better WYSIWYG experience, and adding theme support for the editor color palette.

Each default theme’s unique design should be considered for whether it makes sense to add support for wide alignments, and the best approach.

Attachments (8)

45043.patch (30.2 KB) - added by laurelfulford 3 years ago.
twentyfifteen-alignments-before-after.png (492.3 KB) - added by laurelfulford 3 years ago.
Alignments and dropcap, before and after
twentyfifteen-common-blocks-before-after.png (701.9 KB) - added by laurelfulford 3 years ago.
Common blocks, before and after
twentyfiteen-classic-block-before-after.png (613.8 KB) - added by laurelfulford 3 years ago.
Classic Block showing the Markup post from the Theme Unit Test Data, before and after
45043.1.patch (33.8 KB) - added by laurelfulford 3 years ago.
twentyfifteen-color-palette.png (23.3 KB) - added by laurelfulford 3 years ago.
Editor colour palette
45043.2.patch (34.2 KB) - added by laurelfulford 3 years ago.
45043.3.patch (34.2 KB) - added by laurelfulford 3 years ago.

Download all attachments as: .zip

Change History (18)

@laurelfulford
3 years ago

#1 @laurelfulford
3 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

I'll keep an eye on #45045 and incorporate anything decided there to the other themes, but since Beta 1 is coming up fast (October 19th), I figured it would be good to get the basic patches posted for the other themes.

45043.patch helps make sure the Gutenberg blocks match Twenty Fifteen's styles on the front-end, and adds styles for the editor.

I'm also attaching some screenshots of the editor before and after, since it's the most dramatic change, but if there's anything else specific anyone would like to see here, let me know!

@laurelfulford
3 years ago

Alignments and dropcap, before and after

@laurelfulford
3 years ago

Common blocks, before and after

@laurelfulford
3 years ago

Classic Block showing the Markup post from the Theme Unit Test Data, before and after

#2 @laurelfulford
3 years ago

45043.1.patch ​ is based on the original patch, and fixes some minor issues, including making sure the styles are correct for RTL languages. It also fixes an error in code to enqueue fonts into the Gutenberg editor.

Similar to Twenty Sixteen's, the patch adds an editor colour palette based on the theme's different colour schemes (though simplified, since there's a lot of repetition of close shades within individual colour schemes, and across the whole set). I'll include a screenshot below.

This may be more confusing than not to include for Twenty Fifteen and Sixteen, which has a similar custom colour setup, so I'd be interested to know what people think.

@laurelfulford
3 years ago

Editor colour palette

#3 @davidakennedy
3 years ago

Hi @laurelfulford! I tested your latest patch. Overall, very solid. Here's what I found:

#4 @laurelfulford
3 years ago

Thanks @davidakennedy!

These should all be fixed in 45043.2.patch! Like in #45044, I also removed some styles in this patch that were for the HTML Block in the editor, which has been updated in the latest version of Gutenberg.

#5 @laurelfulford
3 years ago

45043.3.patch is a really minor update that:

  • Updates some of the CSS section headers, for consistency with the other themes, and fixes the order
  • Swaps get_theme_file_uri() with get_template_directory_uri() for blocks.css, to make the enqueue format more consistent, and switches the versioning from numbers to date.

#6 @davidakennedy
3 years ago

@laurelfulford This looks good to commit for Beta. Marking it as so in case you can get to it before me today.

#7 @davidakennedy
3 years ago

  • Keywords commit added; needs-testing removed

#8 @davidakennedy
3 years ago

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

In 43798:

Twenty Fifteen: Add styles and support for the new block-based editor.

This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Fifteen.

These are the specific changes made to this theme:

  • Add blocks.css, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles.
  • Add editor-blocks.css to style blocks in the editor, to make sure they match the theme’s existing HTML element styles.
  • Add theme support for editor-styles, to pull the existing editor stylesheet into the new editor.
  • Add theme support for wp-block-styles, to load the default block styles on the front end.
  • Add theme support for editor-color-palette, to load a color palette based on the theme’s color scheme into the block-based editor.

Props laurelfulford.
Fixes #45043.

#9 @SergeyBiryukov
3 years ago

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

Reopening for trunk.

#10 @desrosj
3 years ago

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

In 44145:

Twenty Fifteen: Add styles and support for the new block-based editor.

This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Fifteen.

These are the specific changes made to this theme:

  • Add blocks.css, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles.
  • Add editor-blocks.css to style blocks in the editor, to make sure they match the theme’s existing HTML element styles.
  • Add theme support for editor-styles, to pull the existing editor stylesheet into the new editor.
  • Add theme support for wp-block-styles, to load the default block styles on the front end.
  • Add theme support for editor-color-palette, to load a color palette based on the theme’s color scheme into the block-based editor.

Props laurelfulford, davidkennedy.

Merges [43798] to trunk.

Fixes #45043.

Note: See TracTickets for help on using tickets.