blob: ebcf00b1cc71c388309a437990505ba5edf9e0a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
'use strict';
const isCustomProp = require('./isCustomProp');
const globalKeywords = new Set(['inherit', 'initial', 'unset', 'revert']);
/** @type {(prop: import('postcss').Declaration, includeCustomProps?: boolean) => boolean} */
module.exports = (prop, includeCustomProps = true) => {
if (
!prop.value ||
(includeCustomProps && isCustomProp(prop)) ||
(prop.value && globalKeywords.has(prop.value.toLowerCase()))
) {
return false;
}
return true;
};
|