Skip to content

Commit cbebf12

Browse files
committed
Fix for issue #128 - flowchart - styling of edges via css overrides specific styles set in the graph definition
1 parent 3fedc12 commit cbebf12

File tree

11 files changed

+58
-52
lines changed

11 files changed

+58
-52
lines changed

dist/mermaid.css

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
stroke-width: 1px;
1313
}
1414
.edgePath .path {
15-
stroke: #333333 !important;
15+
stroke: #333333;
1616
}
1717
.cluster rect {
1818
fill: #ffffde;
@@ -28,11 +28,11 @@
2828
fill: #ececff;
2929
}
3030
text.actor {
31-
fill: #000000;
31+
fill: black;
3232
stroke: none;
3333
}
3434
.actor-line {
35-
stroke: #808080;
35+
stroke: grey;
3636
}
3737
.messageLine0 {
3838
stroke-width: 1.5;
@@ -61,11 +61,11 @@ text.actor {
6161
fill: #ececff;
6262
}
6363
.labelText {
64-
fill: #000000;
64+
fill: black;
6565
stroke: none;
6666
}
6767
.loopText {
68-
fill: #000000;
68+
fill: black;
6969
stroke: none;
7070
}
7171
.loopLine {
@@ -97,7 +97,7 @@ text.actor {
9797
}
9898
.section1,
9999
.section3 {
100-
fill: #ffffff;
100+
fill: white;
101101
opacity: 0.2;
102102
}
103103
.sectionTitle0 {
@@ -119,7 +119,7 @@ text.actor {
119119
}
120120
/* Grid and axis */
121121
.grid .tick {
122-
stroke: #d3d3d3;
122+
stroke: lightgrey;
123123
opacity: 0.3;
124124
shape-rendering: crispEdges;
125125
}
@@ -129,7 +129,7 @@ text.actor {
129129
/* Today line */
130130
.today {
131131
fill: none;
132-
stroke: #ff0000;
132+
stroke: red;
133133
stroke-width: 2px;
134134
}
135135
/* Task styling */
@@ -142,12 +142,12 @@ text.actor {
142142
font-size: 11px;
143143
}
144144
.taskTextOutsideRight {
145-
fill: #000000;
145+
fill: black;
146146
text-anchor: start;
147147
font-size: 11px;
148148
}
149149
.taskTextOutsideLeft {
150-
fill: #000000;
150+
fill: black;
151151
text-anchor: end;
152152
font-size: 11px;
153153
}
@@ -156,7 +156,7 @@ text.actor {
156156
.taskText1,
157157
.taskText2,
158158
.taskText3 {
159-
fill: #ffffff;
159+
fill: white;
160160
}
161161
.task0,
162162
.task1,
@@ -167,11 +167,11 @@ text.actor {
167167
}
168168
.taskTextOutside0,
169169
.taskTextOutside2 {
170-
fill: #000000;
170+
fill: black;
171171
}
172172
.taskTextOutside1,
173173
.taskTextOutside3 {
174-
fill: #000000;
174+
fill: black;
175175
}
176176
/* Active task */
177177
.active0,
@@ -185,30 +185,30 @@ text.actor {
185185
.activeText1,
186186
.activeText2,
187187
.activeText3 {
188-
fill: #000000 !important;
188+
fill: black !important;
189189
}
190190
/* Completed task */
191191
.done0,
192192
.done1,
193193
.done2,
194194
.done3 {
195-
stroke: #808080;
196-
fill: #d3d3d3;
195+
stroke: grey;
196+
fill: lightgrey;
197197
stroke-width: 2;
198198
}
199199
.doneText0,
200200
.doneText1,
201201
.doneText2,
202202
.doneText3 {
203-
fill: #000000 !important;
203+
fill: black !important;
204204
}
205205
/* Tasks on the critical line */
206206
.crit0,
207207
.crit1,
208208
.crit2,
209209
.crit3 {
210210
stroke: #ff8888;
211-
fill: #ff0000;
211+
fill: red;
212212
stroke-width: 2;
213213
}
214214
.activeCrit0,
@@ -224,7 +224,7 @@ text.actor {
224224
.doneCrit2,
225225
.doneCrit3 {
226226
stroke: #ff8888;
227-
fill: #d3d3d3;
227+
fill: lightgrey;
228228
stroke-width: 2;
229229
cursor: pointer;
230230
shape-rendering: crispEdges;
@@ -233,18 +233,18 @@ text.actor {
233233
.doneCritText1,
234234
.doneCritText2,
235235
.doneCritText3 {
236-
fill: #000000 !important;
236+
fill: black !important;
237237
}
238238
.activeCritText0,
239239
.activeCritText1,
240240
.activeCritText2,
241241
.activeCritText3 {
242-
fill: #000000 !important;
242+
fill: black !important;
243243
}
244244
.titleText {
245245
text-anchor: middle;
246246
font-size: 18px;
247-
fill: #000000;
247+
fill: black;
248248
}
249249
/*
250250

dist/mermaid.forest.css

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
stroke-width: 1px;
1313
}
1414
.edgePath .path {
15-
stroke: #1a3318 !important;
15+
stroke: green;
16+
stroke-width: 1.5px;
1617
}
1718
.cluster rect {
1819
fill: #cdffb2;
@@ -28,11 +29,11 @@
2829
fill: #cde498;
2930
}
3031
text.actor {
31-
fill: #000000;
32+
fill: black;
3233
stroke: none;
3334
}
3435
.actor-line {
35-
stroke: #808080;
36+
stroke: grey;
3637
}
3738
.messageLine0 {
3839
stroke-width: 1.5;
@@ -61,11 +62,11 @@ text.actor {
6162
fill: #cde498;
6263
}
6364
.labelText {
64-
fill: #000000;
65+
fill: black;
6566
stroke: none;
6667
}
6768
.loopText {
68-
fill: #000000;
69+
fill: black;
6970
stroke: none;
7071
}
7172
.loopLine {
@@ -97,7 +98,7 @@ text.actor {
9798
}
9899
.section1,
99100
.section3 {
100-
fill: #ffffff;
101+
fill: white;
101102
opacity: 0.2;
102103
}
103104
.sectionTitle0 {
@@ -119,7 +120,7 @@ text.actor {
119120
}
120121
/* Grid and axis */
121122
.grid .tick {
122-
stroke: #d3d3d3;
123+
stroke: lightgrey;
123124
opacity: 0.3;
124125
shape-rendering: crispEdges;
125126
}
@@ -129,7 +130,7 @@ text.actor {
129130
/* Today line */
130131
.today {
131132
fill: none;
132-
stroke: #ff0000;
133+
stroke: red;
133134
stroke-width: 2px;
134135
}
135136
/* Task styling */
@@ -142,12 +143,12 @@ text.actor {
142143
font-size: 11px;
143144
}
144145
.taskTextOutsideRight {
145-
fill: #000000;
146+
fill: black;
146147
text-anchor: start;
147148
font-size: 11px;
148149
}
149150
.taskTextOutsideLeft {
150-
fill: #000000;
151+
fill: black;
151152
text-anchor: end;
152153
font-size: 11px;
153154
}
@@ -156,7 +157,7 @@ text.actor {
156157
.taskText1,
157158
.taskText2,
158159
.taskText3 {
159-
fill: #ffffff;
160+
fill: white;
160161
}
161162
.task0,
162163
.task1,
@@ -167,11 +168,11 @@ text.actor {
167168
}
168169
.taskTextOutside0,
169170
.taskTextOutside2 {
170-
fill: #000000;
171+
fill: black;
171172
}
172173
.taskTextOutside1,
173174
.taskTextOutside3 {
174-
fill: #000000;
175+
fill: black;
175176
}
176177
/* Active task */
177178
.active0,
@@ -185,30 +186,30 @@ text.actor {
185186
.activeText1,
186187
.activeText2,
187188
.activeText3 {
188-
fill: #000000 !important;
189+
fill: black !important;
189190
}
190191
/* Completed task */
191192
.done0,
192193
.done1,
193194
.done2,
194195
.done3 {
195-
stroke: #808080;
196-
fill: #d3d3d3;
196+
stroke: grey;
197+
fill: lightgrey;
197198
stroke-width: 2;
198199
}
199200
.doneText0,
200201
.doneText1,
201202
.doneText2,
202203
.doneText3 {
203-
fill: #000000 !important;
204+
fill: black !important;
204205
}
205206
/* Tasks on the critical line */
206207
.crit0,
207208
.crit1,
208209
.crit2,
209210
.crit3 {
210211
stroke: #ff8888;
211-
fill: #ff0000;
212+
fill: red;
212213
stroke-width: 2;
213214
}
214215
.activeCrit0,
@@ -224,7 +225,7 @@ text.actor {
224225
.doneCrit2,
225226
.doneCrit3 {
226227
stroke: #ff8888;
227-
fill: #d3d3d3;
228+
fill: lightgrey;
228229
stroke-width: 2;
229230
cursor: pointer;
230231
shape-rendering: crispEdges;
@@ -233,18 +234,18 @@ text.actor {
233234
.doneCritText1,
234235
.doneCritText2,
235236
.doneCritText3 {
236-
fill: #000000 !important;
237+
fill: black !important;
237238
}
238239
.activeCritText0,
239240
.activeCritText1,
240241
.activeCritText2,
241242
.activeCritText3 {
242-
fill: #000000 !important;
243+
fill: black !important;
243244
}
244245
.titleText {
245246
text-anchor: middle;
246247
font-size: 18px;
247-
fill: #000000;
248+
fill: black;
248249
}
249250
/*
250251

dist/mermaid.full.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25734,6 +25734,7 @@ exports.addEdges = function (edges, g) {
2573425734
var defaultStyle;
2573525735
if(typeof edges.defaultStyle !== 'undefined'){
2573625736
defaultStyle = edges.defaultStyle.toString().replace(/,/g , ';');
25737+
2573725738
}
2573825739

2573925740
edges.forEach(function (edge) {
@@ -25758,7 +25759,7 @@ exports.addEdges = function (edges, g) {
2575825759
else{
2575925760
switch(edge.stroke){
2576025761
case 'normal':
25761-
style = 'stroke: #333; stroke-width: 1.5px;fill:none';
25762+
style = 'fill:none';
2576225763
if(typeof defaultStyle !== 'undefined'){
2576325764
style = defaultStyle;
2576425765
}

dist/mermaid.full.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mermaid.slim.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25702,6 +25702,7 @@ exports.addEdges = function (edges, g) {
2570225702
var defaultStyle;
2570325703
if(typeof edges.defaultStyle !== 'undefined'){
2570425704
defaultStyle = edges.defaultStyle.toString().replace(/,/g , ';');
25705+
2570525706
}
2570625707

2570725708
edges.forEach(function (edge) {
@@ -25726,7 +25727,7 @@ exports.addEdges = function (edges, g) {
2572625727
else{
2572725728
switch(edge.stroke){
2572825729
case 'normal':
25729-
style = 'stroke: #333; stroke-width: 1.5px;fill:none';
25730+
style = 'fill:none';
2573025731
if(typeof defaultStyle !== 'undefined'){
2573125732
style = defaultStyle;
2573225733
}

dist/mermaid.slim.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/diagrams/flowchart/flowRenderer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ exports.addEdges = function (edges, g) {
112112
var defaultStyle;
113113
if(typeof edges.defaultStyle !== 'undefined'){
114114
defaultStyle = edges.defaultStyle.toString().replace(/,/g , ';');
115+
115116
}
116117

117118
edges.forEach(function (edge) {
@@ -136,7 +137,7 @@ exports.addEdges = function (edges, g) {
136137
else{
137138
switch(edge.stroke){
138139
case 'normal':
139-
style = 'stroke: #333; stroke-width: 1.5px;fill:none';
140+
style = 'fill:none';
140141
if(typeof defaultStyle !== 'undefined'){
141142
style = defaultStyle;
142143
}

src/less/default/flow.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88

99
.edgePath .path {
10-
stroke: @lineColor !important;
10+
stroke: @lineColor;
1111

1212
}
1313
.cluster rect{

0 commit comments

Comments
 (0)