Skip to content

A custom Drupal 8 module that provides a Background Switcher block

Notifications You must be signed in to change notification settings

ivan-trokhanenko/background_switcher

Repository files navigation

Background Switcher

How to use:

This module provides a switch background button and adds a "data-theme" attribute to HTML than can be used in your custom CSS.

See example below:

html {
  background: var(--lightBg);
  --lightBtn: #FE016C;
  --lightBg: #f5f5f5;
  --lightColor: #232323;
  --instColor: blue;
}

html[data-theme='dark'] {
  background: var(--lightBg);
  --lightBtn: #FFBD07;
  --lightBg: #232323;
  --lightColor: #fff;
  --instColor: #fff;
}

"data-theme" available options: dark, light

About

A custom Drupal 8 module that provides a Background Switcher block

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published