You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
395 B

3 months ago
  1. let Value = require('../value')
  2. class ImageSet extends Value {
  3. /**
  4. * Use non-standard name for WebKit and Firefox
  5. */
  6. replace(string, prefix) {
  7. let fixed = super.replace(string, prefix)
  8. if (prefix === '-webkit-') {
  9. fixed = fixed.replace(/("[^"]+"|'[^']+')(\s+\d+\w)/gi, 'url($1)$2')
  10. }
  11. return fixed
  12. }
  13. }
  14. ImageSet.names = ['image-set']
  15. module.exports = ImageSet