Skip to content

Child themes should inherit style variations #45965

@ockham

Description

@ockham

What problem does this address?

When creating a child theme for an existing block theme that has style variations (such as Twenty Twenty Three), the child theme will currently not include those style variations. If the child theme author wishes to have them included, they will have to manually copy the parent theme's styles/ folder.

First reported in WP.org support forums here.

What is your proposed solution?

Per discussion with @MaggieCabrera: Have child themes include the parent theme's style variations automatically, plus any style variations that the child adds. (If there are any naming collisions, the child's style variation should probably override the parent's style variation with the same name.)

Rationale: I feel that this would be consistent with the way child themes of block themes handle templates. Furthermore, we might want to retain the possibility to create a child theme that only consists of a style.css file (and still inherit all the parent's functionality), as is possible with classic themes.

We might want to take stock of any other features of block themes that might also not currently be automatically inherited by their child themes.


Note that there is a learn.wordpress.org resource on that subject, and while it mentions that a Block Theme’s child theme should include a theme.json, there’s no mention of requiring a styles/ folder to include Style Variations. For now, I'll ask to update that resource to include instructions how to add the parent's style variations.

Metadata

Metadata

Assignees

Labels

[Feature] Theme Style VariationsRelated to style variations provided by block themes[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions