Coutoire: Reduce specificity on rules to hide extra color palettes
This commit is contained in:
parent
04bc8a94ee
commit
ca9bb138ba
1 changed files with 10 additions and 0 deletions
|
@ -189,6 +189,16 @@ function coutoire_editor_styles() {
|
||||||
|
|
||||||
// Enqueue Google fonts in the editor, if necessary
|
// Enqueue Google fonts in the editor, if necessary
|
||||||
wp_enqueue_style( 'coutoire-editor-fonts', coutoire_fonts_url(), array(), null );
|
wp_enqueue_style( 'coutoire-editor-fonts', coutoire_fonts_url(), array(), null );
|
||||||
|
|
||||||
|
// Hide duplicate palette colors
|
||||||
|
$colors_array = get_theme_mod( 'colors_manager', array( 'colors' => true ) ); // color annotations array()
|
||||||
|
if ( ! empty( $colors_array ) && $colors_array['colors']['txt'] != '#767676' ) { // $config-global--color-foreground-light-default;
|
||||||
|
$inline_palette_css = '.components-circular-option-picker__option-wrapper:nth-child(5),
|
||||||
|
.components-circular-option-picker__option-wrapper:nth-child(6) {
|
||||||
|
display: none;
|
||||||
|
}';
|
||||||
|
wp_add_inline_style( 'wp-edit-blocks', $inline_palette_css );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
add_action( 'enqueue_block_editor_assets', 'coutoire_editor_styles' );
|
add_action( 'enqueue_block_editor_assets', 'coutoire_editor_styles' );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue