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

Custom gradient cannot be edited if there are no explicit stops specified. #23501

Closed
properlypurple opened this issue Jun 26, 2020 · 0 comments · Fixed by #27413
Closed

Custom gradient cannot be edited if there are no explicit stops specified. #23501

properlypurple opened this issue Jun 26, 2020 · 0 comments · Fixed by #27413
Assignees
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@properlypurple
Copy link
Contributor

Describe the bug
When declaring custom gradient presets, if a gradient is described without explicit stops, it's not possible to edit it in the gradient control in the editor.

To reproduce
Steps to reproduce the behavior:

  1. Add this code to your theme
add_theme_support( 
	'editor-gradient-presets', 
	array(
		array(
		'name'     => __( 'Gradient', 'themeslug'  ),
		'gradient' => 'linear-gradient(to bottom, #000000, #123456 )',
		'slug'     => 'new-gradient'
		)
	)
);
  1. Edit a post/page, and select a block which supports gradients
  2. Try selecting the gradient described in the code above
  3. No color stops appear in the gradient bar control.

Expected behavior
When no explicit stops are defined, the control should calculate them automatically and insert color stops.

Screenshots
Screenshot_2020-06-26 Edit Post ‹ purple-seedling — WordPress

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.4

Desktop (please complete the following information):

  • OS: Archlinux
  • Browser: Firefox
  • Version: 77.0.1
@annezazu annezazu added [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [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 30, 2020
@jorgefilipecosta jorgefilipecosta self-assigned this Aug 10, 2020
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants