Skip to content

How to create light or dark color themes #34

Answered by extrabright
heshimang asked this question in Issues
Discussion options

You must be logged in to vote

Hey @heshimang - I am working on an update for that. Right now I am preparing the documentation. The easiest way is to create new themes, including light/dark mode using the CSS variables Bootstrap provides in their docs. For each component, you will find a set of CSS variables that can be used in your theme file.

For example, I made a new theme mixin like this:

@mixin blue {
  color-scheme: light;

  --x-primary: var(--x-blue-500);
  --x-primary-rgb: #{to-rgb($blue-500)};
  --x-secondary: var(--x-yellow-500);
  --x-secondary-rgb: #{to-rgb($yellow-500)};
  --x-dark: var(--x-gray-800);
  --x-dark-rgb: #{to-rgb($gray-800)};

  --x-link-color: var(--x-blue-500);
  --x-link-hover-color: var(-…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@heshimang
Comment options

@extrabright
Comment options

@heshimang
Comment options

@extrabright
Comment options

@heshimang
Comment options

Answer selected by heshimang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Issues
Labels
question Further information is requested
2 participants