Skip to content

Commit

Permalink
Add removeMedia option docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Apr 22, 2024
1 parent a80e446 commit 8ad38a2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,18 @@ Selector for node for CSS Custom properties and dark/light theme classes.
Type: `boolean`. Default: `true`.

Should plugin wrap added selector to `:where()` to keep origin specificity.


## `removeMedia`

Type: `boolean`. Default: `false`.

Should plugin remove origin `@media` and keep only classes. It could be useful
when only JS is responsible for theme switching.

If you are using this option, don’t forget:
1. That theme should have 3 values: light, system, dark.
2. To subscribe for system theme switching in JS.

We do not recommend this option for most of the cases, because of light flash
when user visit your app with dark system theme and until JS will be loaded.

0 comments on commit 8ad38a2

Please sign in to comment.