[wp-trac] [WordPress Trac] #38949: Twenty Seventeen: child themes can't easily extend custom color patterns
WordPress Trac
noreply at wordpress.org
Sat Nov 26 20:48:07 UTC 2016
#38949: Twenty Seventeen: child themes can't easily extend custom color patterns
------------------------------+-----------------------
Reporter: celloexpressions | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7
Component: Bundled Theme | Version: trunk
Severity: normal | Keywords: has-patch
Focuses: |
------------------------------+-----------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38949>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list