#8079 closed defect (bug) (fixed)
Theme preview: block themes: parent theme global styles missing in child theme preview
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Priority: | high | |
| Component: | Theme Directory | Keywords: | |
| Cc: |
Description
If a child theme does not duplicate all styles & settings of its parent theme in the child theme's theme.json, the parent styles are not loaded in the preview.
Duplicating all parent global styles is not needed for the child theme to function correctly in a normal WordPress site, but in the theme preview it seems this is necessary. Is this a bug or is it intentional?
Example:
https://wordpress.org/themes/skincare-brand/preview/
https://wp-themes.com/skincare-brand/
Change History (5)
#2
@
5 months ago
Thanks for the information.
I'll add that other aspects of child theming such as templating seem to be working correctly. In the example the front-page template is fetched from the child theme, and the page template is from the parent theme as expected.
#3
@
5 months ago
- Owner set to dd32
- Status changed from new to accepted
Turns out this is a long-standing issue I already knew about:
https://core.trac.wordpress.org/ticket/57141
https://github.com/wordpress/gutenberg/issues/45811
Definitely a bug. It should behave the same as if the theme was installed / activated on a site as normal.
The problem is likely that the Theme Activation steps aren't actually run in the preview, which is somehow causing the styles not to load. This might be something to do with the fact that it's not running within an admin context.