mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-25 02:07:09 -06:00
usvg takes a `transform` CSS property as a presentation attribute that overrides the element's own, but reads its value as SVG: CSS units (`translate(100px, 0)`, `rotate(45deg)`) don't parse, and the object was left with no transform at all. Before usvg runs, transform declarations in `style` attributes and `<style>` rules are now written in SVG syntax (lengths in px, angles in deg/rad/grad/turn, translateX/Y, scaleX/Y and skew as SVG's functions); values that can't be are left. The text pass's own cascade now expands the `font` shorthand into its longhands, as usvg does for the rest of the drawing, so text styled with `font: italic bold 30px …` keeps its size, weight and style. Refs #1557