Skip to content

Commit

Permalink
Light/dark mode docs (#219)
Browse files Browse the repository at this point in the history
* Light/dark mode

Signed-off-by: macdonst <[email protected]>

* Apply suggestions from code review

Co-authored-by: Cole Peters <[email protected]>

---------

Signed-off-by: macdonst <[email protected]>
Co-authored-by: Cole Peters <[email protected]>
  • Loading branch information
macdonst and colepeters committed Jun 25, 2024
1 parent 2b1bba2 commit 8e14e87
Showing 1 changed file with 14 additions and 0 deletions.
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

0 comments on commit 8e14e87

Please sign in to comment.