# uniquestyles

> PostCSS plugin that strips selectors found in other stylesheets.

Latest version **0.2.0** (published 2024-02-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install uniquestyles
pnpm add uniquestyles
yarn add uniquestyles
bun add uniquestyles
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2024-02-11 |
| First published | 2023-07-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 0 |
| Unpacked size | 133.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Luke Downing |
| Maintainers | lukedowning |
| Keywords | postcss, css, postcss-plugin, postcss-diff |

## Links

- npm: https://www.npmjs.com/package/uniquestyles
- Repository: https://github.com/lukeraymonddowning/postcss-diff
- Homepage: https://github.com/lukeraymonddowning/postcss-diff#readme
- Issues: https://github.com/lukeraymonddowning/postcss-diff/issues
- npm.io page: https://npm.io/package/uniquestyles

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2024-02-11
- 0.1.0 — 2023-09-06
- 0.0.0 — 2023-07-10

## README

# uniquestyles

[PostCSS] plugin that strips selectors found in other stylesheets.

[PostCSS]: https://github.com/postcss/postcss

## Installation

```bash
npm install -D uniquestyles
```

## Introduction

This plugin is primarily intended to be used inside Laravel Nova to strip out Tailwind selectors in your custom field/card/tool css file that are already defined in the Nova stylesheet.
This ensures that your custom css file is as small as possible and doesn't cause style conflicts with Nova.

## Configuration

You should configure this plugin by passing CSS files you want to compare against to the `paths` option:

```js
// postcss.config.js
const path = require("path");

module.exports = {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
    uniquestyles: {
      paths: [
          path.join(__dirname, "../../public/vendor/nova/app.css"),
      ]
    },
  }
}
```

## Attribution

This plugin was created for the Laravel Nova Mastery 2023 course and is pretty much verbatim from [work done by Aaron Francis](https://twitter.com/aarondfrancis/status/1636438221558038569?s=20).
All credit goes to him for the idea and implementation.

---
_Source: https://npm.io/package/uniquestyles · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
