@@ -112,8 +112,8 @@ span .nhsuk-u-visually-hidden {
112112 --mermaid-node-extra-padding-x : 0 ;
113113 --mermaid-node-extra-padding-y : 0 ;
114114 /* Extra padding to apply to the SVG viewBox (in px) to avoid edge clipping */
115- --mermaid-svg-extra-padding-x : 6 ;
116- --mermaid-svg-extra-padding-y : 4 ;
115+ --mermaid-svg-extra-padding-x : 20 ;
116+ --mermaid-svg-extra-padding-y : 16 ;
117117 /* Edge label sizing controls */
118118 --mermaid-edge-label-padding-x : 4 ;
119119 --mermaid-edge-label-padding-y : 2 ;
@@ -126,8 +126,8 @@ span .nhsuk-u-visually-hidden {
126126 font-family : Frutiger W01, Arial, sans-serif;
127127 line-height : 1.3 ;
128128 position : relative;
129- /* Scroll hint (fade) */
130- mask-image : linear-gradient (to right , transparent 0 , # 000 24 px , # 000 calc ( 100 % - 24 px ) , transparent 100 % );
129+ /* Scroll hint (fade) - removed to prevent edge clipping */
130+ /* Use overflow-x: auto for horizontal scrolling instead */
131131}
132132
133133/* Optional utility variants to quickly tweak padding per-diagram */
@@ -150,6 +150,9 @@ span .nhsuk-u-visually-hidden {
150150.mermaid-diagram .is-airy {
151151 --mermaid-node-base-padding-x : 24 ;
152152 --mermaid-node-base-padding-y : 16 ;
153+ --mermaid-svg-extra-padding-x : 32 ;
154+ --mermaid-svg-extra-padding-y : 24 ;
155+ padding : 32px ;
153156}
154157
155158.mermaid-error {
@@ -175,7 +178,10 @@ span .nhsuk-u-visually-hidden {
175178 width : 100% ;
176179 height : auto;
177180 /* Token-driven class styles (no need for Mermaid classDef colours) */
181+ /* Lifecycle diagram specific styles */
178182 /* Edges */
183+ /* Markers (arrowheads) - ensure they render on top and are visible */
184+ /* Ensure markers render above nodes by adjusting SVG rendering order */
179185}
180186.mermaid-diagram svg .node {
181187 /* Base shapes (specificity via svg .node + !important) */
@@ -292,10 +298,127 @@ span .nhsuk-u-visually-hidden {
292298.mermaid-diagram svg .node .warning .nodeLabel {
293299 color : # b71c1c !important ;
294300}
301+ .mermaid-diagram svg .node .lifecycle-start rect , .mermaid-diagram svg .node .lifecycle-start polygon , .mermaid-diagram svg .node .lifecycle-start circle , .mermaid-diagram svg .node .lifecycle-start ellipse {
302+ fill : # e1f5fe !important ; /* Light blue */
303+ stroke : # 01579b !important ;
304+ }
305+ .mermaid-diagram svg .node .lifecycle-start text {
306+ fill : # 01579b !important ;
307+ }
308+ .mermaid-diagram svg .node .lifecycle-start .nodeLabel {
309+ color : # 01579b !important ;
310+ }
311+ .mermaid-diagram svg .node .lifecycle-ready rect , .mermaid-diagram svg .node .lifecycle-ready polygon , .mermaid-diagram svg .node .lifecycle-ready circle , .mermaid-diagram svg .node .lifecycle-ready ellipse {
312+ fill : # c8e6c9 !important ; /* Light green */
313+ stroke : # 1b5e20 !important ;
314+ }
315+ .mermaid-diagram svg .node .lifecycle-ready text {
316+ fill : # 1b5e20 !important ;
317+ }
318+ .mermaid-diagram svg .node .lifecycle-ready .nodeLabel {
319+ color : # 1b5e20 !important ;
320+ }
321+ .mermaid-diagram svg .node .lifecycle-error rect , .mermaid-diagram svg .node .lifecycle-error polygon , .mermaid-diagram svg .node .lifecycle-error circle , .mermaid-diagram svg .node .lifecycle-error ellipse {
322+ fill : # ffcdd2 !important ; /* Light red */
323+ stroke : # b71c1c !important ;
324+ }
325+ .mermaid-diagram svg .node .lifecycle-error text {
326+ fill : # b71c1c !important ;
327+ }
328+ .mermaid-diagram svg .node .lifecycle-error .nodeLabel {
329+ color : # b71c1c !important ;
330+ }
331+ .mermaid-diagram svg .node .lifecycle-phase rect , .mermaid-diagram svg .node .lifecycle-phase polygon , .mermaid-diagram svg .node .lifecycle-phase circle , .mermaid-diagram svg .node .lifecycle-phase ellipse {
332+ fill : # fff9c4 !important ; /* Yellow */
333+ stroke : # f57f17 !important ;
334+ }
335+ .mermaid-diagram svg .node .lifecycle-phase text {
336+ fill : # f57f17 !important ;
337+ }
338+ .mermaid-diagram svg .node .lifecycle-phase .nodeLabel {
339+ color : # f57f17 !important ;
340+ }
341+ .mermaid-diagram svg .node .lifecycle-user-action rect , .mermaid-diagram svg .node .lifecycle-user-action polygon , .mermaid-diagram svg .node .lifecycle-user-action circle , .mermaid-diagram svg .node .lifecycle-user-action ellipse {
342+ fill : # f8bbd0 !important ; /* Pink */
343+ stroke : # 880e4f !important ;
344+ }
345+ .mermaid-diagram svg .node .lifecycle-user-action text {
346+ fill : # 880e4f !important ;
347+ }
348+ .mermaid-diagram svg .node .lifecycle-user-action .nodeLabel {
349+ color : # 880e4f !important ;
350+ }
351+ .mermaid-diagram svg .node .lifecycle-complete rect , .mermaid-diagram svg .node .lifecycle-complete polygon , .mermaid-diagram svg .node .lifecycle-complete circle , .mermaid-diagram svg .node .lifecycle-complete ellipse {
352+ fill : # d1c4e9 !important ; /* Light purple */
353+ stroke : # 4a148c !important ;
354+ }
355+ .mermaid-diagram svg .node .lifecycle-complete text {
356+ fill : # 4a148c !important ;
357+ }
358+ .mermaid-diagram svg .node .lifecycle-complete .nodeLabel {
359+ color : # 4a148c !important ;
360+ }
361+ .mermaid-diagram svg .node .lifecycle-announce rect , .mermaid-diagram svg .node .lifecycle-announce polygon , .mermaid-diagram svg .node .lifecycle-announce circle , .mermaid-diagram svg .node .lifecycle-announce ellipse {
362+ fill : # b2dfdb !important ; /* Light teal */
363+ stroke : # 004d40 !important ;
364+ }
365+ .mermaid-diagram svg .node .lifecycle-announce text {
366+ fill : # 004d40 !important ;
367+ }
368+ .mermaid-diagram svg .node .lifecycle-announce .nodeLabel {
369+ color : # 004d40 !important ;
370+ }
371+ .mermaid-diagram svg .node .initPhase rect , .mermaid-diagram svg .node .initPhase polygon , .mermaid-diagram svg .node .initPhase circle , .mermaid-diagram svg .node .initPhase ellipse {
372+ fill : # fff3e0 !important ; /* Light orange */
373+ stroke : # ff6f00 !important ;
374+ stroke-width : 2px !important ;
375+ }
376+ .mermaid-diagram svg .node .initPhase text {
377+ fill : # e65100 !important ;
378+ }
379+ .mermaid-diagram svg .node .initPhase .nodeLabel {
380+ color : # e65100 !important ;
381+ }
382+ .mermaid-diagram svg .node .sortPhase rect , .mermaid-diagram svg .node .sortPhase polygon , .mermaid-diagram svg .node .sortPhase circle , .mermaid-diagram svg .node .sortPhase ellipse {
383+ fill : # e8eaf6 !important ; /* Light indigo */
384+ stroke : # 3f51b5 !important ;
385+ stroke-width : 2px !important ;
386+ }
387+ .mermaid-diagram svg .node .sortPhase text {
388+ fill : # 1a237e !important ;
389+ }
390+ .mermaid-diagram svg .node .sortPhase .nodeLabel {
391+ color : # 1a237e !important ;
392+ }
393+ .mermaid-diagram svg .node .domPhase rect , .mermaid-diagram svg .node .domPhase polygon , .mermaid-diagram svg .node .domPhase circle , .mermaid-diagram svg .node .domPhase ellipse {
394+ fill : # e0f2f1 !important ; /* Light teal */
395+ stroke : # 009688 !important ;
396+ stroke-width : 2px !important ;
397+ }
398+ .mermaid-diagram svg .node .domPhase text {
399+ fill : # 004d40 !important ;
400+ }
401+ .mermaid-diagram svg .node .domPhase .nodeLabel {
402+ color : # 004d40 !important ;
403+ }
295404.mermaid-diagram svg .edgePath path .path {
296405 stroke : var (--_mm-border ) !important ;
297406 stroke-width : 1.2px !important ;
298407}
408+ .mermaid-diagram svg marker {
409+ overflow : visible !important ;
410+ }
411+ .mermaid-diagram svg marker path {
412+ fill : var (--_mm-border ) !important ;
413+ stroke : var (--_mm-border ) !important ;
414+ }
415+ .mermaid-diagram svg defs marker {
416+ /* Markers are defined in defs, ensure they're styled */
417+ }
418+ .mermaid-diagram svg defs marker path {
419+ fill : var (--_mm-border ) !important ;
420+ stroke : none !important ;
421+ }
299422.mermaid-diagram svg .edgeLabel {
300423 background-color : # ffffff !important ; /* optional background */
301424 overflow : visible !important ; /* allow expansion */
0 commit comments