Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Imposible to change the colors of the GDPR cookie banner

  • #7562
    Avatar photo[anonymous]

    I am trying to change the colors of my GDPR cookie banner and the changes are not being reflected.

    I am using the Simple theme and my generic font color is white, the same as the background that is generated in the banner. I have also tried to change the green color of the floating window and it does not work. I have made all the changes in the style.css file of the Simple theme.

    Any advice? Thanks in advance

    #7563
    Avatar photo[anonymous]

    Assuming you’ve not already modified the core CSS file, in Publii, just go to: Tools & Plugins > Custom CSS and enter the following overrides:

    .cookie-popup__save {background: #000}
    .cookie-popup--uses-badge {background: #000}

    Note: the above example changes the GDPR button(s) background to black (#000) (for the non-AMP site version). However, remember, these buttons should stand out and contrast from the rest of the website design. So black may not be ideal.

    #7568
    Avatar photo[anonymous]

    Thanks for your answer. I realized that I had an error in a line of the custom css. By the way, I have seen that the amp version does not show the GDPR. Would there be any legal problem in this? I use google analytics and facebook comments on my site. Thanks again

    #7569
    Avatar photoBob

    This year, we will stop developing AMP as AMP pages are no longer required to rank. The truth is that static pages, especially those generated by Publii (blogs), are very lightweight and fast. We do not see any potential in further developing the AMP pages.

    #7570
    Avatar photo[anonymous]
    [anonymous] wrote:

    This year, we will stop developing AMP as AMP pages are no longer required to rank. The truth is that static pages, especially those generated by Publii (blogs), are very lightweight and fast. We do not see any potential in further developing the AMP pages.

    I have just been reading a lot about the subject and it seems that it is not very relevant to google, as you say I get incredible results. I’m going to do without the amp version. Thank you very much

    #7731
    Avatar photo[anonymous]
    seb_oi wrote:

    I am trying to change the colors of my GDPR cookie banner and the changes are not being reflected.

    I am using the Simple theme and my generic font color is white, the same as the background that is generated in the banner. I have also tried to change the green color of the floating window and it does not work. I have made all the changes in the style.css file of the Simple theme.

    Any advice? Thanks in advance

    Btw: you’ll want to edit the main.css file, and not style.css. I had that issue early on when I started editing Publii themes.

    #7747
    Avatar photoBob

    The new Publii version (0.40)  comes with a rewritten whole section of the Cookie banner. You can now change the banner coloe scheme with a custom CSS tool by playing with CSS variables: https://getpublii.com/docs/gdpr-cookie-banner-configuration.html#availablecssparameters