MCPcopy
hub / github.com/postcss/autoprefixer / add

Method add

lib/selector.js:17–26  ·  view source on GitHub ↗

* Clone and add prefixes for at-rule

(rule, prefix)

Source from the content-addressed store, hash-verified

15 * Clone and add prefixes for at-rule
16 */
17 add(rule, prefix) {
18 let prefixeds = this.prefixeds(rule)
19
20 if (this.already(rule, prefixeds, prefix)) {
21 return
22 }
23
24 let cloned = this.clone(rule, { selector: prefixeds[this.name][prefix] })
25 rule.parent.insertBefore(rule, cloned)
26 }
27
28 /**
29 * Is rule already prefixed before

Callers

nothing calls this directly

Calls 3

prefixedsMethod · 0.95
alreadyMethod · 0.95
cloneMethod · 0.45

Tested by

no test coverage detected