Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Global Styles Not Working

  • I have tried to create a ‘global style’ and copy from ‘legacy global styles’ but ti simply doesn’t work I the tried to create a new global style end edit it which looks fine on the back end (admin panel) but the styling doesn’t all show on the front end: text The button should have a green background with white text and on hover a black background with white text however the text is blue! I may be wrong but it could be taking that color from the ‘customize colours’

    https://postimg.cc/34RFnsk2

  • Hi there,

    did you resolve the issue ? As I cannot see the problem on the site.

  • Hi David

    The only way I got this to work was to delete the ‘Legacy Global Styles’ and make a new ‘global styles’ It was a little more work going through the website but it got the job done. My question is this: we can create a button in the ‘Customiser’ as well as ‘global styles’ Are there any advantages by doing this either way especially if I’m only going to style one button. It appears the colors made in the customizer are causing conflicts!

  • Both options use CSS, which style to show depends on which CSS has the higher priority.

    The customizer button style adds CSS to <button> element.

    GB’s global style creates CSS targeting the assigned CSS class.

    GB’s local block style creates CSS targeting the specific ID of the block.

    If you only need one button style, you can either use GB’s global style or the customizer, however, the customizer doesn’t have a border option or a spacing option.

  • Thank you so much Ying for clearing this up

  • No Problem 🙂

  • Hi

    I’m still struggling. I would like to underline links in the content only (blog posts) and make them blue. If I try to use the customizer it will affect the buttons. Could I possibly add css and would you be able to provide it?

  • Hi there,

    try:

    
    #page :is(p, li) a {
        text-decoration: underline;
        text-decoration-thickness: 4px;
        text-underline-offset: 4px;
        text-decoration-color:  #0000ff;
    }
    

    It will target only links in the content that are inside a Paragraph or a List item.
    I added the extra style proeprties for line thickness , offset and color.

    Let us know

  • Hi David

    Sorry this isn’t working

  • what’s not working?

    Can you link us to the page in question?

  • Hi Ying

    Here’s a page with plenty of links: https://andytlaird.com/entrepreneur/entrepreneurial-mindset/

  • Hi there,

    Where did you add the CSS? I’ve tested it, and it should work.
    https://cln.sh/ZPY8nlxW

  • Hi Alvin

    I copied/pasted the code in “Additional CSS” and agree it should work – but doesn’t

  • Usually, this issue is caused by syntax errors in the existing code within the Additional CSS section. To check for any errors, you can copy all the CSS currently placed there and use this CSS validation tool to confirm if there are any issues:
    https://jigsaw.w3.org/css-validator/#validate_by_input

    Let me know.

  • Hi Alvind

    This was the error showing:

    Parse Error add_filter( ‘block_editor_settings_all’, function( $editor_settings ) { $css = wp_get_custom_css_post()->post_content; $editor_settings[‘styles’][] = array( ‘css’ => $css ); return $editor_settings; }

  • I removed this and the css works:

    add_filter( ‘block_editor_settings_all’, function( $editor_settings ) {
    $css = wp_get_custom_css_post()->post_content;
    $editor_settings[‘styles’][] = array( ‘css’ => $css );

    return $editor_settings;
    }

    Was this the right thing to do? I don’t remember what this was or why I used it. Lastly would you have the css to change the link color to blue (not the underline)?

Viewing 16 posts - 1 through 16 (of 19 total)
  • You must be logged in to reply to this topic.