Diagrams you declare, not draw.
Sauvignon is a small language for diagrams. You write XML describing what the picture is — marks, how they compose, how they relate — and it compiles to clean, styleable SVG. No dragging, no coordinates.
Sauvignon: Taming SVG
What it looks like
You describe the structure. The engine works out every coordinate.
<diagram padding="16">
<row gap="28">
<rect id="a">Parse</rect>
<rect id="b">Layout</rect>
<rect id="c">Render</rect>
</row>
<connect from="a" to="b"/>
<connect from="b" to="c"/>
</diagram>
Nothing in that source says where anything goes. <row> says these things sit
in a row; <connect> says these two are related. Positions fall out of that.
Four ideas
The tag is the shape. <rect>, <ellipse>, <diamond>, <hexagon> — marks
are the vocabulary, and the vocabulary is extensible: a shape is just data
(a unit-box outline), so registering one gives you both its rendering and its
connector clipping for free.
Positions are solved, not assigned. The layout tree desugars into
difference-constraints, and <align> / <distribute> compile into constraints
too. Explicit relations beat structural placement, so one element can be
stacked, aligned and connected at once — and you can align two elements that
live in different parents, which a strict layout tree cannot express.
Appearance is CSS. Output carries semantic classes and a palette of custom
properties, so you restyle a diagram's chrome by overriding a few variables, and
dark mode comes free via prefers-color-scheme. Two things sit outside that
palette: colours a scale chose (pie slices, categorical fills) are pinned by
the data, and a variable you override yourself stops following the reader's
colour scheme — you have taken it over.
Charts are the same language. A Grammar-of-Graphics data layer means
<plot> is a coordinate frame hosting mark layers. Pie is not a chart type; it
is bars in polar coordinates. The same engine draws your architecture diagram
and your bar chart.
A taste of the gallery
Barchart
A <plot> is a coordinate frame: it owns the scales, draws the axes, and hosts mark layers. fill="amount" colours the bars by a COLOR scale.
Dashboard
Named grid areas: an "app shell". The areas template paints a picture of the layout; each child places itself into a named region with area="...", and a name repeated across cells spans them (header and footer span both columns). columns="150px 1fr" and rows="56 1fr 42" size the tracks; the 1fr column and row fill. The main region hosts a lazy <plot> that reflows to fill it, and the sidebar a nested stretch column of nav buttons.
Flowchart
Shapes are element types now: the tag IS the mark. Layout (column/row) and connection stay orthogonal to shape. The two tinted boxes carry their colour as a CLASS rather than as an inline fill, so the tint can follow the colour scheme. Pinned inline colours can't: a pale fill stays pale in dark mode, while the label colour flips light to suit the dark background, and the text all but vanishes against it. Anything given a fixed fill needs a fixed foreground to match, or a rule per scheme like this.
Pie
pie = bars + polar. The SAME bars layer, in polar coordinates, becomes a pie: each value is an angular slice, coloured by an ordinal scale, with a legend. "A graphic is a composition, not a type."
Timeline
Digital Tolkien "Episode Timeline" for Durin (rop.digitaltolkien.com/character/durin/): lanes = episodes he speaks in, blocks = his 424 speech lines, one dwarf-red colour.
Tree
The org-chart look comes from pinning the sides: every edge leaves the parent's south and enters a child's north. Left free, an orthogonal edge leaves whichever side faces the child, so the outer two would come out the parent's flanks and into the children's sides. Pinning s→n makes them share one drop from the parent and fan out along a level — the T-junction bus every org chart is drawn with.