diff options
Diffstat (limited to 'node_modules/autoprefixer/lib/hacks/background-clip.js')
| -rw-r--r-- | node_modules/autoprefixer/lib/hacks/background-clip.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/node_modules/autoprefixer/lib/hacks/background-clip.js b/node_modules/autoprefixer/lib/hacks/background-clip.js new file mode 100644 index 0000000..92c714c --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/background-clip.js @@ -0,0 +1,24 @@ +let Declaration = require('../declaration') +let utils = require('../utils') + +class BackgroundClip extends Declaration { + constructor(name, prefixes, all) { + super(name, prefixes, all) + + if (this.prefixes) { + this.prefixes = utils.uniq( + this.prefixes.map(i => { + return i === '-ms-' ? '-webkit-' : i + }) + ) + } + } + + check(decl) { + return decl.value.toLowerCase() === 'text' + } +} + +BackgroundClip.names = ['background-clip'] + +module.exports = BackgroundClip |