# 다크 모드를 확인하는 데 여전히 이 방법이 맞나요?

**URL:** <https://meta.discourse.org/t/is-this-still-the-solution-for-checking-for-dark-mode/353354>\
**Category:** Development\
**Created:** [2월 20, 2025, 3:56오후 UTC](https://meta.discourse.org/t/is-this-still-the-solution-for-checking-for-dark-mode/353354 "2025-02-20T15:56:12Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2월 20, 2025, 3:56오후 UTC](https://meta.discourse.org/t/is-this-still-the-solution-for-checking-for-dark-mode/353354/1 "2025-02-20T15:56:12Z")

</div>

[No specific class for dark mode](https://meta.discourse.org/t/no-specific-class-for-dark-mode/254984/2)에서 이어지는 논의입니다:

> [@awesomerobot](#):
>
> 이렇게 하면 필요한 결과를 얻을 수 있을까요? `color_definitions.scss` 파일에 추가해야 합니다.
> 
> ````plaintext
> @if #{schemeType()} == dark {
> body {
> background: red;
> }
> } @else {
> body {
> background: blue;
> } 
> }
> ```\n
> 클래스가 유용할 것 같긴 해서, 하나 추가할 수 있을 것 같습니다.
> 
> ````

사용자가 어떤 카테고리에 있는지 기준으로 사이트 로고를 변경하고, 사이드바의 카테고리에 로고를 추가하는 테마 컴포넌트를 가지고 있습니다. 이제 다크 모드에서는 다른 로고를 사용하라고 요청을 받았습니다.

아래와 같은 것 말이죠:

```plaintext
.category-my-other-identity #site-logo {
  content: url($AS) !important;
  display: inline-block;
  height: $site-logo-height;
  font-size: 0;
  margin-top: $site-margin-top;
  margin-bottom: $site-margin-bottom;
}

```

CSS는 잘 못하지만, "이것은-다크-모드입니다"라는 클래스가 있다면 훨씬 쉬울 것 같습니다. 아니면 위와 같은 방식으로 작동할 수도 있겠네요.

아니면 이것이 설정이 있는 “진짜” 테마 컴포넌트라면(지금은 위와 같이 수동으로 코딩되어 있음), 그 설정을 CSS에 넣는 것이 충분히 쉬울 것입니다. 아마도 이것이 제가 해야 할 일인 것 같죠, 그렇죠?

---

_[View the full topic](https://meta.discourse.org/t/is-this-still-the-solution-for-checking-for-dark-mode/353354)._
