RPIC

class

rpic extension. class attaches CSS class names to the SVG group already emitted for each shape (<g id="sN" class="…">). It changes nothing in rpic’s own rendering — styling happens in the host document that embeds the SVG, the same delegation contract as animate.

Two forms write to the same hook — and since this page is a host document, its CSS is already styling them: payment is critical (red), the cache circle is storage (hover it!), the wire is dashed dataflow:

.PS
box "payment" fit class "critical"     # inline, at creation

A: circle "cache" rad 0.3 at last box + (1.3, 0)
line right 0.6 from A.e
class A "storage"                      # statement: by label
class last line "dataflow"             # statement: by ordinal
.PE
payment cache

The statement form uses pic’s native references — labels and ordinals — so it also reaches shapes drawn inside macros (circuit elements!), and lets class lines cluster at the end of a picture like a theme block.

Composing classes

The same vocabulary plus pulse — classes compose like anywhere in CSS:

.PS
W: box "web" wid 0.6 ht 0.45
D: circle "db" rad 0.28 at W + (1.25, 0)
A: box "ALERT" wid 0.7 ht 0.45 at D + (1.35, 0)
arrow from W.e to D.w class "dataflow"
arrow from D.e to A.w class "dataflow"
class W "storage"
class D "storage"
class A "critical pulse"
.PE
web db ALERT

Hover web and db; the dataflow arrows go dashed teal; ALERT is critical and pulse — classes compose like anywhere in CSS. In PNG/PDF (or any page without this CSS) the same picture renders plain — the hook is inert.

Rules

Design notes: docs/svg-styles.md.