ZeroBloat Dark Mode

설명

ZeroBloat Dark Mode adds a floating toggle button that lets visitors switch between light and dark mode.

No settings page. No database queries. No bloat.

Just install, activate, done.

Features

  • Floating toggle button (bottom-right corner)
  • Respects system preference (prefers-color-scheme)
  • Remembers user choice (localStorage)
  • Prevents flash of unstyled content
  • Shortcode [dark_mode_toggle] for custom placement
  • Works with any theme
  • No external dependencies
  • No tracking or analytics
  • Under 5KB total

How It Works

  1. Checks user’s saved preference
  2. Falls back to system preference (OS dark mode)
  3. User can toggle anytime with the floating button
  4. Choice is saved for future visits

Styling

The plugin applies sensible dark mode defaults. To customize, add CSS to your theme:

body.mdm-dark {
    background-color: #121212 !important;
    color: #ffffff !important;
}

설치

  1. Upload the zerobloat-dark-mode folder to /wp-content/plugins/
  2. Activate through the ‘Plugins’ menu
  3. Done. A toggle button appears on your site.

FAQ

Where are the settings?

There are none. The plugin uses sensible defaults. If you need customization, add CSS to your theme.

Can I move the toggle button?

Use the shortcode [dark_mode_toggle] to place it anywhere. The floating button will still appear unless you hide it with CSS:

.mdm-toggle:not(.mdm-toggle-inline) { display: none !important; }

Does it work with my theme?

It works with most themes. Dark mode is applied using CSS with !important rules to override theme styles.

Can I customize the colors?

Yes, add CSS to your theme targeting body.mdm-dark. See the Styling section above.

Does it remember the user’s choice?

Yes, it saves the preference in localStorage and restores it on next visit.

Does it respect system dark mode?

Yes, if the user hasn’t made a choice, it follows the OS preference.

후기

이 플러그인에 대한 평가가 없습니다.

기여자 & 개발자

“ZeroBloat Dark Mode”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “ZeroBloat Dark Mode”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.0.0

  • Initial release