noatpad / typora-theme-ursine

A Typora theme, inspired by Bear
MIT License
715 stars 86 forks source link

It seems that Ursine couldn't handle the flowchart of the mermaid. #40

Closed Konfido closed 4 years ago

Konfido commented 4 years ago

Here is my test codes:

```mermaid
graph LR
%% LR: left2right, TD/TB: top2down, RL/BT
    subgraph 2
    a == d ==> c
    c --> d((Decision))
    end
    subgraph 1
    A[Hard edge] -->re(Round edge)
    A -.-a
    re -.->C{circle}
    C --- X[X]
    C -->|Two| B[B]
    C -.Three .-> D[C]
    end
    style a fill:#f9f,stroke:#333,stroke-width:4px
    style C fill:#ccf,stroke:#f66,stroke-width:2px,stroke-dasharray: 5, 5
```

Problems found:

Please help to solve this problem.

noatpad commented 4 years ago

Mm yeah, mermaid diagrams are a bit finicky for now, so they'll slowly get a bit of refinement overtime. I'll get working on fixing these ones when I can

noatpad commented 4 years ago

After playing around with it for a while, I think this is the best I can do. Found a way to style the arrows more accurately too.

image image

As for the text color for "a" & "circle" in Umbra, I noticed you styled them with custom fill colors in the diagram code. Since the theme has to accommodate for both black and white text colors, it might be a bit tricky using a set node fill color if you switch between themes. Not sure if the default node colors have any significance, but hopefully it looks alright now

Konfido commented 4 years ago

Great job! 👍Thank you for your effort on this tricky problem.

noatpad commented 4 years ago

Sorry for the long delay for that release, but the fix for this (and a few others) should be ready to download in the releases tab!