# stylehacks-nightly

> Detect/remove browser hacks from CSS files.

Latest version **0.8.4** (published 2020-08-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install stylehacks-nightly
pnpm add stylehacks-nightly
yarn add stylehacks-nightly
bun add stylehacks-nightly
```

## 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.8.4 |
| Published | 2020-08-04 |
| First published | 2020-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.13.0 |
| Dependencies | 3 |
| Unpacked size | 23.3 KB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Anix |
| Maintainers | anixsaha |
| Keywords | browsers, css, hack, hacks, optimise, postcss, postcss-plugin, stylehacks |

## Links

- npm: https://www.npmjs.com/package/stylehacks-nightly
- Repository: https://github.com/anikethsaha/cssnano-nightly
- Issues: https://github.com/cssnano/cssnano/issues
- npm.io page: https://npm.io/package/stylehacks-nightly

## Dependencies (3)

- [postcss](https://npm.io/package/postcss.md) ^7.0.16
- [browserslist](https://npm.io/package/browserslist.md) ^4.6.0
- [postcss-selector-parser](https://npm.io/package/postcss-selector-parser.md) ^3.1.1

## 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.8.4 (latest) — 2020-08-04
- 0.8.1 — 2020-08-01
- 0.7.31 — 2020-07-31
- 0.7.25 — 2020-07-25
- 0.7.24 — 2020-07-24
- 0.7.8 — 2020-07-08
- 0.6.30 — 2020-06-30
- 0.6.27 — 2020-06-27
- 0.6.26 — 2020-06-26

## README

### This is an un-official nightly release of cssnano's stylehacks 

In this, the package is named as stylehacks-nightly

In from this docs, you need to replace every 

stylehacks --> stylehacks-nightly



***
Original Docs below
***

# stylehacks

> Detect/remove browser hacks from CSS files.


## Install

With [npm](https://npmjs.org/package/stylehacks) do:

```
npm install stylehacks --save
```


## Example

In its default mode, stylehacks will remove hacks from your CSS file, based on
the browsers that you wish to support.

### Input

```css
h1 {
    _color: white;
    color: rgba(255, 255, 255, 0.5);
}
```

### Output

```css
h1 {
    color: rgba(255, 255, 255, 0.5);
}
```


## API

### `stylehacks.detect(node)`

Type: `function`  
Returns: `boolean`

This method will take any PostCSS *node*, run applicable plugins depending on
its type, then will return a boolean depending on whether it found any of
the supported hacks. For example, if the `decl` node found below is passed to
the `detect` function, it will return `true`. But if the `rule` node is passed,
it will return `false` instead.

```css
h1 { _color: red }
```

### `stylehacks.process(css, [options]).then(function(result) {})`

#### options

##### lint

Type: `boolean`  
Default: `false`

If lint mode is enabled, stylehacks will not remove hacks from the CSS; instead,
it will add warnings to `Result#messages`.


### `postcss([ stylehacks(opts) ])`

stylehacks can also be consumed as a PostCSS plugin. See the
[documentation](https://github.com/postcss/postcss#usage) for examples for
your environment.


## Related

stylehacks works well with your existing PostCSS setup:

* [stylelint] - Comprehensive & modern CSS linter, to ensure that your code
  style rules are respected.


## Contributing

Pull requests are welcome. If you add functionality, then please add unit tests
to cover it.


## License

MIT © [Ben Briggs](http://beneb.info)


[stylelint]: https://github.com/stylelint/stylelint

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