[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:51:44 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 | Resolution:
Keywords: has-patch | Focuses:
------------------------------+--------------------
Comment (by celloexpressions):
With [attachment:38949.diff], themes can do something along the lines of:
{{{
// Add child theme selectors for color schemes.
function dynamic_seventeen_custom_colors_css( $css, $hue, $saturation ) {
$css .= '
.colors-custom .content-menu > article:not(.has-post-thumbnail),
.colors-custom .content-menu > section:not(.has-post-thumbnail) {
border-top-color: hsl( ' . $hue . ', ' . $saturation . ',
87% ); /* base: #ddd; */
}';
return $css;
}
add_filter( 'twentyseventeen_custom_colors_css',
'dynamic_seventeen_custom_colors_css', 10, 3 );
}}}
To add any custom styles that need color schemes to apply.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38949#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list