Skip to content

Commit adff715

Browse files
refactor(css): read the declaration a path() fill rule stands in directly
A shape is only rewritten inside a declaration's value, so the fallback for no declaration never ran and left the one changed line no test reaches.
1 parent 8e5d30b commit adff715

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎lib/css/syntax-printer.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3289,10 +3289,10 @@ const _dropDefaultShapeParts = (fn, inner) => {
32893289
// Only `clip-path` gives `path()` a fill rule: elsewhere one is a value the
32903290
// engine drops, which taking it out would bring back.
32913291
if (fn === "path") {
3292-
const property =
3293-
_S._valueDeclaration === null
3294-
? ""
3295-
: A.unescapedName(_S._valueDeclaration).toLowerCase();
3292+
// A shape is rewritten in a declaration's value alone.
3293+
const property = A.unescapedName(
3294+
/** @type {Node} */ (_S._valueDeclaration)
3295+
).toLowerCase();
32963296
if (property !== "clip-path" && property !== "-webkit-clip-path") {
32973297
return null;
32983298
}

0 commit comments

Comments
 (0)