# tailwindcss-trump

> Increase Tailwind CSS Specificity

Latest version **1.1.2** (published 2023-04-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install tailwindcss-trump
pnpm add tailwindcss-trump
yarn add tailwindcss-trump
bun add tailwindcss-trump
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2023-04-05 |
| First published | 2023-04-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Andreas Deuschlinger |
| Maintainers | andyogo |
| Keywords | tailwind, tailwindcss, trump, CSS specificity, plugin |

## Links

- npm: https://www.npmjs.com/package/tailwindcss-trump
- Repository: https://github.com/AndyOGo/tailwindcss-trump
- Homepage: https://github.com/AndyOGo/tailwindcss-trump#readme
- Issues: https://github.com/AndyOGo/tailwindcss-trump/issues
- npm.io page: https://npm.io/package/tailwindcss-trump

## Dependencies (1)

- [postcss-selector-parser](https://npm.io/package/postcss-selector-parser.md) ^6.0.4

## Alternatives

- [@sveltejs/kit](https://npm.io/package/@sveltejs/kit.md) — 2.2M weekly downloads
- [@atlaskit/theme](https://npm.io/package/@atlaskit/theme.md) — 402.0K weekly downloads
- [@tangle-network/brand](https://npm.io/package/@tangle-network/brand.md) — 10.0K weekly downloads
- [seneca](https://npm.io/package/seneca.md) — 7.4K weekly downloads
- [@bsb/base](https://npm.io/package/@bsb/base.md) — 7.2K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2023-04-05
- 1.1.1 — 2023-04-04
- 1.1.0 — 2023-04-04

## README

# tailwindcss-trump

Increase Tailwind CSS Specificity - without [`!` important modifier](https://tailwindcss.com/docs/configuration#important-modifier).

> **Note:** Repeated occurrences of the same simple selector are allowed and do increase specificity.
https://www.w3.org/TR/selectors-3/#specificity

## Installation

```sh
# npm
npm install tailwindcss-trump --save-dev

# yarn
yarn add --dev tailwindcss-trump
```

## Configuration

Add the plugin to the `plugins` array of the tailwind config file.  

```js
// tailwind.config.js
module.exports = {
  // ...

  plugins: [
    // ...
    require("tailwindcss-trump"),
  ],
};
```

Optionally set your trump name in the config.

```js
// tailwind.config.js
module.exports = {
  theme: {
    // ...
    trumpName: "bump",
    // will result in bump: variant
  },
  // ...
};
```

## Usage

Use the `trump:` modifier (you can play with it [here](https://play.tailwindcss.com/v5ZpuKy2hH):

```html
<div class="bg-red-500 bg-sky-500 h-4"></div>

<div class="trump:bg-red-500 bg-sky-500 h-4"></div>

<div class="trump:bg-red-500 trump:bg-sky-500 h-4"></div>

<div class="trump:trump:bg-red-500 trump:bg-sky-500 h-4"></div>

<div class="bg-red-500 bg-sky-500 trump:hover:bg-green-500 hover:bg-yellow-500 h-4"></div>

<div class="bg-red-500 bg-sky-500 trump:md:bg-green-500 md:bg-yellow-500 h-4"></div>
```

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