isValidCssUnitValue

Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.css

This function tells you if the passed value is a valid css unit based one like 10px, 20em, etc…

Params

  1. value*-String|Number

    The value to check

Return

  1. -Boolean

    true if is a valid unit based value, false if not

Example

import { isValidCssUnitValue } from '@blackbyte/sugar/css';
isValidCssUnitValue('10px'); // => true
isValidCssUnitValue('default'); // => false