mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-04 12:09:31 +08:00
18 lines
395 B
Text
18 lines
395 B
Text
let Value = require('../value')
|
|
|
|
class ImageSet extends Value {
|
|
/**
|
|
* Use non-standard name for WebKit and Firefox
|
|
*/
|
|
replace(string, prefix) {
|
|
let fixed = super.replace(string, prefix)
|
|
if (prefix === '-webkit-') {
|
|
fixed = fixed.replace(/("[^"]+"|'[^']+')(\s+\d+\w)/gi, 'url($1)$2')
|
|
}
|
|
return fixed
|
|
}
|
|
}
|
|
|
|
ImageSet.names = ['image-set']
|
|
|
|
module.exports = ImageSet
|