# CSSがダークテーマの追加機能を壊しています

**URL:** <https://meta.discourse.org/t/css-is-breaking-ability-to-add-dark-theme/286637>\
**Category:** Development\
**Tags:** css\
**Created:** [2023 年 11 月 26 日午後 4:51 UTC](https://meta.discourse.org/t/css-is-breaking-ability-to-add-dark-theme/286637 "2023-11-26T16:51:36Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)\
**Post date:** [2023 年 11 月 26 日午後 4:51 UTC](https://meta.discourse.org/t/css-is-breaking-ability-to-add-dark-theme/286637/1 "2023-11-26T16:51:36Z")

</div>

本番フォーラムにダークテーマを追加するのに苦労しています。サイトの一部の要素が白くなる理由がわかりません。テスト用のDiscourseを起動して再現することはできませんでしたが、ダークテーマを有効にした後の本番フォーラムでは次のようになります。

 ![image](https://global.discourse-cdn.com/meta/original/4X/8/0/b/80be888758b469ebc8cf7fefff6d1261441f4ebe.png)

> **CSS. クリックして表示**
>
> .page-not-found-search { display: none; }  
> .hamburger-panel ul.category-links li.subcategory {  
> display: none;  
> }  
> img[src\*=‘#left’] {  
> float: left;  
> }  
> img[src\*=‘#right’] {  
> float: right;  
> }  
> img[src\*=‘#center’] {  
> display: block;  
> margin: auto;  
> }  
> .d-header-icons .icon:hover, .d-header-icons .icon:focus {  
> background-color: white;  
> }
> 
> .d-header-icons .d-icon {  
> color: white;  
> }
> 
> .d-header-icons .icon:hover .d-icon, .d-header-icons .icon:focus .d-icon {  
> color: #0082c9;  
> }
> 
> .drop-down-mode .d-header-icons .active .icon .d-icon {  
> color: #0082c9;  
> }
> 
> /\* カテゴリリストでサブカテゴリを表示しない \*/  
> .category-list .subcategories {  
> display: none;  
> }

問題はCSSにあると思われるので、どのように変更できるか疑問に思っています。何かガイダンスがあれば教えてください。

---

_[View the full topic](https://meta.discourse.org/t/css-is-breaking-ability-to-add-dark-theme/286637)._
