Documentation/GDPR Cookie Consent/Alter the Color of the Toggle Button on the Popup

Alter the Color of the Toggle Button on the Popup

The GDPR Cookie Consent Plugin gives the users granular control over the cookies that they want to allow. This is made possible with a popup that appears when clicked on the Settings button. From this popup, the users can enable or disable the cookies based on their categories using a toggle button.

The toggle buttons by default have teal color. The following code snippet allows you to add the color of the toggle button on the Settings popup from the default color. Simply add the following code snippet to the style.css file of the active theme and replace the hex code of the property background-color with the hex code of the custom color.

.cli-switch input:checked + .cli-slider{
  • Was this article helpful?
  • YesNo