---
title: "Discussion on \"Easy theming with SASS mixins.\" | Hashnode"
description: "Discussion on \"Easy theming with SASS mixins.\". 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 .\nThen, this mixin was born.\n\nShow me the code!\n@mixin atDarkTheme {\n    $selector: #{&};\n    @at-root body.dark-the..."
url: "https://hashnode.com/posts/easy-theming-with-sass-mixins/5f9072b06aa1ed54804b9eb0"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Easy theming with SASS mixins.](https://mates-n-code.com/easy-theming-with-sass-mixins?utm_source=hashnode&utm_medium=feed)

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...

Oct 21, 2020 · 3 min read · mates-n-code.com  
Updated Oct 29, 2020  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#sass](https://hashnode.com/tag/sass)
-   [#productivity](https://hashnode.com/tag/productivity)
-   [#css](https://hashnode.com/tag/css)

## Written by

[Lucas Terracino](https://hashnode.com/@Nomade)

@Nomade · Buenos Aires, Argentina

  
[View profile](https://hashnode.com/@Nomade)

Full Stack Developer & Teacher

Advertising Art Director turned into a Full Stack Developer. Teaching others how to code @ Coderhouse &amp; working full time @ Geopagos

## Responses 1

Markdown supported · ⌘↵ to post

[Favourite Jome](https://hashnode.com/@Favourite)

[Oct 21, 2020](https://hashnode.com/posts/easy-theming-with-sass-mixins/5f9072b06aa1ed54804b9eb0/comment/5f909f406aa1ed54804ba02e)

Thanks for sharing, I've got to try it out

[Lucas Terracino](https://hashnode.com/@Nomade)

[Oct 21, 2020](https://hashnode.com/posts/easy-theming-with-sass-mixins/5f9072b06aa1ed54804b9eb0/comment/5f909f406aa1ed54804ba02e#reply-5f90aa716aa1ed54804ba068)

You are welcome, please do! And let me know if it serves you as well as it did to me.

[Favourite Jome](https://hashnode.com/@Favourite)

[Oct 21, 2020](https://hashnode.com/posts/easy-theming-with-sass-mixins/5f9072b06aa1ed54804b9eb0/comment/5f909f406aa1ed54804ba02e#reply-5f90b3cc6aa1ed54804ba09e)

It worked perfectly, I'll start using this approach when ever I need dark mode toggle [Lucas Terracino](https://hashnode.com/@Nomade)

[Lucas Terracino](https://hashnode.com/@Nomade)

[Oct 22, 2020](https://hashnode.com/posts/easy-theming-with-sass-mixins/5f9072b06aa1ed54804b9eb0/comment/5f909f406aa1ed54804ba02e#reply-5f91889fc626a0545fb6108a)

I'm glad it worked out for you [Jome Favourite](https://hashnode.com/@Favourite)! Happy to help
