UNPKG

postcss-merge-longhand

Version:

Merge longhand properties into shorthand with PostCSS.

12 lines (10 loc) • 348 B
import { isCssWideKeyword } from './isCssWideKeyword.js'; import isCustomProp from './isCustomProp.js'; /** @param {import('postcss').Declaration} prop */ export default (prop, includeCustomProps = true) => { return !( !prop.value || (includeCustomProps && isCustomProp(prop)) || (prop.value && isCssWideKeyword(prop.value)) ); };