Skip to content

robinweser/unitless-css-property

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unitless CSS Property

TravisCI

Test Coverage Code Climate

Provides a simple helper to check for unitless CSS property names.
It also checks for prefixed and hyphenated property names.

Installation

npm i --save unitless-css-property

Usage

import isUnitlessCSSProperty from 'unitless-css-property'

// basic property
isUnitlessCSSProperty('lineHeight') // => true
// prefixed property
isUnitlessCSSProperty('WebkitFlex') // => true
// hypenated property
isUnitlessCSSProperty('line-height') // => true
// prefixed and hypenated property
isUnitlessCSSProperty('-webkit-flex') // => true


isUnitlessCSSProperty('width') // => false

License

Licensed under the MIT License.
Created with ♥ by @rofrischmann.

About

Helper to check for unitless CSS property names

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published