---
title: "Discussion on \"Moving from Sass to CSS variables to implement Dark Mode\" | Hashnode"
description: "Discussion on \"Moving from Sass to CSS variables to implement Dark Mode\". We are currently working on a machine that runs 24/7 at train stations all over Switzerland. The\nscreen is fairly bright to help people navigate through our web application even when there is\ndirect sunlight hitting the machine. For people with visua..."
url: "https://hashnode.com/posts/moving-from-sass-to-css-variables-to-implement-dark-mode/6358ed4df001c905d3bc6376"
---

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

Discussion

# [Moving from Sass to CSS variables to implement Dark Mode](https://software-engineering-corner.zuehlke.com/moving-from-sass-to-css-variables-to-implement-dark-mode?utm_source=hashnode&utm_medium=feed)

We are currently working on a machine that runs 24/7 at train stations all over Switzerland. The screen is fairly bright to help people navigate through our web application even when there is direct sunlight hitting the machine. For people with visua...

Oct 26, 2022 · 4 min read · software-engineering-corner.zuehlke.com  
Updated Nov 27, 2023  
Read the article

-   [#css](https://hashnode.com/tag/css)
-   [#dark-mode](https://hashnode.com/tag/dark-mode)
-   [#sass](https://hashnode.com/tag/sass)
-   [#variables](https://hashnode.com/tag/variables)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Patrick Walther](https://hashnode.com/@r3dDoX)

@r3dDoX · Switzerland

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

Lead Software Architect @ DSI Engineering

I'm interested in all things web!

## Responses 1

Markdown supported · ⌘↵ to post

[Michael Lehmann](https://hashnode.com/@lehmamic)

[Nov 1, 2022](https://hashnode.com/posts/moving-from-sass-to-css-variables-to-implement-dark-mode/6358ed4df001c905d3bc6376/comment/636109cd156c056afa271adc)

Nice post. We use css variables to theme web components with shadow dom.

[Nov 1, 2022](https://hashnode.com/posts/moving-from-sass-to-css-variables-to-implement-dark-mode/6358ed4df001c905d3bc6376/comment/636109cd156c056afa271adc#reply-636152bc9bf8a6729b5a28fc)

Thank you! Yeah that makes sense since they pierce through the ShadowDOM. We use them too in our component library for that use case.
