d2 icon indicating copy to clipboard operation
d2 copied to clipboard

the class is undefined.

Open bo-ku-ra opened this issue 1 year ago • 4 comments

should it be a compille error?

classes{ GRAY:{style.font-color:dimgray; style.stroke:dimgray; style.fill:gainsboro;} } x y{class:GRAY} z{class:GLAY}

#GLAY is a Japanese rock band :-p

bo-ku-ra avatar Apr 10 '23 00:04 bo-ku-ra

@bo-ku-ra i opted not to, because of the use case of letting people "tag" things arbitrarily for post-processing. (https://github.com/terrastruct/d2/issues/566). Basically any class defined gets added as a "class" in the resulting SVG, so if they then want to apply CSS or javascript to it after, they can. good consideration though, thank you

alixander avatar Apr 10 '23 00:04 alixander

@alixander ok, but i want a chance to know.

ex: c:>d2 fmt foobar.d2

info: GLAY undefined

bo-ku-ra avatar Apr 10 '23 00:04 bo-ku-ra

okay i'll leave this open for consideration in case anyone else +1s it

alixander avatar Apr 10 '23 00:04 alixander

Leaving it as information in the log sounds good

mauroexe avatar Apr 02 '24 00:04 mauroexe