summaryrefslogtreecommitdiff
path: root/node_modules/postcss-will-change/index.js
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-10-14 15:20:49 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-10-14 15:20:49 +0800
commitc5a5384e846f242e901e859fe600d695d8990a9a (patch)
tree079d4ccf2ed93dc1f0cae74a6d3b4a42ac387ece /node_modules/postcss-will-change/index.js
parentd261b7aafee0e6e5c7b853cb8dfe609cc0a0ac9e (diff)
legacy browser support via plugins from postcss
Diffstat (limited to 'node_modules/postcss-will-change/index.js')
-rw-r--r--node_modules/postcss-will-change/index.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/node_modules/postcss-will-change/index.js b/node_modules/postcss-will-change/index.js
new file mode 100644
index 00000000..b3172adc
--- /dev/null
+++ b/node_modules/postcss-will-change/index.js
@@ -0,0 +1,16 @@
+module.exports = () => {
+ return {
+ postcssPlugin: 'postcss-will-change',
+ Declaration: {
+ 'will-change': decl => {
+ let already = decl.parent.some(i => {
+ return i.type === 'decl' && i.prop === 'backface-visibility'
+ })
+ if (!already) {
+ decl.cloneBefore({ prop: 'backface-visibility', value: 'hidden' })
+ }
+ }
+ }
+ }
+}
+module.exports.postcss = true