Skip to content

v0.0.11

Choose a tag to compare

@daniesy daniesy released this 19 May 21:39
· 18 commits to main since this release

Highlights

New CSS Parser

  • CSS parsing from scratch:
    DOMinator now includes a robust CSS parser that supports both standard CSS rules and at-rules, including nested and simple at-rules like @media and @font-face.

  • Selector matching:
    Easily check if a node matches a CSS selector (supports tag, class, id, compound, and descendant selectors).

CSS Inlining

  • Inline CSS styles:
    Export HTML with CSS rules inlined as style attributes using Node::toInlinedHtml().

  • Supports tag, class, and id selectors.

  • Removes <style> tags from the output.

  • Works with both minified and pretty-printed HTML.

Pretty-print and Minify HTML

  • Flexible HTML export:
  • Node::toHtml() exports minified HTML by default.
  • Node::toHtml(false) and Node::toInlinedHtml(false) export pretty-printed, indented HTML for easier reading and debugging.

Documentation

  • The README has been updated with:
  • Usage examples for the new CSS parser and selector matching.
  • Details on CSS inlining and export options.
  • Clear documentation of pretty-print and minify features.

Upgrade Notes

  • No breaking changes. All previous APIs remain compatible.
  • All new features are opt-in and fully documented.