Skip to content

Instantly share code, notes, and snippets.

@SuperOl3g
Created November 29, 2018 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SuperOl3g/d30ea731363790e439fdf24a3d63b48f to your computer and use it in GitHub Desktop.
Save SuperOl3g/d30ea731363790e439fdf24a3d63b48f to your computer and use it in GitHub Desktop.
const postcss = require('postcss');
const PREFIX = 'html ';
const SUFFIX = '';
module.exports = postcss.plugin('postcss-increase-weight', () =>
css =>
css.walkRules(rule => {
rule.selectors = rule.selectors.map(
selector => `${PREFIX}${selector}${SUFFIX}`
);
})
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment