MCPcopy
hub / github.com/FullHuman/purgecss / removeUnusedKeyframes

Method removeUnusedKeyframes

packages/purgecss/src/index.ts:870–879  ·  view source on GitHub ↗

* Remove unused keyframes

()

Source from the content-addressed store, hash-verified

868 * Remove unused keyframes
869 */
870 public removeUnusedKeyframes(): void {
871 for (const node of this.atRules.keyframes) {
872 if (
873 !this.usedAnimations.has(node.params) &&
874 !this.isKeyframesSafelisted(node.params)
875 ) {
876 node.remove();
877 }
878 }
879 }
880
881 /**
882 * Transform a selector node into a string

Callers 2

purgeCSSFunction · 0.95
getPurgedCSSMethod · 0.95

Calls 1

isKeyframesSafelistedMethod · 0.95

Tested by

no test coverage detected