mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-01 19:49:30 +08:00
16 lines
476 B
Text
16 lines
476 B
Text
'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;
|
|
};
|