lini 0.3.0

A small, human-readable language for plain-text diagrams that compiles to clean SVG
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// pin (SPEC §6): lift a child out of the flow and centre it on a named parent
// point — center, an edge midpoint, or a corner. A corner pin straddles the
// corner. To place text, wrap it in a |plain| and pin the box.

padding: 40;

frame |box| {
  width: 240; height: 150; fill: #eee;
  |plain| { pin: center;       color: green; "C" }
  |plain| { pin: top left;     color: red;   "TL" }
  |plain| { pin: top;          color: red;   "T" }
  |plain| { pin: top right;    color: red;   "TR" }
  |plain| { pin: left;         color: red;   "L" }
  |plain| { pin: right;        color: red;   "R" }
  |plain| { pin: bottom left;  color: blue;  "BL" }
  |plain| { pin: bottom;       color: blue;  "B" }
  |plain| { pin: bottom right; color: blue;  "BR" }
}