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

Style variations: Add "Randomize" button #39629

Closed
jasmussen opened this issue Mar 22, 2022 · 3 comments · Fixed by #40988
Closed

Style variations: Add "Randomize" button #39629

jasmussen opened this issue Mar 22, 2022 · 3 comments · Fixed by #40988
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json Needs Design Feedback Needs general design feedback.

Comments

@jasmussen
Copy link
Contributor

The Global Styles system has a new "style variation" system that allows you to add named copies of theme.json into a styles folder in your theme. For example, twentytwentytwo/styles/blue.json. These style variations are saved copies of a style configuration, meaning they can change colors, fonts, borders, radiuses, and more.

As the system gets refined, it would be interesting to leverage just how light-weight of a system this is, and showcase that through a "Randomize" button:

Global styles randomization

Note: the above mockup is missing aspects such as style-card improvements and saving custom variations. That's not an intentional omission, it'll be added when those solidify. See also #38333.

The button would not randomize every property available, it would randomize a select few, such as:

  • Background, text and link colors
  • Font of paragraphs and headings

That could be a good starting point, and then we could expand the list once that feels solid, for example to include:

  • Border radius of a few select blocks, such as Image, Featured Image and Site Logo
  • Default duotones
  • Anything else.

Where available, theme-provided presets (colors, duotones, fonts) should be chosen by the randomizer.

A key value both in choosing which initial properties and blocks to randomize is to ensure compelling results. If randomizing a specific property doesn't yield good variations, we should leave it out. There will always be new opportunites to expand randomization.

What do you think?

@jasmussen jasmussen added Needs Design Feedback Needs general design feedback. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Mar 22, 2022
@jasmussen
Copy link
Contributor Author

CC: @vcanales as I think you've been looking into some of this stuff.

@critterverse
Copy link
Contributor

Awesome!! This seems to work well locked to the bottom of the panel. Also agree that the color and typography attributes identified above would be a great place to start 🚀

@shaunandrews
Copy link
Contributor

So this wouldn't randomly choose one of the existing styles, but rather create a new styles with random values for some set of properties?

I do worry this would preset bad combinations more often than good ones, but could see it being a fun way to find a starting point for further tweaking.

I imagine a "Randomize" button wouldn't be used very often (if at all), which makes me question its existence in the UI.

@priethor priethor linked a pull request May 11, 2022 that will close this issue
2 tasks
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 Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json Needs Design Feedback Needs general design feedback.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants