Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Themes with CSS custom properties #25

Merged
merged 2 commits into from
May 28, 2023
Merged

Themes with CSS custom properties #25

merged 2 commits into from
May 28, 2023

Conversation

pomber
Copy link
Contributor

@pomber pomber commented May 28, 2023

Fix #21

Adding support for CSS custom properties in themes, and two dark/light built-in themes:

  • github-from-css (github-dark + github-light)
  • material-from-css (material-darker + material-lighter)

To use them you'll need to import (or copy) the CSS from

  • @code-hike/lighter/themes/github-from-css.css
  • @code-hike/lighter/themes/material-from-css.css

This will use the dark theme by default and change to the light theme when the code has a parent with the data-theme="light" attribute. To change the selector you can copy the CSS and pick a different one.

@vercel
Copy link

vercel bot commented May 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
lighter ✅ Ready (Inspect) Visit Preview May 28, 2023 2:39pm

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use CSS classes instead of colors
1 participant