# sanitize.styl

> add sanitize() mixin using sanitize.css/lib/sanitize.styl

Latest version **3.3.0** (published 2016-06-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install sanitize.styl
pnpm add sanitize.styl
yarn add sanitize.styl
bun add sanitize.styl
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.3.0 |
| Published | 2016-06-15 |
| First published | 2016-06-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | 59naga |
| Maintainers | 59naga |
| Keywords | stylus, stylus-plugin, mixin, sanitize.css |

## Links

- npm: https://www.npmjs.com/package/sanitize.styl
- Repository: https://github.com/59naga/sanitize.styl
- Homepage: https://github.com/59naga/sanitize.styl#readme
- Issues: https://github.com/59naga/sanitize.styl/issues
- npm.io page: https://npm.io/package/sanitize.styl

## Dependencies (1)

- [sanitize.css](https://npm.io/package/sanitize.css.md) 3.3.0

## Recent versions

- 3.3.0 (latest) — 2016-06-15
- 0.0.0-latest (newest) — 2016-06-15
- 0.0.0 — 2016-06-13

## README

`sanitize.styl`
---

<p align="right">
  <a href="https://npmjs.org/package/sanitize.styl">
    <img src="https://img.shields.io/npm/v/sanitize.styl.svg?style=flat-square">
  </a>
  <a href="https://travis-ci.org/59naga/sanitize.styl">
    <img src="http://img.shields.io/travis/59naga/sanitize.styl.svg?style=flat-square">
  </a>
  <a href="https://gemnasium.com/59naga/sanitize.styl">
    <img src="https://img.shields.io/gemnasium/59naga/sanitize.styl.svg?style=flat-square">
  </a>
</p>

add `sanitize()` mixin using [sanitize.css/lib/sanitize.styl](https://github.com/10up/sanitize.css#readme)

Installation
---

```bash
npm install sanitize.styl --save
```

or, force latest `sanitize.css` installation using `@newest`.

```bash
npm install sanitize.styl@newest --save
```

Usage
---

### Via CLI

```stylus
// index.styl
@import 'sanitize.styl'

sanitize()
```

```bash
stylus --use sanitize.styl index.styl
# /* sanitize.css v3.3.0 | CC0 1.0 Public Domain | github.com/10up/sanitize.css */
# /*
#  * Normalization
#  */
# abbr[title] {
# ...
```

### Via API

```js
import stylus from 'stylus';
import sanitizeStyl from 'sanitize.styl';

stylus('sanitize()')
.use(sanitizeStyl())
.import('sanitize.styl')
.render((err, css) => {
  if (err) {
    throw err;
  }
  console.log(css);
  //
  // /* sanitize.css v3.3.0 | CC0 1.0 Public Domain | github.com/10up/sanitize.css */
  // /*
  //  * Normalization
  //  */
  // abbr[title] {
  // ...
});
```

Mixins
---

## `sanitize()`

expand the `sanitize.css` in the execute position.

**In**
```stylus
@import 'sanitize.styl'
sanitize()
```

**Out**
```css
/* sanitize.css v3.3.0 | CC0 1.0 Public Domain | github.com/10up/sanitize.css */
abbr[title] {
...
```

**In**
```stylus
@import 'sanitize.styl'
#container
  sanitize()
```

**Out**
```css
/* sanitize.css v3.3.0 | CC0 1.0 Public Domain | github.com/10up/sanitize.css */
#container abbr[title] {
...
```

Development
---
Requirement global
* NodeJS v6.2.1
* Npm v3.9.3 (or [pnpm](https://github.com/rstacruz/pnpm))

```bash
git clone https://github.com/59naga/sanitize.styl
cd sanitize.styl
npm install

npm test
```

License
---
[MIT](http://59naga.mit-license.org/)

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