mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-13 04:19:44 +02:00
Merge branch 'master' into issue416_link_style_fill_none
This commit is contained in:
@@ -345,6 +345,7 @@ should have a different look.
|
|||||||
|
|
||||||
a class definition looks like the example below:
|
a class definition looks like the example below:
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
classDef className fill:#f9f,stroke:#333,stroke-width:4px;
|
classDef className fill:#f9f,stroke:#333,stroke-width:4px;
|
||||||
```
|
```
|
||||||
@@ -396,7 +397,7 @@ If a class is named default it will be assigned to all classes without specific
|
|||||||
|
|
||||||
## Basic support for fontawesome
|
## Basic support for fontawesome
|
||||||
|
|
||||||
It is possible to add icons from fontawesome. In order to do so, you need to add the fontwesome as described in the instructions at
|
It is possible to add icons from fontawesome. In order to do so, you need to add the fontawesome as described in the instructions at
|
||||||
[the fontawesome web site](https://fortawesome.github.io/Font-Awesome/).
|
[the fontawesome web site](https://fortawesome.github.io/Font-Awesome/).
|
||||||
|
|
||||||
The icons are acessed via the syntax fa:#icon class name#.
|
The icons are acessed via the syntax fa:#icon class name#.
|
||||||
|
@@ -112,7 +112,7 @@ var cloneCssStyles = function(svg, classes){
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (classes[className].styles instanceof Array) {
|
if (classes[className].styles instanceof Array) {
|
||||||
embeddedStyles += '#' + svg.id.trim() + ' .' + className + '>rect, .' + className + '>polygon, .' + className + '>ellipse { ' + classes[className].styles.join('; ') + '; }\n';
|
embeddedStyles += '#' + svg.id.trim() + ' .' + className + '>rect, .' + className + '>polygon, .' + className + '>circle, .' + className + '>ellipse { ' + classes[className].styles.join('; ') + '; }\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -196,11 +196,10 @@ describe('when cloning CSS ', function () {
|
|||||||
expect(stylesToArray(svg)).toEqual(['#mermaid-01 .node>rect { stroke:#ffffff; stroke-width:1.5px; }',
|
expect(stylesToArray(svg)).toEqual(['#mermaid-01 .node>rect { stroke:#ffffff; stroke-width:1.5px; }',
|
||||||
'.node { stroke: #eeeeee;}',
|
'.node { stroke: #eeeeee;}',
|
||||||
'.node-square { stroke: #bbbbbb;}',
|
'.node-square { stroke: #bbbbbb;}',
|
||||||
'#mermaid-01 .node-square>rect, .node-square>polygon, .node-square>ellipse { fill:#eeeeee; stroke:#aaaaaa; }',
|
'#mermaid-01 .node-square>rect, .node-square>polygon, .node-square>circle, .node-square>ellipse { fill:#eeeeee; stroke:#aaaaaa; }',
|
||||||
'#mermaid-01 .node-circle>rect, .node-circle>polygon, .node-circle>ellipse { fill:#444444; stroke:#111111; }'
|
'#mermaid-01 .node-circle>rect, .node-circle>polygon, .node-circle>circle, .node-circle>ellipse { fill:#444444; stroke:#111111; }'
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
describe('when finding substring in array ', function () {
|
describe('when finding substring in array ', function () {
|
||||||
it('should return the array index that contains the substring', function () {
|
it('should return the array index that contains the substring', function () {
|
||||||
|
Reference in New Issue
Block a user