New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

postcss-color-scheme

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-color-scheme - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

12

CHANGELOG.md
# Changelog
## 0.2.0
### Minor Changes
- [`d5a6ae9`](https://github.com/vnphanquang/postcss-color-scheme/commit/d5a6ae974d1769d3cab72683822bd8ddf4af472e) Thanks [@vnphanquang](https://github.com/vnphanquang)! - provide tailwind plugin as first party support, import at `postcss-color-scheme/tailwind`
### Patch Changes
- [`22b2839`](https://github.com/vnphanquang/postcss-color-scheme/commit/22b283923eb3b44db9c5afe41c6ac8562e38ea1f) Thanks [@vnphanquang](https://github.com/vnphanquang)! - reorganize src -> lib folder
- [`22b2839`](https://github.com/vnphanquang/postcss-color-scheme/commit/22b283923eb3b44db9c5afe41c6ac8562e38ea1f) Thanks [@vnphanquang](https://github.com/vnphanquang)! - include tailwind.js in npm publish
## 0.1.0

@@ -4,0 +16,0 @@

15

package.json
{
"name": "postcss-color-scheme",
"version": "0.1.0",
"version": "0.2.0",
"description": "postcss plugin for handling prefers-color-scheme",
"main": "src/index.js",
"main": "lib/index.js",
"exports": {
"./package.json": "./package.json",
"./tailwind": "./lib/tailwind.js",
".": "./lib/index.js"
},
"files": [
"src/index.js",
"src/color-scheme.js",
"lib/index.js",
"lib/color-scheme.js",
"lib/tailwind.js",
"CHANGELOG.md",

@@ -36,2 +42,3 @@ "README.md",

"prettier": "^2.8.7",
"tailwindcss": "^3.3.1",
"vitest": "^0.29.8"

@@ -38,0 +45,0 @@ },

@@ -5,5 +5,17 @@ # postcss-color-scheme

## Table of Contents
- [postcss-color-scheme](#postcss-color-scheme)
- [Table of Contents](#table-of-contents)
- [Changelog](#changelog)
- [Installation](#installation)
- [Design Decisions](#design-decisions)
- [Supported At Rules](#supported-at-rules)
- [Global Variant](#global-variant)
- [Test Cases \& Examples](#test-cases--examples)
- [Tailwind Support](#tailwind-support)
## [Changelog][changelog]
Postcss plugin for handling `prefers-color-scheme`
Postcss plugin for handling `prefers-color-scheme`, plus [tailwind support](#tailwind-support)

@@ -144,2 +156,27 @@ Input

## Tailwind Support
Make sure you have installed and configured `tailwindcss`.
```bash
npm install --save-dev tailwindcss
```
Add `postcss-color-scheme` to your tailwind config as a plugin, and turn off the default `darkMode` handling.
```js
/** @type {import("tailwindcss").Config } */
module.exports = {
// your config ...
darkMode: '',
plugins: [require('postcss-color-scheme/tailwind')],
};
```
Now, the following is available:
```html
<input class="text-white dark:text-black light:border-gray-500">
```
[changelog]: ./CHANGELOG.md

@@ -174,1 +211,2 @@ [tests]: https://github.com/vnphanquang/postcss-color-scheme/blob/main/src/color-scheme.test.js

[postcss-nested]: https://github.com/postcss/postcss-nested
[tailwind]: https://tailwindcss.com/
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc