123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- <?php declare( strict_types = 1 ); ?>
- <?php
- /*
- * Custom Editor Colors: Varia
- */
- // Background Color (White)
- // $config-global--color-background-default
- add_editor_color_rule( 'bg', '#ffffff', array(
- // Background-color
- array( '#editor .editor-styles-wrapper,
- #editor .editor-styles-wrapper .fse-template-part .main-navigation > div > ul > li > .sub-menu', 'background-color' ),
- // Text-color
- array( '#editor .editor-styles-wrapper .button,
- #editor .editor-styles-wrapper .button.has-focus,
- #editor .editor-styles-wrapper .button:focus,
- #editor .editor-styles-wrapper .button:hover,
- #editor .editor-styles-wrapper .fse-template-part .main-navigation .button,
- #editor .editor-styles-wrapper .fse-template-part .main-navigation .button:focus,
- #editor .editor-styles-wrapper .fse-template-part .main-navigation .button:hover,
- #editor .editor-styles-wrapper .fse-template-part .main-navigation .has-focus.button,
- #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button,
- #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:focus,
- #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:hover,
- #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .has-focus.button,
- #editor .editor-styles-wrapper table.is-style-stripes tbody tr:nth-child(odd),
- #editor .editor-styles-wrapper .wp-block-table.is-style-stripes tbody tr:nth-child(odd),
- #editor .editor-styles-wrapper .wp-block-button .wp-block-button__link,
- #editor .editor-styles-wrapper .wp-block-button .wp-block-button__link.has-focus,
- #editor .editor-styles-wrapper .wp-block-button .wp-block-button__link:focus,
- #editor .editor-styles-wrapper .wp-block-button .wp-block-button__link:hover,
- #editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color,
- #editor .editor-styles-wrapper .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover-image-text,
- #editor .editor-styles-wrapper .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover-text,
- #editor .editor-styles-wrapper .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover__inner-container,
- #editor .editor-styles-wrapper .wp-block-cover:not([class*="background-color"]) .wp-block-cover-image-text,
- #editor .editor-styles-wrapper .wp-block-cover:not([class*="background-color"]) .wp-block-cover-text,
- #editor .editor-styles-wrapper .wp-block-cover:not([class*="background-color"]) .wp-block-cover__inner-container,
- #editor .editor-styles-wrapper .wp-block-search .wp-block-search__button,
- #editor .editor-styles-wrapper .wp-block-cover.has-background-dim,
- #editor .editor-styles-wrapper .wp-block-cover.has-background-dim a,
- #editor .editor-styles-wrapper .wp-block-cover-image.has-background-dim,
- #editor .editor-styles-wrapper .has-background a', 'color' ),
- /**
- * Utility Classes
- */
- // Text-color
- array( '#editor .editor-styles-wrapper .has-primary-background-color,
- #editor .editor-styles-wrapper .has-secondary-background-color,
- #editor .editor-styles-wrapper .has-foreground-background-color,
- #editor .editor-styles-wrapper .has-foreground-dark-background-color,
- #editor .editor-styles-wrapper .has-foreground-light-background-color,
- #editor .editor-styles-wrapper .has-background-color', 'color' ),
- // Background-color
- array( '#editor .editor-styles-wrapper .has-background-background-color[class]', 'background-color' ),
- // Text-color darkened
- array( '#editor .editor-styles-wrapper .has-background-dark-color[class]', 'color', '-1' ),
- // Background-color darkened
- array( '#editor .editor-styles-wrapper .has-background-dark-background-color[class]', 'background-color', '-1' ),
- // Text-color lightened
- array( '#editor .editor-styles-wrapper .has-background-light-color[class]', 'color', '+1' ),
- // Background-color lightened
- array( '#editor .editor-styles-wrapper .has-background-light-background-color[class]', 'background-color', '+1' ),
- /**
- * Clean up for nested items
- */
- // Text-color
- array( '#editor .editor-styles-wrapper .has-background:not(.has-background-background-color) .wp-block-quote .wp-block-quote__citation,
- #editor .editor-styles-wrapper [class*="background-color"]:not(.has-background-background-color) .wp-block-quote .wp-block-quote__citation,
- #editor .editor-styles-wrapper [style*="background-color"]:not(.has-background-background-color) .wp-block-quote .wp-block-quote__citation,
- #editor .editor-styles-wrapper .wp-block-cover[style*="background-image"] .wp-block-quote .wp-block-quote__citation', 'color' ),
- // Border-color
- array( '#editor .editor-styles-wrapper .has-background:not(.has-background-background-color) .wp-block-quote,
- #editor .editor-styles-wrapper [class*="background-color"]:not(.has-background-background-color) .wp-block-quote,
- #editor .editor-styles-wrapper [style*="background-color"]:not(.has-background-background-color) .wp-block-quote,
- #editor .editor-styles-wrapper .wp-block-cover[style*="background-image"] .wp-block-quote', 'border-color'),
- ), __( 'Background Color' ) );
- // Link Color (Blue)
- // $config-global--color-primary-default
- add_editor_color_rule( 'link', '#3E7D98', array(
- // Background-color
- array( '#editor .editor-styles-wrapper .button,
- #editor .editor-styles-wrapper .fse-template-part .main-navigation .button,
- #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button,
- #editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background),
- #editor .editor-styles-wrapper .wp-block-search .wp-block-search__button,
- #editor .editor-styles-wrapper .wp-block-search .wp-block-search__button:focus,
- #editor .editor-styles-wrapper .wp-block-search .wp-block-search__button:hover,
- #editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'background-color' ),
- // Text-color
- array( '#editor .editor-styles-wrapper .is-style-outline .wp-block-button__link:not(.has-text-color),
- #editor .editor-styles-wrapper .wp-block-button__link.is-style-outline:not(.has-text-color),
- #editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a,
- #editor .editor-styles-wrapper .wp-block-separator.is-style-dots:before,
- #editor .editor-styles-wrapper a,
- #editor .editor-styles-wrapper hr.is-style-dots:before', 'color' ),
-
- // Border-color (forms)
- array( '#editor .editor-styles-wrapper .wp-block-search .wp-block-search__input:focus,
- textarea:focus', 'border-color' ),
- // Border color top
- array( '#editor .editor-styles-wrapper .wp-block-pullquote', 'border-top-color' ),
- // Border color bottom
- array( '#editor .editor-styles-wrapper .wp-block-pullquote,
- #editor .editor-styles-wrapper .wp-block-separator,
- #editor .editor-styles-wrapper hr', 'border-bottom-color' ),
- // Border color left
- array( '#editor .editor-styles-wrapper .wp-block-quote', 'border-left-color' ),
- // Border color right
- array( '#editor .editor-styles-wrapper .wp-block-separator[style*="text-align: right"],
- #editor .editor-styles-wrapper .wp-block-separator[style*="text-align:right"],
- #editor .editor-styles-wrapper hr[style*="text-align: right"],
- #editor .editor-styles-wrapper hr[style*="text-align:right"]', 'border-right-color' ),
- /**
- * Utility Classes
- */
- // Background-color
- array( '#editor .editor-styles-wrapper .has-primary-background-color[class]', 'background-color' ),
- // Text-color
- array( '#editor .editor-styles-wrapper .has-primary-color[class]', 'color' ),
- ), __( 'Link Color' ) );
- // Text Color (Gray)
- // $config-global--color-foreground-default
- add_editor_color_rule( 'txt', '#394d55', array(
- // Text-color
- array( '#editor .editor-styles-wrapper,
- #editor .editor-styles-wrapper .editor-post-title__block .editor-post-title__input,
- #editor .editor-styles-wrapper .fse-template-part .main-navigation,
- #editor .editor-styles-wrapper .fse-template-part .main-navigation a,
- #editor .editor-styles-wrapper .fse-template-part .main-navigation a:link,
- #editor .editor-styles-wrapper .fse-template-part .main-navigation a:visited,
- #editor .editor-styles-wrapper .has-foreground-color[class],
- #editor .editor-styles-wrapper .wp-block-pullquote,
- #editor .editor-styles-wrapper .wp-block-quote .wp-block-quote__citation,
- #editor .editor-styles-wrapper .wp-block-pullquote:not(.is-style-solid-color) .wp-block-pullquote__citation,
- #editor .editor-styles-wrapper .wp-block-button__link.is-style-outline:hover,
- #editor .editor-styles-wrapper .wp-block-button__link.is-style-outline:focus,
- #editor .editor-styles-wrapper .wp-block-button__link.is-style-outline.has-focus,
- #editor .editor-styles-wrapper .is-style-outline .wp-block-button__link:hover,
- #editor .editor-styles-wrapper .is-style-outline .wp-block-button__link:focus,
- #editor .editor-styles-wrapper .is-style-outline .wp-block-button__link.has-focus', 'color' ),
- // Border-color with less opacity (dim)
- array( '#editor .editor-styles-wrapper .wp-block-code,
- #editor .editor-styles-wrapper .wp-block-search .wp-block-search__input', 'border-color', 0.8 ),
- // Background-color
- array( '#editor .editor-styles-wrapper .wp-block-cover.has-background-dim,
- #editor .editor-styles-wrapper .wp-block-cover-image.has-background-dim,
- #editor .editor-styles-wrapper table.is-style-stripes tbody tr:nth-child(odd),
- #editor .editor-styles-wrapper .wp-block-table.is-style-stripes tbody tr:nth-child(odd)', 'background-color' ),
- /**
- * Utility Classes
- */
- // Text-color
- array( '#editor .editor-styles-wrapper .has-background-background-color[class],
- #editor .editor-styles-wrapper .has-background-dark-background-color[class],
- #editor .editor-styles-wrapper .has-background-light-background-color[class],
- #editor .editor-styles-wrapper .has-foreground-color[class],
- #editor .editor-styles-wrapper .has-background-background-color[class] a', 'color' ),
- // Background-color
- array( '#editor .editor-styles-wrapper .has-foreground-background-color[class]', 'background-color' ),
- // Text-color darkened
- array( '#editor .editor-styles-wrapper .has-foreground-dark-color[class]', 'color', '-1' ),
- // Background-color darkened
- array( '#editor .editor-styles-wrapper .has-foreground-dark-background-color[class]', 'background-color', '-1' ),
- // Text-color brightened
- array( '#editor .editor-styles-wrapper .has-foreground-light-color[class]', 'color', '+2' ),
- // Background-color brightened
- array( '#editor .editor-styles-wrapper .has-foreground-light-background-color[class]', 'background-color', '+2' ),
- ), __( 'Text Color' ) );
- // Accent Color (Red)
- // $config-global--color-secondary-default
- add_editor_color_rule( 'fg1', '#9B6A36', array(
- /**
- * Utility Classes
- */
- // Text-color
- array( '#editor .editor-styles-wrapper .has-secondary-color[class]', 'color' ),
- // Background-color
- array( '#editor .editor-styles-wrapper .has-secondary-background-color[class]', 'background-color' ),
- ), __( 'Secondary Color' ) );
|