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

Tutorial on block style variations in theme.json #113

Closed
bph opened this issue May 8, 2023 Discussed in #103 · 7 comments
Closed

Tutorial on block style variations in theme.json #113

bph opened this issue May 8, 2023 Discussed in #103 · 7 comments
Assignees

Comments

@bph
Copy link
Collaborator

bph commented May 8, 2023

Discussed in #103

Originally posted by justintadlock April 26, 2023
This post would be a full tutorial on how theme developers can add styles for custom style variations via theme.json. It should also cover how this applies to the user experience in the Styles interface. And provide examples of what is possible and any potential issues.

Resources:

@justintadlock
Copy link

Tutorial in progress here: https://docs.google.com/document/d/18YQwvz_3OWooHfiAveiykPD-iUfPPPPMw6EkcaviN0k/edit?usp=sharing

I expect to have a first draft of this ready on Monday, May 22 or Tuesday, May 23.

@justintadlock
Copy link

I ran into a bit of a snag with this. You cannot currently register styles for custom style variations, at least until this ticket is resolved: WordPress/gutenberg#49602

This was a misunderstanding on my part from the original ticket and the documentation when both mentioned editing an "existing" style variation. I mistook "existing" to mean "registered." What it actually means in this context is "core" variation.

I can probably push forward with this tutorial with an explanation that custom variations will have to wait for that ticket to be resolved.

@justintadlock justintadlock changed the title Tutorial on style variations in theme.json Tutorial on block style variations in theme.json May 24, 2023
@justintadlock
Copy link

I ended up taking a different direction than I had originally intended with the second part of the post. The first part is a tutorial on styling core block style variations. The second part covers what is expected to land in WordPress 6.3 to expand on this feature.

Post is now ready for review: https://docs.google.com/document/d/18YQwvz_3OWooHfiAveiykPD-iUfPPPPMw6EkcaviN0k/edit?usp=sharing

@justintadlock
Copy link

Thanks, @marybaum for running through a review so quickly.

@marybaum
Copy link
Member

You are most welcome! Don't tell anyone I was working on it during the first part of devchat 😜

@justintadlock
Copy link

Second review by @ryanwelcher and @mburridge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Published (Done)
Development

No branches or pull requests

3 participants