0.2.5
Customizations and layouts take a big leap forward with this release! Put together, these improvements make beautiful diagrams like these possible:

Features ๐โ
- New class of special themes, starting with
Terminal, andTerminal Grayscale. See docs. #1040, #1041 style.font: monoto use a monospaced font for the text/label. See docs. #1010border-radiusis supported for bothclassandsql_tableshapes. Thanks to second-time contributor @donglixiaoche ! #982- Implements
style.fill-pattern. See docs. #1024, #1041
Improvements ๐งนโ
dagrelayouts that have a connection where one endpoint is a container is much improved. #1011elklayouts have less bends in the routes. #1033elklayouts center nodes better. #1028elklayouts have nicer margins between node boundaries and edges. #1028elklayouts container contents are centered within. #1038elklayouts container dimensions fit label. #1038sketchdraws connections with less roughness, which especially improves look of corner bends in ELK. #1014- CSS in SVGs are diagram-specific, which means you can embed multiple D2 diagrams on a web page without fear of style conflicts. #1016
Bugfixes โ๏ธโ
- Fixes
d2erroring on malformed user paths (fdopendirerror). util-go#10 - Arrowhead labels being set without maps wasn't being picked up. #1015
- Fixes a
dagrelayout error with connections to a container shape with a blockstring label. #1032