developer-blog-content icon indicating copy to clipboard operation
developer-blog-content copied to clipboard

You don't need CSS for that: All the ways you can use theme.json for styling

Open bph opened this issue 1 year ago • 0 comments

Discussed in https://github.com/WordPress/developer-blog-content/discussions/302

Originally posted by justintadlock September 3, 2024 Some feedback from devs on a specific project (CC: @mikachan):

They weren’t aware of all the options available in theme.json and didn’t realise how much SCSS could be moved there.

While most of the options are documented in the Theme Handbook, those docs don't really show the various use cases. Sometimes, a walkthrough is needed for folks to understand how these pieces connect.

The goal is here to write a tutorial that's aimed at classic themers (and new themers) on really using theme.json to style their themes. The tutorial would cover things like:

  • Defining presets (standard and custom) via the settings object
  • Working with the styles object to design basic and more complex designs
  • Using style variations (theme, block/section, color, and typography) instead of CSS
  • When you must revert back to using CSS/stylesheets

Basically, we have the docs in place that describes what things are. Now it's time to show how to actually use them.

bph avatar Sep 10 '24 13:09 bph