File: readme.md

package info (click to toggle)
node-css-vendor 2.0.8%2B~2.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 676 kB
  • sloc: javascript: 802; makefile: 6
file content (42 lines) | stat: -rw-r--r-- 1,075 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
[![Build Status](https://travis-ci.org/cssinjs/css-vendor.svg?branch=master)](https://travis-ci.org/cssinjs/css-vendor) [![Greenkeeper badge](https://badges.greenkeeper.io/cssinjs/css-vendor.svg)](https://greenkeeper.io/)

## CSS vendor prefix detection and property feature testing.

### Vendor prefixes

```javascript
console.log(cssVendor.prefix.js) // e.g. WebkitTransform

console.log(cssVendor.prefix.css) // e.g. -webkit-transform
```

### Property support feature test

`cssVendor.supportedProperty(prop)`

Test if property is supported, returns false if not. Returns string if supported. May add a vendor prefix if needed.

```javascript
console.log(cssVendor.supportedProperty('animation')) // e.g. -webkit-animation
```

### Value support feature test

`cssVendor.supportedValue(prop, value)`

Test if value is supported, returns false if not. Returns string if supported. May add a vendor prefix if needed.

```javascript
console.log(cssVendor.supportedValue('display', 'flex')) // e.g. -webkit-flex
```

## Run tests

```bash
yarn
yarn test
```

## License

MIT