postcss-not-x-child

PostCSS plugin transform :not-first-child and :not-last-child to :not(:first-child) and :not(:last-child).

Usage no npm install needed!

<script type="module">
  import postcssNotXChild from 'https://cdn.skypack.dev/postcss-not-x-child';
</script>

README

PostCSS :not-X-child Build Status

PostCSS plugin transform :not-first-child and :not-last-child to :not(:first-child) and :not(:last-child).

Input:

div:not-first-child {
}
div:not-last-child {
}

Output:

div:not(:first-child) {
}
div:not(:last-child) {
}

Usage

postcss([ require('postcss-not-x-child') ])

See PostCSS docs for examples for your environment.