Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Light/dark mode docs #219

Merged
merged 2 commits into from
Jun 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions app/docs/md/enhance-styles/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,20 @@ If you’d like to opt out of the styles generated by the `theme` module, you ca
}
```

#### Light/dark mode

By default, Enhance Styles ships with support for automatic light and dark mode styles. If you want your app to support only light *or* dark mode, drop this CSS in your [head](/docs/conventions/head) as a global style:


```html
<style>
:root {
color-scheme: only light; /* if you want to force light mode */
color-scheme: only dark; /* if you want to force dark mode */
}
</style>
```

<doc-link-callout link="https://github.com/enhance-dev/enhance-styles?tab=readme-ov-file#theme" mark="🎨">
Read more about themes
</doc-link-callout>
Expand Down
Loading