Name: postcss-selector-matches
Owner: PostCSS
Description: PostCSS plugin to transform :matches() W3C CSS pseudo class to more compatible CSS (simpler selectors)
Created: 2015-04-29 05:30:52.0
Updated: 2018-05-07 02:18:15.0
Pushed: 2017-09-20 17:35:07.0
Homepage: null
Size: 24
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
PostCSS plugin to transform
:matches()
W3C CSS pseudo class to more compatible CSS selectors
http://dev.w3.org/csswg/selectors-4/#matches
m install postcss-selector-matches
postcss = require("postcss")
output = postcss()
se(require("postcss-selector-matches"))
rocess(require("fs").readFileSync("input.css", "utf8"))
ss
Using this input.css
:
tches(:first-child, .special) {
lor: red;
you will get:
rst-child, p.special {
lor: red;
Note that if you are doing crazy selector like p:matches(a) {}
you are likely to get crazy results (like pa {}
).
lineBreak
(default: false
)
Allows you to introduce a line break between generated selectors.