Twenty Seventeen: child themes can't easily extend custom color patterns
|Reported by:||celloexpressions||Owned by:||davidakennedy|
|Component:||Bundled Theme||Keywords:||has-patch commit dev-reviewed|
Child themes of Twenty Seventeen may elect to retain the base custom colors functionality, for example if the child theme makes primarily functional rather than visual changes. However, it is currently not possible to extend the base custom colors CSS directly.
Rather than adding separate functions and style elements to print child theme-specific extensions of the base theme colors CSS, and manually adding a live-preview mechanism for the customizer, child themes should be able to filter the generated CSS directly, with direct access to the current hue and saturation as well.
The forthcoming patch adds the filter to twentyseventeen_custom_colors_css() and will be followed by an example. This allows child themes (or plugins) to add CSS in one place without needing to add previewing logic or even deal with outputting the CSS.
Note: the dark color scheme can be easily supported within the child theme's main CSS file or a separate one, by scoping CSS to .colors-dark. A filter is needed for custom color schemes.
Change History (11)
4 months ago
- Keywords commit added
- Owner set to davidakennedy
- Status changed from new to assigned