Search posts, tags, users, and pages
While building a dark theme for my React App, I've found myself escaping the nesting a lot in order to make styles for the dark theme . Then, this mixin was born. Show me the code! @mixin atDarkTheme { $selector: #{&}; @at-root body.dark-the...
Lucas Terracino
@Nomade · Buenos Aires, Argentina
Full Stack Developer & Teacher
Advertising Art Director turned into a Full Stack Developer. Teaching others how to code @ Coderhouse & working full time @ Geopagos
Markdown supported · ⌘↵ to post
Favourite Jome
Thanks for sharing, I've got to try it out
You are welcome, please do! And let me know if it serves you as well as it did to me.
It worked perfectly, I'll start using this approach when ever I need dark mode toggle Lucas Terracino
I'm glad it worked out for you Jome Favourite! Happy to help
Favourite Jome
Thanks for sharing, I've got to try it out