# ダーク（またはライト）モードに特定のbodyクラスを追加する方法は？

**URL:** https://meta.discourse.org/t/how-to-add-a-specific-body-class-for-the-dark-or-light-mode/220062
**Category:** Support
**Created:** [2022 年 3 月 4 日午後 2:30 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:** 3

<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: [2022 年 3 月 4 日午後 3:13 UTC](https://meta.discourse.org/t/how-to-add-a-specific-body-class-for-the-dark-or-light-mode/220062/3 "2022-03-04T15:13:23Z")

</div>

フォーラムのスタッフが、この特定のかすかな茶色を生成する生成されたカラー変数（`--tertiary-very-low`）を気に入っていません。

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/d/0d69b6fb1926ec388647330b3eb8cbd0fcbaa498.png)

彼らはそれを調整したいのですが、生成されたものであり、ダークモード用の親固有のクラスがないため、実際には変更できないようです。

しかし、この情報を見つけました。

> [@$primary-medium SCSS variable problems](https://meta.discourse.org/t/primary-medium-scss-variable-problems/122390/5?u=canapin):
>
> We stumbled onto this thread because of a similar issue, we solved it with a workaround by adding the following to the theme’s common css: :root { --primary-medium: #666666; }

それが有効かどうかはわかりません。まだ試すことができませんでした。今はやることが多すぎます:sweat\_smile:。しかし、それが機能すれば、それで十分です。実際、さらに良くなるでしょう。

---

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