Can't update styles for banner

Created on 10 February 2025, 5 months ago

Unable to update style of the cookie banner

When adding a cookie consent banner, I am unable to update the styles displayed no matter what setting I try. It always has the black background with white text. On the Cookie Solution tab on the form display, I have tried unchecking Apply styles boolean but am still unable to disable the black background. At minimum, could we remove !important CSS rules that are being applied so that developers can override them? Thanks for any help with this.

🐛 Bug report
Status

Active

Version

4.0

Component

User interface

Created by

🇺🇸United States kerrymick Chicago

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kerrymick
  • Assigned to robertoperuzzo
  • 🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI
  • 🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

    Hi @kerrymick, the styling is a big challenge because Iubenda injects the CSS style via JS. As you can see in the iubenda.com dashboard, you can edit the banner style

    When you do that, the snippet to be embedded contains the parameters to use for styling

    "banner":{"acceptButtonDisplay":true,"backgroundColor":"#E53030", ....
    

    There are two ways we can follow:

    1. Adds all the style parameters in Drupal so that we will manage the styles via UI. The challenge: Iubenda likes to keep things fresh and sometimes updates their parameters. So, one thing we'll want to keep an eye on is making sure we're current with any changes they make.
    2. Let's update the Drupal module's settings pages so we can easily embed the Iubenda snippets. We'll set up the styling directly in the Iubenda.com UI console, which is handy! The challenge: we'll have to keep an eye on how the CSS and JS aggregation works, and of course, make sure everything is secure against Cross-Site Scripting.
  • 🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI
  • 🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI
Production build 0.71.5 2024