@csstools/selector-resolve-nested
v3.0.0
Published
Resolve nested CSS selectors
Downloads
5,285,336
Readme
Selector Resolve Nested
API
Usage
Add Selector Resolve Nested to your project:
npm install @csstools/selector-resolve-nested --save-dev
import { resolveNestedSelector } from '@csstools/selector-resolve-nested';
import parser from 'postcss-selector-parser';
const a = parser().astSync('.foo &');
const b = parser().astSync('.bar');
resolveNestedSelector(a, b); // '.foo .bar'