Skip to content

0.8.0

Latest

Choose a tag to compare

@sliemeobn sliemeobn released this 17 Jul 13:09
b0ff5d1

🖼️ SVG support 🖼️

This release adds first-class support for SVG elements:

SVG.svg(.viewBox(0, 0, 24, 24), .width(24), .height(24)) {
    SVG.title { "Checkmark" }
    SVG.path(
        .d("M20 6 9 17l-5-5"),
        .fill(.none),
        .stroke("#0000FF"),
        .strokeWidth(2),
        .strokeLinecap(.round),
        .strokeLinejoin(.round)
    )
}

Composition of HTML and SVGContent types is unified by the new @ContentBuilder type (superseding @HTMLBuilder).

‼️ Rendering behavior change

The default rendering behavior of HTMLDocument now always renders <meta charset="UTF-8"> in the <head> tag (before <title>). Check your custom head elements to avoid a duplicate meta entry.

Potentially breaking changes

Several public types have been replaced with type aliases, which in some cases can break type resolution or extensions. (eg: HTMLAttribute)
The HTML protocol now refines the more general MarkupContent protocol.
_HTMLRenderToken was extended, which may break custom rendering implementations.

What's Changed

Full Changelog: 0.7.1...0.8.0