From 579f6e698bbafe786fd630e60bde0a229a24e723 Mon Sep 17 00:00:00 2001 From: geoctrl Date: Sun, 1 May 2022 00:36:18 -0600 Subject: [PATCH] fix keyframes --- dev-env/main.css | 12 +++++++++++- package.json | 2 +- src/postcss-kremling-plugin.js | 2 +- webpack.config.js | 4 ++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/dev-env/main.css b/dev-env/main.css index 1225959..87a0199 100644 --- a/dev-env/main.css +++ b/dev-env/main.css @@ -1,3 +1,13 @@ input .test { text-align: center; -} \ No newline at end of file + animation: my-animation; +} + +@keyframes my-animation { + from { + background-color: red; + } + to { + background-color: blue; + } +} diff --git a/package.json b/package.json index 0e363d7..0a06e4f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kremling-loader", - "version": "2.1.0", + "version": "2.1.1", "main": "index.js", "author": "@geoctrl", "license": "MIT", diff --git a/src/postcss-kremling-plugin.js b/src/postcss-kremling-plugin.js index 72dee7a..5bd5136 100644 --- a/src/postcss-kremling-plugin.js +++ b/src/postcss-kremling-plugin.js @@ -6,7 +6,7 @@ module.exports = ({ id, namespace }) => { const output = parser(selectors => { if (left) { const s = selectors.first.first; - if (s.type === 'pseudo') { + if (s.type === 'pseudo' || s.type === 'tag') { if (s.value === ':global') { s.remove(); } diff --git a/webpack.config.js b/webpack.config.js index 9337b43..9fed0dd 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -21,7 +21,7 @@ config.module = { plugins: { 'autoprefixer': {}, 'cssnano': {}, - }, + }, }, }, }, @@ -34,4 +34,4 @@ config.devServer = { contentBase: path.resolve(__dirname, 'dev-env') }; -module.exports = config; \ No newline at end of file +module.exports = config;