# tailwindcss-preflight

> A modern and opinionated alternative to CSS resets

Latest version **1.2.0** (published 2026-11-19) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 60/100 (C)** — status: active.

Positive: no vulnerabilities; has provenance; recently updated; high maintenance score.

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

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2026-11-19 |
| First published | 2021-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3 |
| Maintainers | grievouz |
| Keywords | normalize, css, reset, browser, style |

## Links

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

## 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

- 1.2.0 (latest) — 2026-11-19
- 1.1.1 — 2026-02-07
- 1.0.1 — 2021-10-05

## README

<div align="center">
	<img height="140px" src="docs/logo.svg" alt="preflight">
	<br>
	“An opinionated set of base styles”
	<br>
	<i>- <a href="https://tailwindcss.com/docs/preflight">Tailwind.com</a></i>
</div>

## Usage

```html
<link href="https://cdn.jsdelivr.net/npm/tailwindcss-preflight@latest/preflight.css" rel="stylesheet" />
```

## Installation

```properties
npm install tailwindcss-preflight --save
```

Using a CSS-aware bundler (not plain Node.js runtime CSS loading):

```typescript
import "tailwindcss-preflight";
```

## Customization

The CSS works directly in browsers without Tailwind or a build step. By default,
it uses the upstream font stacks and normal font feature/variation settings.
You can optionally override them with native CSS custom properties:

```css
:root {
  --default-font-family: Arial, sans-serif;
  --default-font-feature-settings: "liga" 1;
  --default-font-variation-settings: "wght" 400;
  --default-mono-font-family: "Courier New", monospace;
  --default-mono-font-feature-settings: normal;
  --default-mono-font-variation-settings: normal;
}
```

These overrides are optional; omitted variables use built-in fallbacks. Use valid
CSS values for their corresponding properties. Font features/variations require
support from the chosen font.

For CSS imports, use `@import "tailwindcss-preflight/preflight.css";`.
The CDN URL follows npm’s `latest` release automatically (subject to CDN caching),
including future major versions, so it does not need a version edit for each release.
For reproducible production builds, replace `latest` with an exact published version.
A GitHub release alone does not update npm or CDNs.

## Development

Run `python3 -m unittest discover -s tests -v` with Chromium/Chrome installed
(or set `CHROME_BIN`). Python 3.9+, Node.js 24 and npm are also required for offline
package installation/entry-point checks. No dependency installation or CSS build
is needed. See [upstream provenance](docs/upstream.md), [changelog](CHANGELOG.md)
and [release procedure / trusted publishing setup](docs/releases.md).

## Why did you create this package?

For anyone who wants to use <a href="https://tailwindcss.com/docs/preflight">Preflight</a> but doesn't feel like pulling in all of <a href="https://tailwindcss.com/">Tailwind CSS</a>.

## Credits

<a href="https://tailwindcss.com/docs/preflight">Preflight</a> is built on top of <a href="https://github.com/sindresorhus/modern-normalize">modern-normalize</a> which itself is based on <a href="https://github.com/necolas/normalize.css">normalize.css</a>.
<br>
All credit goes to the respective code authors:

<table>
  <tr>
    <td align="center">
      <a href="https://github.com/necolas"
        ><img
          src="https://avatars.githubusercontent.com/u/239676?v=3?s=100"
          width="100px;"
          alt=""
        />
				<br />
				<sub><b>Nicolas Gallagher</b></sub></a
      >
    </td>
		<td align="center">
      <a href="https://github.com/jonathantneal"
        ><img
          src="https://avatars.githubusercontent.com/u/188426?v=3?s=100"
          width="100px;"
          alt=""
        />
				<br />
				<sub><b>Jonathan Neal</b></sub></a>
    </td>
		<td align="center">
      <a href="https://github.com/sindresorhus"
        ><img
          src="https://avatars.githubusercontent.com/u/170270?v=3?s=100"
          width="100px;"
          alt=""
        />
				<br />
				<sub><b>Sindre Sorhus</b></sub></a>
    </td>
		<td align="center">
      <a href="https://github.com/adamwathan"
        ><img
          src="https://avatars.githubusercontent.com/u/4323180?v=3?s=100"
          width="100px;"
          alt=""
        />
				<br />
				<sub><b>Adam Wathan</b></sub></a>
    </td>
		<td align="center">
      <a href="https://github.com/jonathantneal"
        ><img
          src="https://avatars.githubusercontent.com/u/882133?v=3?s=100"
          width="100px;"
          alt=""
        />
				<br />
				<sub><b>Jonathan Reinink</b></sub></a>
    </td>
  </tr>
</table>

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