Digital cookie
|

SureCookie Re-Consent Button Styling with Kadence

Making use of the SureCookie plugin, I wanted to make use of the shortcode for re-consent as well as the floating widget. Rather than keep to the default provided text, why not style it as a button in the same style as the rest of the website.

This code can be placed inside the custom CSS section of the SureCookie plugin. It could be placed elsewhere, but as it’s only needed when the plugin is in use, it makes sense to place it here so that should it be decided to change plugin, there’s no redundant code to take care of.

The same code has been used on multiple websites that use Kadence blocks and it automatically picks up the relevant colours in use for the respective websites.

.surecookie-reconsent-btn {
  display: inline-flex !important;
  width: fit-content !important; /* Prevents the button from stretching full width */
  align-items: center !important;
  justify-content: center !important;
  padding: 0.6em 1.25em !important;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  
  /* Inherit Kadence Global Colors */
  background-color: var(--global-palette1, #2B6CB0) !important;
  color: #ffffff !important;
  transition: all 0.2s ease-in-out;
}

/* Hover State */
.surecookie-reconsent-btn:hover,
.surecookie-reconsent-btn:focus {
  background-color: var(--global-palette2, #2C5282) !important;
  color: #ffffff !important;
}

Similar Posts

  • New for 2021

    The theme has been updated today! I’ve been using Kadence Theme on a number of different websites and have used my knowledge of working with Kadence Theme and Gutenberg Blocks to update the look of this site. It hasn’t just been the look of the site though. Maintenance behind the scenes has taken place too,…

  • New for 2024

    It’s time for a little refresh and a rethink regarding organisation of how I share information about my interests. The theme has remained, but I’m now using a lighter colour palette which is easier on the eyes and fits in with the refresh of content. I’ve included information in the services section to highlight what…

  • Genesis Showcase Pro

    I was working on a website for a charity, using the Showcase Pro theme (a Genesis child theme). Here are some of the customisations that I made to the CSS. They may appear to be small changes, but they were very much needed. 1. Menu sub items to show that they’re highlighted. I toyed with…

  • Website Security SSL

    Secure Sockets Layer (SSL) is used to encrypt a connection to a website. You’ll be used to seeing a padlock in the address bar for secure sites, possibly green areas of the address bar too, depending upon the type of security in use. Back in 2014 Google announced that they would start improving the ranking of…

Leave a Reply

Your email address will not be published. Required fields are marked *