Skip to content

Commit d3d86b6

Browse files
committed
docs(REAMDE): clarification - tailwind & postcss plugins can be used together
1 parent 7acd332 commit d3d86b6

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

.changeset/smooth-bottles-beam.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'postcss-color-scheme': patch
3+
---
4+
5+
add to docs clarification that tailwind & postcss plugins can be used together, not one or the other

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,12 @@ npm install --save-dev tailwindcss
161161

162162
Add `postcss-color-scheme` to your [tailwind] config as a plugin, and turn off the default `darkMode` handling.
163163

164-
```js
164+
```diff
165165
/** @type {import("tailwindcss").Config } */
166166
module.exports = {
167167
// your config ...
168-
darkMode: '',
169-
plugins: [require('postcss-color-scheme/lib/tailwind')],
168+
+ darkMode: '',
169+
+ plugins: [require('postcss-color-scheme/lib/tailwind')],
170170
};
171171
```
172172

@@ -176,6 +176,11 @@ Now, the following is available:
176176
<input class="text-white dark:text-black light:border-gray-500">
177177
```
178178

179+
Note that this `tailwind` plugin can be used in conjunction with the `postcss` plugin. They are complementary and not exclusive.
180+
181+
- `postcss` plugin provides `@dark` and `@light` css at-rule syntax,
182+
- `tailwind` plugin provides `dark:` and `light:` classes in html.
183+
179184
[changelog]: ./CHANGELOG.md
180185
[tests]: https://github.com/vnphanquang/postcss-color-scheme/blob/main/lib/color-scheme.test.js
181186

0 commit comments

Comments
 (0)