Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 421 Bytes

File metadata and controls

33 lines (25 loc) · 421 Bytes

postcss-closest

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
{
	...
}

Install

npm install --save-dev postcss-closest

Usage

postcss( [ require( 'postcss-closest' ) ] )