# How to add a specific body class for the dark (or light) mode?

**URL:** <https://meta.discourse.org/t/how-to-add-a-specific-body-class-for-the-dark-or-light-mode/220062>\
**Category:** Product Support\
**Created:** [March 4, 2022, 2:30pm UTC](https://meta.discourse.org/t/how-to-add-a-specific-body-class-for-the-dark-or-light-mode/220062 "2022-03-04T14:30:29Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [March 7, 2022, 6:14pm UTC](https://meta.discourse.org/t/how-to-add-a-specific-body-class-for-the-dark-or-light-mode/220062/13 "2022-03-07T18:14:11Z")

</div>

I remember seeing this a long time ago, when I was working more in-depth on my Discourse installations!

Definitely a good workaround. Thank you. I’ll consider that the proper solution, even if it may be considered as a bit hacky.

---

_[View the full topic](https://meta.discourse.org/t/how-to-add-a-specific-body-class-for-the-dark-or-light-mode/220062)._
