add 'none' keyword to PISS shadow definiton that equals empty array

This commit is contained in:
Henry Jameson 2024-09-24 00:23:25 +03:00
commit ab8907909b
5 changed files with 16 additions and 6 deletions

View file

@ -32,7 +32,11 @@ export const serialize = (ruleset) => {
} else {
switch (directive) {
case 'shadow':
return ` ${directive}: ${value.map(serializeShadow).join(', ')}`
if (value.length > 0) {
return ` ${directive}: ${value.map(serializeShadow).join(', ')}`
} else {
return ` ${directive}: none`
}
default:
return ` ${directive}: ${value}`
}