text-decoration.js 430 B

12345678910111213141516171819202122232425
  1. let Declaration = require('../declaration')
  2. const BASIC = [
  3. 'none',
  4. 'underline',
  5. 'overline',
  6. 'line-through',
  7. 'blink',
  8. 'inherit',
  9. 'initial',
  10. 'unset'
  11. ]
  12. class TextDecoration extends Declaration {
  13. /**
  14. * Do not add prefixes for basic values.
  15. */
  16. check(decl) {
  17. return decl.value.split(/\s+/).some(i => !BASIC.includes(i))
  18. }
  19. }
  20. TextDecoration.names = ['text-decoration']
  21. module.exports = TextDecoration