Skip to content

Arrow font-color not overriden when defined twice #2485

@Vahor

Description

@Vahor

I have a special use case where I import themes files (different collections of images). Imagine a light.d2 and a dark.d2 file.
When I want to generate a image in dark theme. I import both light and dark. dark.d2 will override the light properties if needed, some configuration stays the same.

Which result in something like this:

Image
First style block comes from light.d2 and second style block from dark.d2.

Here I expect the "Arrow" text to be blue as it's defined last ; as it seems that the arrow color is correctly overridden.

I haven't checked every properties.

Reproduction:
https://play.d2lang.com/?script=0tBS0LVT0NLSjNaKtVKo5lJQKC6pzEmFMEGcovzsVCsFpaLUFCWwSFp-Xolucn5OfhFCtJarlotYg5JySlOxmAQTBhmVaKXgVpSfy5VkpRCSz5UIMjfJSsGxqCi_nAsQAAD__w%3D%3D&layout=elk&
code in details block

Details

(* -> **)[*]: {
  style: {
    stroke: "red"
    font-color: "red"
  }
}

(* -> **)[*]: {
  style: {
    stroke: "blue"
    font-color: "blue"
  }
}

a: From
b: To
a -> b: Arrow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions