Gutenberg: Selecting Text Color on a Group Block does nothing

Created on 17 Apr 2020  路  6Comments  路  Source: WordPress/gutenberg

Describe the bug
Selecting the Text Color for a Group Block does nothing. Why does this option even exist? You can't add text straight into a Group Block. The only way to add text content into a Group Block is by adding another block such as a Heading Block or a Paragraph block, and when you do, those individual blocks control the colour of the text. It seems pointless having this option when it doesn't do anything. If you're going to keep the Text Color setting, then it needs to override the text colour on ALL the blocks contained within that Group, otherwise it should be removed.

Video: https://share.getcloudapp.com/jkulqXWd

To reproduce
Steps to reproduce the behavior:

  1. Add Group Block
  2. Insert Paragraph Block into Group Block with some dummy content
  3. Reselect the Group Block
  4. Change Text Color on the Group Block
  5. See nothing change

Expected behaviour
I would expect that by changing the text colour on a group block, all the text within that Group Block would change colour, but it doesn't because the text colour for the Blocks within a Group Block, are controlled by those individual Blocks.

Editor version (please complete the following information):

  • WordPress version: 5.4
  • Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? Default
  • If the Gutenberg plugin is installed, which version is it? [e.g., 7.6]

Desktop (please complete the following information):

  • OS: macOS 10.15.4
  • Browser: Firefox 75.0
  • Theme: Twenty Nineteen
[Status] Needs More Info

All 6 comments

Completely agree, if the text color option exists, it should work. However I can't reproduce the issue, in TwentyNineteen for me it works as it should do:

Screenshot 2020-04-17 at 10 59 30

This is admittedly running 5.4.1 alpha, and my TwentyNineteen version is version 1.5. The key difference from watching your video is that you appear to have the color palette that TwentyNineteen registers, which I suspect overrides the color styles that the editor allows you to set. What version of TwentyNineteen are you running?

@jasmussen It was using the latest version as of WP5.4 which was v1.5.

Indeed, I can reproduce this on the stable WordPress 5.4 running TwentyNineteen. It appears that TwentyNineteen sets a specific color regardless of custom text color, when one of the theme palette colors are chosen, which in turn overrides any custom color you set for text.

I also tested in TwentyTwenty and noted that this is not an issue. So I will create a trac ticket for fixing this in TwentyNineteen as it's not a block editor issue.

On a separate note, though, it appears the theme color palettes are not visible in master, neither for TwentyNineteen or TwentyTwenty. I suspect this is part of the ongoing global styles work, but CC: @nosolosw and @karmatosed in case you can confirm.

Created https://core.trac.wordpress.org/ticket/49931 to track this. Thanks for the ticket!

Thanks for creating that.

On a separate note, though, it appears the theme color palettes are not visible in master, neither for TwentyNineteen or TwentyTwenty. I suspect this is part of the ongoing global styles work

Just checked master and it works well for me. I don't use the dev environment provided by Gutenberg, though. I've also tested using it (npx wp-env start) and it looks like I can't get the theme color palettes to show either. Not sure if it is the same issue, but, in the past, I've experienced something related.

Was this page helpful?
0 / 5 - 0 ratings