Skip to content

Commit

Permalink
Fix for issue #128 - flowchart - styling of edges via css overrides s…
Browse files Browse the repository at this point in the history
…pecific styles set in the graph definition
  • Loading branch information
knsv committed Mar 7, 2015
1 parent 3fedc12 commit cbebf12
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 52 deletions.
44 changes: 22 additions & 22 deletions dist/mermaid.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
stroke-width: 1px;
}
.edgePath .path {
stroke: #333333 !important;
stroke: #333333;
}
.cluster rect {
fill: #ffffde;
Expand All @@ -28,11 +28,11 @@
fill: #ececff;
}
text.actor {
fill: #000000;
fill: black;
stroke: none;
}
.actor-line {
stroke: #808080;
stroke: grey;
}
.messageLine0 {
stroke-width: 1.5;
Expand Down Expand Up @@ -61,11 +61,11 @@ text.actor {
fill: #ececff;
}
.labelText {
fill: #000000;
fill: black;
stroke: none;
}
.loopText {
fill: #000000;
fill: black;
stroke: none;
}
.loopLine {
Expand Down Expand Up @@ -97,7 +97,7 @@ text.actor {
}
.section1,
.section3 {
fill: #ffffff;
fill: white;
opacity: 0.2;
}
.sectionTitle0 {
Expand All @@ -119,7 +119,7 @@ text.actor {
}
/* Grid and axis */
.grid .tick {
stroke: #d3d3d3;
stroke: lightgrey;
opacity: 0.3;
shape-rendering: crispEdges;
}
Expand All @@ -129,7 +129,7 @@ text.actor {
/* Today line */
.today {
fill: none;
stroke: #ff0000;
stroke: red;
stroke-width: 2px;
}
/* Task styling */
Expand All @@ -142,12 +142,12 @@ text.actor {
font-size: 11px;
}
.taskTextOutsideRight {
fill: #000000;
fill: black;
text-anchor: start;
font-size: 11px;
}
.taskTextOutsideLeft {
fill: #000000;
fill: black;
text-anchor: end;
font-size: 11px;
}
Expand All @@ -156,7 +156,7 @@ text.actor {
.taskText1,
.taskText2,
.taskText3 {
fill: #ffffff;
fill: white;
}
.task0,
.task1,
Expand All @@ -167,11 +167,11 @@ text.actor {
}
.taskTextOutside0,
.taskTextOutside2 {
fill: #000000;
fill: black;
}
.taskTextOutside1,
.taskTextOutside3 {
fill: #000000;
fill: black;
}
/* Active task */
.active0,
Expand All @@ -185,30 +185,30 @@ text.actor {
.activeText1,
.activeText2,
.activeText3 {
fill: #000000 !important;
fill: black !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: #808080;
fill: #d3d3d3;
stroke: grey;
fill: lightgrey;
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: #000000 !important;
fill: black !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: #ff8888;
fill: #ff0000;
fill: red;
stroke-width: 2;
}
.activeCrit0,
Expand All @@ -224,7 +224,7 @@ text.actor {
.doneCrit2,
.doneCrit3 {
stroke: #ff8888;
fill: #d3d3d3;
fill: lightgrey;
stroke-width: 2;
cursor: pointer;
shape-rendering: crispEdges;
Expand All @@ -233,18 +233,18 @@ text.actor {
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: #000000 !important;
fill: black !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: #000000 !important;
fill: black !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: #000000;
fill: black;
}
/*
Expand Down
45 changes: 23 additions & 22 deletions dist/mermaid.forest.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
stroke-width: 1px;
}
.edgePath .path {
stroke: #1a3318 !important;
stroke: green;
stroke-width: 1.5px;
}
.cluster rect {
fill: #cdffb2;
Expand All @@ -28,11 +29,11 @@
fill: #cde498;
}
text.actor {
fill: #000000;
fill: black;
stroke: none;
}
.actor-line {
stroke: #808080;
stroke: grey;
}
.messageLine0 {
stroke-width: 1.5;
Expand Down Expand Up @@ -61,11 +62,11 @@ text.actor {
fill: #cde498;
}
.labelText {
fill: #000000;
fill: black;
stroke: none;
}
.loopText {
fill: #000000;
fill: black;
stroke: none;
}
.loopLine {
Expand Down Expand Up @@ -97,7 +98,7 @@ text.actor {
}
.section1,
.section3 {
fill: #ffffff;
fill: white;
opacity: 0.2;
}
.sectionTitle0 {
Expand All @@ -119,7 +120,7 @@ text.actor {
}
/* Grid and axis */
.grid .tick {
stroke: #d3d3d3;
stroke: lightgrey;
opacity: 0.3;
shape-rendering: crispEdges;
}
Expand All @@ -129,7 +130,7 @@ text.actor {
/* Today line */
.today {
fill: none;
stroke: #ff0000;
stroke: red;
stroke-width: 2px;
}
/* Task styling */
Expand All @@ -142,12 +143,12 @@ text.actor {
font-size: 11px;
}
.taskTextOutsideRight {
fill: #000000;
fill: black;
text-anchor: start;
font-size: 11px;
}
.taskTextOutsideLeft {
fill: #000000;
fill: black;
text-anchor: end;
font-size: 11px;
}
Expand All @@ -156,7 +157,7 @@ text.actor {
.taskText1,
.taskText2,
.taskText3 {
fill: #ffffff;
fill: white;
}
.task0,
.task1,
Expand All @@ -167,11 +168,11 @@ text.actor {
}
.taskTextOutside0,
.taskTextOutside2 {
fill: #000000;
fill: black;
}
.taskTextOutside1,
.taskTextOutside3 {
fill: #000000;
fill: black;
}
/* Active task */
.active0,
Expand All @@ -185,30 +186,30 @@ text.actor {
.activeText1,
.activeText2,
.activeText3 {
fill: #000000 !important;
fill: black !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: #808080;
fill: #d3d3d3;
stroke: grey;
fill: lightgrey;
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: #000000 !important;
fill: black !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: #ff8888;
fill: #ff0000;
fill: red;
stroke-width: 2;
}
.activeCrit0,
Expand All @@ -224,7 +225,7 @@ text.actor {
.doneCrit2,
.doneCrit3 {
stroke: #ff8888;
fill: #d3d3d3;
fill: lightgrey;
stroke-width: 2;
cursor: pointer;
shape-rendering: crispEdges;
Expand All @@ -233,18 +234,18 @@ text.actor {
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: #000000 !important;
fill: black !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: #000000 !important;
fill: black !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: #000000;
fill: black;
}
/*
Expand Down
3 changes: 2 additions & 1 deletion dist/mermaid.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -25734,6 +25734,7 @@ exports.addEdges = function (edges, g) {
var defaultStyle;
if(typeof edges.defaultStyle !== 'undefined'){
defaultStyle = edges.defaultStyle.toString().replace(/,/g , ';');

}

edges.forEach(function (edge) {
Expand All @@ -25758,7 +25759,7 @@ exports.addEdges = function (edges, g) {
else{
switch(edge.stroke){
case 'normal':
style = 'stroke: #333; stroke-width: 1.5px;fill:none';
style = 'fill:none';
if(typeof defaultStyle !== 'undefined'){
style = defaultStyle;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/mermaid.full.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dist/mermaid.slim.js
Original file line number Diff line number Diff line change
Expand Up @@ -25702,6 +25702,7 @@ exports.addEdges = function (edges, g) {
var defaultStyle;
if(typeof edges.defaultStyle !== 'undefined'){
defaultStyle = edges.defaultStyle.toString().replace(/,/g , ';');

}

edges.forEach(function (edge) {
Expand All @@ -25726,7 +25727,7 @@ exports.addEdges = function (edges, g) {
else{
switch(edge.stroke){
case 'normal':
style = 'stroke: #333; stroke-width: 1.5px;fill:none';
style = 'fill:none';
if(typeof defaultStyle !== 'undefined'){
style = defaultStyle;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/mermaid.slim.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/diagrams/flowchart/flowRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ exports.addEdges = function (edges, g) {
var defaultStyle;
if(typeof edges.defaultStyle !== 'undefined'){
defaultStyle = edges.defaultStyle.toString().replace(/,/g , ';');

}

edges.forEach(function (edge) {
Expand All @@ -136,7 +137,7 @@ exports.addEdges = function (edges, g) {
else{
switch(edge.stroke){
case 'normal':
style = 'stroke: #333; stroke-width: 1.5px;fill:none';
style = 'fill:none';
if(typeof defaultStyle !== 'undefined'){
style = defaultStyle;
}
Expand Down
2 changes: 1 addition & 1 deletion src/less/default/flow.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}

.edgePath .path {
stroke: @lineColor !important;
stroke: @lineColor;

}
.cluster rect{
Expand Down
Loading

0 comments on commit cbebf12

Please sign in to comment.