hi_mayank,
@hi_mayank@hachyderm.io avatar

now that light-dark is in all three browsers, i should write about it 🤔

basic setup:

html {  
 color-scheme: light dark;  
 &[data-theme=light] { color-scheme: light; }  
 &[data-theme=dark] { color-scheme: dark; }

 background-color: var(--theme-bg, Canvas);  
 color: var(--theme-fg, CanvasText);  
 …  
}  

tokens:

:scope {  
--theme-bg: light-dark(white, black);  
--theme-fg: light-dark(black, white);  
 …  
}  

components:

.button {  
 border-color: var(--theme-fg);  
 …  
}  
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • GTA5RPClips
  • megavids
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • Leos
  • cisconetworking
  • provamag3
  • JUstTest
  • lostlight
  • All magazines