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

Method restoreBefore

lib/declaration.js:162–176  ·  view source on GitHub ↗

* Remove visual cascade

(decl)

Source from the content-addressed store, hash-verified

160 * Remove visual cascade
161 */
162 restoreBefore(decl) {
163 let lines = decl.raw('before').split('\n')
164 let min = lines[lines.length - 1]
165
166 this.all.group(decl).up(prefixed => {
167 let array = prefixed.raw('before').split('\n')
168 let last = array[array.length - 1]
169 if (last.length < min.length) {
170 min = last
171 }
172 })
173
174 lines[lines.length - 1] = min
175 decl.raws.before = lines.join('\n')
176 }
177
178 /**
179 * Set prefix to declaration

Callers 2

processMethod · 0.95

Calls 2

upMethod · 0.80
groupMethod · 0.80

Tested by

no test coverage detected