WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.3k stars 4.11k forks source link

Add repeat-x and repeat-y options to background images #62608

Open jordesign opened 2 months ago

jordesign commented 2 months ago

Currently it is possible to set 'repeat' on background images (assigned to blocks). It would be good to be able to select repeat-x or repeat-y as well for greater control

t-hamano commented 2 months ago

I think this is a great suggestion.

However, since the backgroud-repeat property can use four properties, repeat, no-repeat, space, and round, I think we need to consider how much support we need to provide.

I would like to suggest some design ideas.

If all values ​​are supported

Use ToggleGroupControl

full-suport_1

Use SelectControl

full-support_2

If only repeat and no-repeat are supported

Use ToggleGroupControl

repeat-1

Use ToggleControl

repeat-2

Use SelectControl

repeat-3

cc @ramonjd @WordPress/gutenberg-design

ramonjd commented 2 months ago

Thanks for the issue.

I think @t-hamano is right - most of the heavy thinking on adding support will be how to present the design tools. πŸ‘πŸ»

I'll also add this issue tentatively to the tracking issue.

jameskoster commented 2 months ago

I would lean towards the SelectControl design (with the addition of a 'None' option) to begin with. round and space seem very niche to me.