text-decoration-skip-ink.js 524 B

1234567891011121314151617181920212223
  1. let Declaration = require('../declaration')
  2. class TextDecorationSkipInk extends Declaration {
  3. /**
  4. * Change prefix for ink value
  5. */
  6. set(decl, prefix) {
  7. if (decl.prop === 'text-decoration-skip-ink' && decl.value === 'auto') {
  8. decl.prop = prefix + 'text-decoration-skip'
  9. decl.value = 'ink'
  10. return decl
  11. } else {
  12. return super.set(decl, prefix)
  13. }
  14. }
  15. }
  16. TextDecorationSkipInk.names = [
  17. 'text-decoration-skip-ink',
  18. 'text-decoration-skip'
  19. ]
  20. module.exports = TextDecorationSkipInk