|
28 | 28 | --mermaid-node-extra-padding-y: 0; |
29 | 29 |
|
30 | 30 | /* Extra padding to apply to the SVG viewBox (in px) to avoid edge clipping */ |
31 | | - --mermaid-svg-extra-padding-x: 6; |
32 | | - --mermaid-svg-extra-padding-y: 4; |
| 31 | + --mermaid-svg-extra-padding-x: 20; |
| 32 | + --mermaid-svg-extra-padding-y: 16; |
33 | 33 |
|
34 | 34 | /* Edge label sizing controls */ |
35 | 35 | --mermaid-edge-label-padding-x: 4; |
|
47 | 47 | line-height: 1.3; |
48 | 48 | position: relative; |
49 | 49 |
|
50 | | - /* Scroll hint (fade) */ |
51 | | - mask-image: linear-gradient( |
52 | | - to right, |
53 | | - transparent 0, |
54 | | - #000 24px, |
55 | | - #000 calc(100% - 24px), |
56 | | - transparent 100% |
57 | | - ); |
| 50 | + /* Scroll hint (fade) - removed to prevent edge clipping */ |
| 51 | + /* Use overflow-x: auto for horizontal scrolling instead */ |
58 | 52 | } |
59 | 53 |
|
60 | 54 | /* Optional utility variants to quickly tweak padding per-diagram */ |
|
77 | 71 | .mermaid-diagram.is-airy { |
78 | 72 | --mermaid-node-base-padding-x: 24; |
79 | 73 | --mermaid-node-base-padding-y: 16; |
| 74 | + --mermaid-svg-extra-padding-x: 32; |
| 75 | + --mermaid-svg-extra-padding-y: 24; |
| 76 | + padding: nhs.$nhs-fdp-spacing-5; // Extra container padding |
80 | 77 | } |
81 | 78 |
|
82 | 79 | .mermaid-error { |
|
255 | 252 | } |
256 | 253 | } |
257 | 254 |
|
| 255 | + /* Lifecycle diagram specific styles */ |
| 256 | + .node.lifecycle-start { |
| 257 | + rect, polygon, circle, ellipse { |
| 258 | + fill: #e1f5fe !important; /* Light blue */ |
| 259 | + stroke: #01579b !important; |
| 260 | + } |
| 261 | + text { fill: #01579b !important; } |
| 262 | + |
| 263 | + .nodeLabel { |
| 264 | + color: #01579b !important; |
| 265 | + } |
| 266 | + } |
| 267 | + |
| 268 | + .node.lifecycle-ready { |
| 269 | + rect, polygon, circle, ellipse { |
| 270 | + fill: #c8e6c9 !important; /* Light green */ |
| 271 | + stroke: #1b5e20 !important; |
| 272 | + } |
| 273 | + text { fill: #1b5e20 !important; } |
| 274 | + |
| 275 | + .nodeLabel { |
| 276 | + color: #1b5e20 !important; |
| 277 | + } |
| 278 | + } |
| 279 | + |
| 280 | + .node.lifecycle-error { |
| 281 | + |
| 282 | + rect, polygon, circle, ellipse { |
| 283 | + fill: #ffcdd2 !important; /* Light red */ |
| 284 | + stroke: #b71c1c !important; |
| 285 | + } |
| 286 | + text { fill: #b71c1c !important; } |
| 287 | + |
| 288 | + .nodeLabel { |
| 289 | + color: #b71c1c !important; |
| 290 | + } |
| 291 | + } |
| 292 | + |
| 293 | + .node.lifecycle-phase { |
| 294 | + rect, polygon, circle, ellipse { |
| 295 | + fill: #fff9c4 !important; /* Yellow */ |
| 296 | + stroke: #f57f17 !important; |
| 297 | + } |
| 298 | + text { fill: #f57f17 !important; } |
| 299 | + |
| 300 | + .nodeLabel { |
| 301 | + color: #f57f17 !important; |
| 302 | + } |
| 303 | + } |
| 304 | + |
| 305 | + .node.lifecycle-user-action { |
| 306 | + rect, polygon, circle, ellipse { |
| 307 | + fill: #f8bbd0 !important; /* Pink */ |
| 308 | + stroke: #880e4f !important; |
| 309 | + } |
| 310 | + text { fill: #880e4f !important; } |
| 311 | + |
| 312 | + .nodeLabel { |
| 313 | + color: #880e4f !important; |
| 314 | + } |
| 315 | + } |
| 316 | + |
| 317 | + .node.lifecycle-complete { |
| 318 | + rect, polygon, circle, ellipse { |
| 319 | + fill: #d1c4e9 !important; /* Light purple */ |
| 320 | + stroke: #4a148c !important; |
| 321 | + } |
| 322 | + text { fill: #4a148c !important; } |
| 323 | + |
| 324 | + .nodeLabel { |
| 325 | + color: #4a148c !important; |
| 326 | + } |
| 327 | + } |
| 328 | + |
| 329 | + .node.lifecycle-announce { |
| 330 | + rect, polygon, circle, ellipse { |
| 331 | + fill: #b2dfdb !important; /* Light teal */ |
| 332 | + stroke: #004d40 !important; |
| 333 | + } |
| 334 | + text { fill: #004d40 !important; } |
| 335 | + |
| 336 | + .nodeLabel { |
| 337 | + color: #004d40 !important; |
| 338 | + } |
| 339 | + } |
| 340 | + |
| 341 | + .node.initPhase { |
| 342 | + rect, polygon, circle, ellipse { |
| 343 | + fill: #fff3e0 !important; /* Light orange */ |
| 344 | + stroke: #ff6f00 !important; |
| 345 | + stroke-width: 2px !important; |
| 346 | + } |
| 347 | + text { fill: #e65100 !important; } |
| 348 | + |
| 349 | + .nodeLabel { |
| 350 | + color: #e65100 !important; |
| 351 | + } |
| 352 | + } |
| 353 | + |
| 354 | + .node.sortPhase { |
| 355 | + rect, polygon, circle, ellipse { |
| 356 | + fill: #e8eaf6 !important; /* Light indigo */ |
| 357 | + stroke: #3f51b5 !important; |
| 358 | + stroke-width: 2px !important; |
| 359 | + } |
| 360 | + text { fill: #1a237e !important; } |
| 361 | + |
| 362 | + .nodeLabel { |
| 363 | + color: #1a237e !important; |
| 364 | + } |
| 365 | + } |
| 366 | + |
| 367 | + .node.domPhase { |
| 368 | + rect, polygon, circle, ellipse { |
| 369 | + fill: #e0f2f1 !important; /* Light teal */ |
| 370 | + stroke: #009688 !important; |
| 371 | + stroke-width: 2px !important; |
| 372 | + } |
| 373 | + text { fill: #004d40 !important; } |
| 374 | + |
| 375 | + .nodeLabel { |
| 376 | + color: #004d40 !important; |
| 377 | + } |
| 378 | + } |
| 379 | + |
258 | 380 | /* Edges */ |
259 | 381 | .edgePath { |
260 | 382 | path.path { |
261 | 383 | stroke: var(--_mm-border) !important; |
262 | 384 | stroke-width: 1.2px !important; |
263 | 385 | } |
264 | 386 | } |
| 387 | + |
| 388 | + /* Markers (arrowheads) - ensure they render on top and are visible */ |
| 389 | + marker { |
| 390 | + overflow: visible !important; |
| 391 | + |
| 392 | + path { |
| 393 | + fill: var(--_mm-border) !important; |
| 394 | + stroke: var(--_mm-border) !important; |
| 395 | + } |
| 396 | + } |
| 397 | + |
| 398 | + /* Ensure markers render above nodes by adjusting SVG rendering order */ |
| 399 | + defs { |
| 400 | + marker { |
| 401 | + /* Markers are defined in defs, ensure they're styled */ |
| 402 | + path { |
| 403 | + fill: var(--_mm-border) !important; |
| 404 | + stroke: none !important; |
| 405 | + } |
| 406 | + } |
| 407 | + } |
| 408 | + |
265 | 409 | .edgeLabel { |
266 | 410 | background-color: nhs.$nhs-fdp-color-primary-white !important; /* optional background */ |
267 | 411 | overflow: visible !important; /* allow expansion */ |
|
0 commit comments