Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
sknob
@sknob@mamot.fr  ·  activity timestamp 4 months ago
@lislegaard @eaterofsnacks
There are different ways of doing it, but the most common and compatible way is with a media query. It’s really a matter of defining the colors for light and dark. Something like :

:root {
--bg: #fff;
--text: #000;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #000;
--text: #fff;
/* filter: brightness(.8) contrast(1.2); */
}
}

  • Copy link
  • Flag this post
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login