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

Buttons: Add ability to apply styling from one Button block to all adjacent buttons in the same Buttons block #38267

Closed
andrewserong opened this issue Jan 27, 2022 · 4 comments
Labels
[Block] Buttons Affects the Buttons Block Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.

Comments

@andrewserong
Copy link
Contributor

What problem does this address?

Following on from the UX improvement in #37904 to copy button styling from adjacent buttons when inserting a button block, it'd be nice to come up with a way to easily copy the styling from one button in a set of buttons to the rest of the buttons within that same set.

Currently if you make changes to one block in isolation, there's no easy way to immediately apply those changes to all other blocks within the set. You have to already know to select all blocks at the one time. Imagine, as a user, making a change to one block as in the following screenshot, and then wanting to apply that style to all the other blocks in the set:

image

What is your proposed solution?

One option would be to provide a control at the individual block level (e.g. a button) to copy styling to all similar nearby blocks (kudos @mtias for the idea). This would primarily be to solve this issue for the Button / Buttons blocks, to make it easier to adjust the styling for one set of buttons, however it could be worth exploring a more general solution if it seems valuable for other blocks (e.g. images within a gallery block).

@andrewserong andrewserong added [Type] Enhancement A suggestion for improvement. [Block] Buttons Affects the Buttons Block labels Jan 27, 2022
@mtias mtias added the Needs Design Needs design efforts. label Jan 27, 2022
@ZebulanStanphill
Copy link
Member

Divi has had a copy-styles feature for a few years now.

https://www.elegantthemes.com/blog/theme-releases/divi-feature-update-a-game-changing-new-way-to-be-creative-with-divi

Thanks to the standardization brought by the global styles system, I think it's definitely feasible to have something similar in Gutenberg.

Also, I imagine that the code added in #37596 might provide a little inspiration for how to implement a copy-styles feature.

@stackpath-andrew
Copy link

Sorry if this isn't relevant to the issue, but its the closest issue I have seen to my issue...

I have been struggling to get Border color options working in the editor for the button block. Is this possible? I tried enabling the appearanceTools and setting the blocks > core/button > border: { color: true }... but this isn't working. Any help is appreciated

@annezazu
Copy link
Contributor

Could this be closed, considering we have the ability to copy/paste styles as well as customizing one button and creating a new one keeping the prior design?

@andrewserong
Copy link
Contributor Author

Yes, of course, let's close this out 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Buttons Affects the Buttons Block Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants