- Timestamp:
- 10/29/2019 04:40:34 PM (5 years ago)
- Location:
- branches/5.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.3
-
branches/5.3/src/wp-content/themes/twentytwenty/inc/custom-css.php
r46571 r46614 64 64 $accent = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'accent' ) ); 65 65 $accent_default = '#cd2653'; 66 67 /**68 * Filters the CSS selectors targeting button component on frontend to apply common css69 *70 * @since 1.0.071 *72 * @param string $string The comma separated string of all CSS selectors targeting button component73 */74 $buttons_targets = apply_filters( 'twentytwenty_buttons_targets_front_end', 'button, .button, .faux-button, .wp-block-button__link, .wp-block-file__button, input[type=\'button\'], input[type=\'reset\'], input[type=\'submit\']' );75 66 76 67 // Header. … … 167 158 // Accent color. 168 159 if ( $accent && $accent !== $accent_default ) { 169 twentytwenty_generate_css( 'body#tinymce.wp-editor a', 'color', $accent );170 twentytwenty_generate_css( 'body#tinymce.wp-editor blockquote, body#tinymce.wp-editor.wp-block-quote', 'border-color', $accent, '', ' !important' );171 twentytwenty_generate_css( $buttons_targets, 'background-color', $accent );160 twentytwenty_generate_css( 'body#tinymce.wp-editor.content a, body#tinymce.wp-editor.content a:focus, body#tinymce.wp-editor.content a:hover', 'color', $accent ); 161 twentytwenty_generate_css( 'body#tinymce.wp-editor.content blockquote, body#tinymce.wp-editor.content .wp-block-quote', 'border-color', $accent, '', ' !important' ); 162 twentytwenty_generate_css( 'body#tinymce.wp-editor.content button, body#tinymce.wp-editor.content .faux-button, body#tinymce.wp-editor.content .wp-block-button__link, body#tinymce.wp-editor.content .wp-block-file__button, body#tinymce.wp-editor.content input[type=\'button\'], body#tinymce.wp-editor.content input[type=\'reset\'], body#tinymce.wp-editor.content input[type=\'submit\']', 'background-color', $accent ); 172 163 } 173 164 174 165 // Background color. 175 166 if ( $background && $background !== $background_default ) { 176 twentytwenty_generate_css( 'body#tinymce.wp-editor', 'background', '#' . $background ); 167 twentytwenty_generate_css( 'body#tinymce.wp-editor.content', 'background', '#' . $background ); 168 } 169 170 // Text color. 171 if ( $body && $body !== $body_default ) { 172 twentytwenty_generate_css( 'body#tinymce.wp-editor.content', 'color', $body ); 173 } 174 175 // Secondary color. 176 if ( $secondary && $secondary !== $secondary_default ) { 177 twentytwenty_generate_css( 'body#tinymce.wp-editor.content hr:not(.is-style-dots), body#tinymce.wp-editor.content cite, body#tinymce.wp-editor.content figcaption, body#tinymce.wp-editor.content .wp-caption-text, body#tinymce.wp-editor.content .wp-caption-dd, body#tinymce.wp-editor.content .gallery-caption', 'color', $secondary ); 178 } 179 180 // Borders color. 181 if ( $borders && $borders !== $borders_default ) { 182 twentytwenty_generate_css( 'body#tinymce.wp-editor.content pre, body#tinymce.wp-editor.content hr, body#tinymce.wp-editor.content fieldset,body#tinymce.wp-editor.content input, body#tinymce.wp-editor.content textarea', 'border-color', $borders ); 177 183 } 178 184 }
Note: See TracChangeset
for help on using the changeset viewer.