Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-defined background gradients on list blocks are still enabled after custom block coloring has been disabled in functions.php #32047

Closed
nasajones opened this issue May 20, 2021 · 2 comments
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. Needs Testing Needs further testing to be confirmed.

Comments

@nasajones
Copy link

nasajones commented May 20, 2021

Description

After disabling custom colors in the theme's functions.php file, users are still able to select pre-defined gradient backgrounds for list blocks.

Step-by-step reproduction instructions

  1. Install and activate a theme
  2. Install and activate the Gutenberg plugin
  3. Disable custom coloring in the theme's functions.php file:
    add_action( 'after_setup_theme', 'disable_custom_colors' );
    function disable_custom_colors() {
    add_theme_support( 'disable-custom-colors' );
    add_theme_support( 'disable-custom-gradients' );
    add_theme_support( 'editor-color-palette' );
    add_theme_support( 'editor-gradient-presets', [] );
    }

Expected behaviour

Coloring options for all blocks should be disabled.

  • Pre-defined text color
  • Custom text color
  • Pre-defined solid background color
  • Custom solid background color
  • Gradient background color
  • Pre-defined link color
  • Custom link color

Actual behaviour

Pre-defined background gradients are not disabled for list blocks.

Screenshots or screen recording (optional)

Paragraph block, colors enabled:
github1

Paragraph block, colors disabled:
github2

List block, colors enabled:
github3

List block, colors disabled:
github4

Code snippet (optional)

WordPress information

  • WordPress version: 5.7.2
  • Gutenberg version: 10.6.2
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? This issue has been verified with Twenty Twenty-One 1.3 and Genesis Pro 3.3.3.

Device information

  • Device: Desktop
  • Operating system: Windows 10
  • Browser: Chrome 90
@nasajones nasajones changed the title Pre-defined background gradients on list blocks are still enabled after custom block coloring has been disabled in functions.php Pre-defined background gradients on some blocks are still enabled after custom block coloring has been disabled in functions.php Jun 1, 2021
@nasajones nasajones changed the title Pre-defined background gradients on some blocks are still enabled after custom block coloring has been disabled in functions.php Pre-defined background gradients on list blocks are still enabled after custom block coloring has been disabled in functions.php Jun 1, 2021
@talldan talldan added [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. Needs Testing Needs further testing to be confirmed. labels Jun 9, 2021
@nasajones
Copy link
Author

nasajones commented Jun 11, 2021

It looks like this may have been fixed with the release of Gutenberg 10.8.

@jorgefilipecosta
Copy link
Member

Hi @nasajones, thank you for reporting this issue it was fixed in #32358, and on the next Gutenberg release the issue should not be preset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. Needs Testing Needs further testing to be confirmed.
Projects
None yet
Development

No branches or pull requests

3 participants