mirror of
https://github.com/docker/docs.git
synced 2026-04-04 02:08:57 +07:00
db740fe266dfd642ccfddc8cd57c2cc913099aa1
> 🤖 Generated with [Claude Code](https://claude.com/claude-code) ## Summary `theme.js` unconditionally wrote the resolved preference to `localStorage` on every page load, permanently locking in a concrete `"light"` or `"dark"` value even for first-time visitors — making it impossible to track OS preference changes after any site visit. Removed the unconditional `localStorage.setItem` from `theme.js` so the early script only reads (never writes); the Alpine.js toggle in `header.html` now cycles through three states (light → dark → auto), with "auto" removing the `theme-preference` key and resolving from `prefers-color-scheme` with a live `matchMedia` change listener so the theme updates immediately when the OS preference changes. A contrast icon indicates auto mode; all three icon spans are driven by Alpine `x-show` directives rather than pure CSS dark-mode classes. **Verified:** logic matches the standard three-state pattern; `prefers-color-scheme` media query and `matchMedia` change listener are the canonical browser APIs for system-preference tracking. **Checked:** no other files reference `theme-preference` or the theme toggle; no CSS changes required. Closes #23177 --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…
Docs @ Docker
Welcome to the Docker Documentation repository. This is the source for the Docker Docs Website.
Feel free to open pull requests or issues. Our docs are completely open source, and we deeply appreciate contributions from the Docker community!
Provide feedback
We’d love to hear your feedback! To submit feedback:
- Click New issue on the docs repository, or
- Click Request changes in the right column of every page on docs.docker.com, or
- Click Give feedback on every page in the docs.
To get community support, use the Docker Community Slack. Personalized support is available through the Docker Pro, Team, and Business subscriptions. See Docker Pricing for details.
If you have an idea for a new feature or behavior change in a specific aspect of Docker or have found a product bug, file an issue in the project's repository.
Contribute to Docker docs
We welcome contributions! To get started:
- CONTRIBUTING.md - Contribution workflow and setup
- STYLE.md - Writing style and content guidelines
- COMPONENTS.md - Component and shortcode usage
Copyright and license
Copyright 2013-2026 Docker, Inc., released under the Apache 2.0 license.
Description
Languages
Markdown
97.2%
HTML
1.8%
CSS
0.4%
JavaScript
0.2%
Go
0.1%
Other
0.1%