Alexander Wang

Results 443 comments of Alexander Wang

@nhooyr i don't think so. they're different things. y.d2 ```d2 a -> b: hi (a -> b)[0].style.opacity: 0.1 ``` x.d2 ```d2 a -> b: hello ...@import y // vs ///...

@nhooyr In my example, if you "import y", it imports an opacity 0.1 connection. if you "includes y", it imports a connection but makes the existing connection 0.1 opacity. So...

maybe `@includes` can also take in non-d2 files! e.g. someone wants to embed a code snippet or markdown that's in its own file. although we don't have syntax to specify...

and stroke styles, e.g. dash-gap

nvm, vars has to be reimplemented. Consider this: ```d2 vars: { x: { label: var-set } } a: ${x} a.label: self-set b.label: self-set b: ${x} ``` You just can't know...

`vars` should actually be flexible enough to do this. but needs some compiler work to make it work. good suggestion, thank you

@bo-ku-ra sorry the description was unclear, i meant that'd be a use case for this feature

implementation note: I think the only way is to reimplement classes into the IR. Since globs are at the IR level, the IR produced will show `a` and `b` having...

> I think whichever comes later in the d2 file should take priority, in case you want to use a glob to set classes or override a value in a...

Mechanisms have different priorities over each other, and ordering matters within those same priorities. If I have a shape with `style.fill` set, I don't think setting a class on it...