# prefix-style

> gets a prefixed name for a css style

Latest version **2.0.1** (published 2015-11-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install prefix-style
pnpm add prefix-style
yarn add prefix-style
bun add prefix-style
```

## 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 | 2.0.1 |
| Published | 2015-11-30 |
| First published | 2014-12-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Matt DesLauriers |
| Maintainers | mattdesl |
| Keywords | prefix, css, style, rule, prefixes, prefixing, webkit, -webkit, -ms, -moz, -o, styles, transform |

## Links

- npm: https://www.npmjs.com/package/prefix-style
- Repository: https://github.com/mattdesl/prefix-style
- Issues: https://github.com/mattdesl/prefix-style/issues
- npm.io page: https://npm.io/package/prefix-style

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

- 2.0.1 (latest) — 2015-11-30
- 2.0.0 — 2015-11-30
- 1.0.0 — 2014-12-07

## README

# prefix-style

[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)

For a camel case string like `"transform"` or `"transformStyle"`, returns the prefixed version like `"MozTransformStyle"` (if necessary). Returns `false` if the style is unsupported. 

```js
var camel = require('to-camel-case')
var prefix = require('prefix-style')

var key = prefix(camel('transform-style'))
if (key)
    element.style[key] = 'preserve-3d'
```

Original implementation by [Paul Irish](https://gist.github.com/paulirish/523692), with some modifications by me.

## Usage

[![NPM](https://nodei.co/npm/prefix-style.png)](https://nodei.co/npm/prefix-style/)

#### `prefix(prop)`

Prefixes `prop`, a camel case string like `transformStyle` or `fontSmoothing`. Returns the prefixed camel case version (or unprefixed if the browser supports it). Returns `false` if the browser doesn't support it. 

## License

Implementation by [Paul Irish](https://gist.github.com/paulirish/523692).

Redistributed under MIT, see [LICENSE.md](http://github.com/mattdesl/prefix-style/blob/master/LICENSE.md) for details.

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