# 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:** 1

<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 4, 2022, 2:30pm UTC](https://meta.discourse.org/t/how-to-add-a-specific-body-class-for-the-dark-or-light-mode/220062/1 "2022-03-04T14:30:30Z")

</div>

There doesn’t seem to be any specific class currently.

I found [this](https://meta.discourse.org/t/add-currentthemeid-into-body-css-classes/161380/2) but it doesn’t work since the theme’s ID is the same for the dark and light mode (which is defined the color scheme, I guess).

I suppose a short script could help? And, maybe add this to Discourse’s core?

---

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