d2
d2 copied to clipboard
the class is undefined.
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 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 ok, but i want a chance to know.
ex: c:>d2 fmt foobar.d2
info: GLAY undefined
okay i'll leave this open for consideration in case anyone else +1s it
Leaving it as information in the log sounds good