background-clip.js 504 B

123456789101112131415161718192021222324
  1. let Declaration = require('../declaration')
  2. let utils = require('../utils')
  3. class BackgroundClip extends Declaration {
  4. constructor(name, prefixes, all) {
  5. super(name, prefixes, all)
  6. if (this.prefixes) {
  7. this.prefixes = utils.uniq(
  8. this.prefixes.map(i => {
  9. return i === '-ms-' ? '-webkit-' : i
  10. })
  11. )
  12. }
  13. }
  14. check(decl) {
  15. return decl.value.toLowerCase() === 'text'
  16. }
  17. }
  18. BackgroundClip.names = ['background-clip']
  19. module.exports = BackgroundClip