- This topic has 8 replies, 4 voices, and was last updated 2 years, 9 months ago by
David.
-
AuthorPosts
-
November 20, 2022 at 4:00 am #2423821
Fabien
Hi,
Generatepresss styles (cf. customizer) are overidding ACF / wp-core-ui default blocks styles.
Example with a repeater field below :
What it look like (due to GP styles) :
What it should look like :
Is their a way to fix this easily ? In the long rung I think it should be handle by GP.
Thanks
November 20, 2022 at 1:02 pm #2424484Leo
StaffCustomer SupportHi there,
Are you able to provide the CSS that you think it’s causing the issue?
Let me know 🙂
November 20, 2022 at 1:25 pm #2424510Fabien
Yes, definately (might not be exhaustive) :
.editor-styles-wrapper .block-editor-block-list__layout .wp-block-button .wp-block-button__link, .editor-styles-wrapper .block-editor-block-list__layout .button { font-size: inherit; padding: 10px 15px; line-height: normal; } .editor-styles-wrapper a.button, .editor-styles-wrapper .block-editor-block-list__layout .wp-block-button .wp-block-button__link { font-weight: 700; text-transform: uppercase; font-size: inherit } .editor-styles-wrapper a.button, .editor-styles-wrapper a.button:visited, .editor-styles-wrapper .wp-block-button__link:not(.has-background) { color: #ffffff; background-color: #00b62c; padding: 10px 20px; border: 0; border-radius: 0; } .editor-styles-wrapper a, .editor-styles-wrapper a:visited { color: #00b62c; }
Those are inline styles generated by Generatepress (cf. customizer) and they are overiding ACF / wp-core-ui default styles/
November 21, 2022 at 1:24 pm #2426204Fabien
Hi @Leo,
Any news on this ?
November 21, 2022 at 5:00 pm #2426371Fernando Customer Support
Hi Fabien,
Can you provide admin login credentials so we can take a closer look at what’s occurring?
Please use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
We’ll try to provide an assessment afterward.
November 23, 2022 at 2:03 am #2428585Fabien
Here you go !
November 23, 2022 at 4:42 am #2428841David
StaffCustomer SupportHi there,
does this snippet fix the issue ?
add_filter( 'block_editor_settings_all', function( $editor_settings ) { $css = '.button.button-small { padding: 0 8px; }'; $editor_settings['styles'][] = array( 'css' => $css ); return $editor_settings; } );
November 23, 2022 at 6:43 am #2429024Fabien
Hi David,
Thanks for your reply !
Yes it does but there was a little mistake :
padding-bottom: 0 8px;
should bepadding: 0 8px;
Now, the ‘add row’ button should be fixed (in order to be blue, with border radius and so on… in order to not inherit GP styles). Can you please help ?
Thanks
November 23, 2022 at 7:18 am #2429076David
StaffCustomer SupportYikes sorry about the CSS error lol – corrected the code above.
I can’t stop ACF and the editor buttons from inheriting those styles.
This is the issue. GP loads its front end styles in the editor.
This for example is one of those styles:a.button { font-weight: 700; text-transform: uppercase; font-size: inherit }
And we load it using the core functions, which automatically adds the necessary editor selectors eg.
.editor-styles-wrapper
which makes it more specific then the Core UI Buttons. Its a stupid system of core and they should address it by ensuring their core buttons have more specificity in their styles…. for now you would need to re-add the styles eg.add_filter( 'block_editor_settings_all', function( $editor_settings ) { $css = '.button.button-small { padding: 0 8px; } .wp-core-ui .button-primary { background: #2271b1; border-color: #2271b1; } '; $editor_settings['styles'][] = array( 'css' => $css ); return $editor_settings; } );
-
AuthorPosts
- You must be logged in to reply to this topic.