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

Hexadecimal colors in gradient presets break the block preview #23361

Closed
properlypurple opened this issue Jun 22, 2020 · 1 comment
Closed

Hexadecimal colors in gradient presets break the block preview #23361

properlypurple opened this issue Jun 22, 2020 · 1 comment
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Bug An existing feature does not function as intended

Comments

@properlypurple
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

To reproduce
Steps to reproduce the behavior:

  1. Add this code for the gradient preset
add_theme_support( 
  'editor-gradient-presets', 
  array(
    array(
      'name'     => __( 'Hex gradient', 'themeslug'  ),
      'gradient' => 'linear-gradient(to bottom, #000000 50%, #123456 100%)',
      'slug'     => 'hex-gradient'
    )
  )
);
  1. Add a group block, and verify that the gradient option appears in the color settings
    Screenshot_2020-06-22 Edit Post ‹ purple-seedling — WordPress

  2. Click on the gradient you've added

  3. See error
    Screenshot_2020-06-22 Edit Post ‹ purple-seedling — WordPress(1)

Error message from console.
error1.txt

Expected behavior
The gradient works.

Editor version (please complete the following information):

  • WordPress version: 5.4.2
  • Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? : gutenberg plugin
  • If the Gutenberg plugin is installed, which version is it? : 8.3.1

Desktop (please complete the following information):

  • OS: Archlinux
  • Browser Firefox
  • Version 77.0.1

Additional Information
This is similar to #21831

@kjellr kjellr added [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Bug An existing feature does not function as intended labels Jun 22, 2020
@properlypurple
Copy link
Contributor Author

The pull request #23363 has been merged, so this can be closed.

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. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants