Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/pmb/node_modules_old/postcss-merge-longhand/src/lib/ drwxrwxrwx | |
| Viewing file: Select action/file-type: 'use strict';
const isCustomProp = require('./isCustomProp');
/** @type {(node: import('postcss').Declaration) => boolean} */
const important = (node) => node.important;
/** @type {(node: import('postcss').Declaration) => boolean} */
const unimportant = (node) => !node.important;
/* Cannot be combined with other values in shorthand
https://www.w3.org/TR/css-cascade-5/#shorthand */
const cssWideKeywords = ['inherit', 'initial', 'unset', 'revert'];
/**
* @type {(props: import('postcss').Declaration[], includeCustomProps?: boolean) => boolean}
*/
module.exports = (props, includeCustomProps = true) => {
const uniqueProps = new Set(props.map((node) => node.value.toLowerCase()));
if (uniqueProps.size > 1) {
for (const unmergeable of cssWideKeywords) {
if (uniqueProps.has(unmergeable)) {
return false;
}
}
}
if (
includeCustomProps &&
props.some(isCustomProp) &&
!props.every(isCustomProp)
) {
return false;
}
return props.every(unimportant) || props.every(important);
};
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0204 ]-- |