PostCSS plugin to modify closest matching part of current selector
/* Input example */
html > body p:closest(body with .index, html with .js)
{
...
}
/* Output example */
html.js > body.index p
{
...
}
npm install --save-dev postcss-closest
postcss( [ require( 'postcss-closest' ) ] )