While “mangling” CSS, empty rules get removed:
|
if p.options.MangleSyntax { |
|
rules = removeEmptyAndDuplicateRules(rules) |
|
} |
However, empty @keyframes are a valid (albeit hacky) use case, as these animations can still be triggered to dispatch JavaScript animation events: https://bugzilla.mozilla.org/show_bug.cgi?id=1004377
While “mangling” CSS, empty rules get removed:
esbuild/internal/css_parser/css_parser.go
Lines 233 to 235 in 89a3afb
However, empty
@keyframesare a valid (albeit hacky) use case, as these animations can still be triggered to dispatch JavaScript animation events: https://bugzilla.mozilla.org/show_bug.cgi?id=1004377