Skip to content

block.json API: consider graduating __experimentalSelector and __experimentalDuotone from experimental to stable #45194

@oandregal

Description

@oandregal

Part of #45171

What

The __experimentalSelector and __experimentalDuotone for block.json should become stable APIs.

Why

  • __experimentalSelector has been introduced in WordPress 5.8 and evolved since. It covers certain use cases for which there is no other alternative (some blocks don't use the wp-block-<block-name> class for various reasons.
  • __experimentalDuotone has been introduced in WordPress 5.8 and evolved since. It covers the use case of providing selectors for a specific style property (duotone) and there has been no alternatives considered.

Related docs: architecture of styles.

How

Things to consider:

  • The ability to have a general selector for the whole block VS having a selector per style property. Is this fully working as expected?
  • They both cover a similar use case, providing a selector for a given style property. Can both coalesce into a single "block selector API"?
  • We should evaluate creating a migration from the old mechanisms (__experimentalSelector, __experimentalDuotone) to the new one, or communicate that we'll support both old (experimental) and new (stable) for a given period of time.

Metadata

Metadata

Labels

Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] Block APIAPI that allows to express the block paradigm.[Type] Code QualityIssues or PRs that relate to code quality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions