Commit 981fbb8
fix(gantt): restore readable outside-text for done tasks in dark mode (#7456)
* fix(gantt): restore readable outside-text color for done tasks in dark mode
When a Gantt done-task label is too wide to fit inside the bar, the renderer
places the text outside (next to the bar) with class `taskTextOutsideLeft` or
`taskTextOutsideRight` plus `doneText{N}`. The `.doneText{N}` rule uses
`taskTextDarkColor !important`, which PR #7432 changed to a dark color
(inverted from lightgrey) for contrast inside the bar. That `!important` also
overrides the lighter `taskTextOutsideColor` that `.taskTextOutside{N}` sets,
making outside-label text black/dark on the dark diagram background.
Fix: add combined-class selectors (`.doneText{N}.taskTextOutsideLeft/Right`)
after the `.doneText{N}` block, using `taskTextOutsideColor !important`. The
combined selectors have higher specificity and appear later in the cascade, so
they win over the single-class rule. Same fix applied to `.doneCritText{N}`.
Fixes regression from PR #7432 (fix for #5979).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test(gantt): add e2e snapshot for done-task outside-text in dark mode
Covers the regression from #7433 where done-task labels displayed outside
the bar (text too wide for the bar width) rendered in unreadable dark color
in dark theme.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test(gantt): add separate inside/outside e2e snapshots for dark mode done tasks
Split the dark mode done-task coverage into two explicit tests:
- inside-text: label fits within the bar (long bar, short label)
- outside-text: label overflows the bar (short bar, long label) — regression case for #7433
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: knsv-bot <knsv-bot@macos.shared>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 0d5e35a commit 981fbb8
File tree
3 files changed
+64
-0
lines changed- .changeset
- cypress/integration/rendering
- packages/mermaid/src/diagrams/gantt
3 files changed
+64
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
884 | 884 | | |
885 | 885 | | |
886 | 886 | | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
887 | 921 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
194 | 207 | | |
195 | 208 | | |
196 | 209 | | |
| |||
237 | 250 | | |
238 | 251 | | |
239 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
240 | 265 | | |
241 | 266 | | |
242 | 267 | | |
| |||
0 commit comments