blob: ee510d04ee17da1b3c4e46682c9531b08198f0fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
var postcss = require('postcss');
module.exports = postcss.plugin('postcss-nth-child-fix', function (opts) { // eslint-disable-line no-unused-vars
opts = opts || {};
return function (css) {
css.walkRules(rule => {
rule.selector = rule.selector.replace(/:nth-child\([\t\n ]*n[\t\n ]*\)/gi, ':nth-child(1n)'); // eslint-disable-line max-len
});
};
});
|