resolve-cascade

Resolve CSS selectors against a document.

Usage no npm install needed!

<script type="module">
  import resolveCascade from 'https://cdn.skypack.dev/resolve-cascade';
</script>

README

resolve-cascade

Resolves a CSS Stylesheet against an HTML Document producing a Cascade of selectors for each element. A Cascade can then be used to produce a computed style for that element.

In addition to libraries for performing cascade resolution, there's two assertions for help in writing tests that check the expected effects of CSS on a document.

API documentation