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-ordered-values/src/rules/ drwxrwxrwx | |
| Viewing file: Select action/file-type: 'use strict';
const valueParser = require('postcss-value-parser');
const listStyleTypes = require('./listStyleTypes.json');
const definedTypes = new Set(listStyleTypes['list-style-type']);
const definedPosition = new Set(['inside', 'outside']);
/**
* @param {import('postcss-value-parser').ParsedValue} listStyle
* @return {string}
*/
module.exports = function listStyleNormalizer(listStyle) {
const order = { type: '', position: '', image: '' };
listStyle.walk((decl) => {
if (decl.type === 'word') {
if (definedTypes.has(decl.value)) {
// its a type field
order.type = `${order.type} ${decl.value}`;
} else if (definedPosition.has(decl.value)) {
order.position = `${order.position} ${decl.value}`;
} else if (decl.value === 'none') {
if (
order.type
.split(' ')
.filter((e) => e !== '' && e !== ' ')
.includes('none')
) {
order.image = `${order.image} ${decl.value}`;
} else {
order.type = `${order.type} ${decl.value}`;
}
} else {
order.type = `${order.type} ${decl.value}`;
}
}
if (decl.type === 'function') {
order.image = `${order.image} ${valueParser.stringify(decl)}`;
}
});
return `${order.type.trim()} ${order.position.trim()} ${order.image.trim()}`.trim();
};
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0259 ]-- |