Theming with css variables

May 2, 2021 · View on GitHub

These examples show how to create themes using css variables rather than relying on the default dark: variant supplied in tailwind.

This technique is the preferred way to add a dark/light theme and allows you to add more themes when needed.

  • react + emotion
  • react + styled-components
  • gatsby + emotion
  • gatsby + styled-components

‹ Documentation