mask-border.js 790 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. let Declaration = require('../declaration')
  2. class MaskBorder extends Declaration {
  3. /**
  4. * Return property name by final spec
  5. */
  6. normalize() {
  7. return this.name.replace('box-image', 'border')
  8. }
  9. /**
  10. * Return flex property for 2012 spec
  11. */
  12. prefixed(prop, prefix) {
  13. let result = super.prefixed(prop, prefix)
  14. if (prefix === '-webkit-') {
  15. result = result.replace('border', 'box-image')
  16. }
  17. return result
  18. }
  19. }
  20. MaskBorder.names = [
  21. 'mask-border',
  22. 'mask-border-source',
  23. 'mask-border-slice',
  24. 'mask-border-width',
  25. 'mask-border-outset',
  26. 'mask-border-repeat',
  27. 'mask-box-image',
  28. 'mask-box-image-source',
  29. 'mask-box-image-slice',
  30. 'mask-box-image-width',
  31. 'mask-box-image-outset',
  32. 'mask-box-image-repeat'
  33. ]
  34. module.exports = MaskBorder