The `theme` namespace

Description

Even tho we recommend theme developers to use the theme namespace, we don’t have a

User Stories

As a theme developer
I want to know what properties I should add to the theme namespace
so that final users can configure them in their settings file

As a theme developer
I want to know what properties I should add to the theme namespace
so that other packages can use them

Examples

  • The wp-comments could look for state.theme.colors.primary to do some styling that matches the theme.

Possible solution

  • Some of the properties could be required, like a primary color.
  • Some of the properties could be optional.

This theme specification it is interesting, even tho it is still a work-in-progress. It’s used by styled-system ecosystem.

There is a proposal for a design system in Gutenberg. We should take a look at that too: