• Resolved Harm10

    (@harm10)


    I see that the image chosen for content logo is displayed on a fixed format of 30px on the image tag.
    Can this be made customisable?
    If not is it possible to set this size through css (so it can be overruled)?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @harm10,

    Yes, we use a 30px height as default to keep the banner layout in a specific format.

    Currently, there is no direct way to adjust that; we will add a part attribute to allow direct CSS overrides in the next version of the plugin.

    In the current version, you can use JS to adjust the image size like this:

    window.addEventListener( 'wpconsent_banner_initialized', function() {
              const logo = WPConsent.shadowRoot?.querySelector( '.wpconsent-banner-logo img' );
              if ( logo ) {
                  logo.style.height = '50px';
                  logo.removeAttribute( 'height' );
              }
          });
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.