unitless-css-property

Helper to check for unitless CSS property names

MIT 3 个版本
安装
npm install unitless-css-property
yarn add unitless-css-property
pnpm add unitless-css-property
bun add unitless-css-property
README

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.

版本列表
1.0.2 2016-05-29
1.0.1 2016-05-26
1.0.0 2016-05-26