Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
fix(Browser support): Transform CSS4 :not() usage to CSS3 spec
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ketch committed Feb 27, 2020
1 parent 4d4e079 commit 1317b7c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
32 changes: 32 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@
"postcss-loader": "3.0.0",
"postcss-mixins": "6.2.3",
"postcss-nested": "4.2.1",
"postcss-selector-not": "^4.0.0",
"postcss-selector-replace": "^1.0.2",
"postcss-sort-media-queries": "1.31.21",
"postcss-url": "8.0.0",
"prismjs": "1.19.0",
Expand Down
9 changes: 8 additions & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@ module.exports = {
require('postcss-url')({
url: 'rebase'
}),
require('postcss-mixins')({ mixinsDir: 'src/designa/mixins' }),
require('postcss-custom-selectors')({ importFrom: 'src/selectors.css' }),
require('postcss-custom-media'),
require('postcss-custom-properties')({ preserve: true }),
require('postcss-nested'),
// Many browsers don’t support compound `:not()` selectors, this splits it
require('postcss-selector-not'),
// We remove the PrismJS specific modifier when used in `:not()` selectors
// see ./src/scripts/selectors.ts:61
require('postcss-selector-replace')({
before: [/\[class\*=language-\]\)/gm],
after: [')']
}),
require('autoprefixer'),
require('postcss-extend'),
require('cssnano')({ preset: 'default' }),
Expand Down

0 comments on commit 1317b7c

Please sign in to comment.