mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-17 22:39:56 +02:00
Wit
This commit is contained in:
52
test/examples/cssClasses.html
Normal file
52
test/examples/cssClasses.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<link rel="stylesheet" href="../../dist/mermaid.css"/>
|
||||
<script src="../../dist/mermaid.js"></script>
|
||||
<style>
|
||||
.cluster {
|
||||
fill: #fcac93;
|
||||
rx:4px;
|
||||
stroke: grey;
|
||||
}
|
||||
.cssClass > rect{
|
||||
fill:#FF0000;
|
||||
stroke:#FFFF00;
|
||||
stroke-width:4px;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../../dist/mermaid.forest.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Css classes</h1>
|
||||
A should have a red background with styling from class.
|
||||
<div class="mermaid" id="i211">
|
||||
graph LR;
|
||||
A-->B[AAA<span>BBB</span>];
|
||||
B-->D;
|
||||
class A cssClass;
|
||||
|
||||
</div>
|
||||
A should have a red background with styling from style definition.
|
||||
<div class="mermaid" id="i212">
|
||||
graph LR;
|
||||
A-->B[AAA<span>BBB</span>];
|
||||
B-->D;
|
||||
style A fill:#FF0000,stroke:#FFFF00,stroke-width:4px;
|
||||
</div>
|
||||
|
||||
A should have orange background with styling from local class definition definition.
|
||||
<div class="mermaid" id="i213">
|
||||
graph LR;
|
||||
A-->B[AAA<span>BBB</span>];
|
||||
B-->D;
|
||||
classDef orange fill:#f96,stroke:#333,stroke-width:4px;
|
||||
class A orange;
|
||||
linkStyle 0 stroke:#ff3,stroke-width:4px;
|
||||
classDef default fill:#f9f,stroke:#333,stroke-width:4px;
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
47
test/examples/issue_210.html
Normal file
47
test/examples/issue_210.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<script src="../../dist/mermaid.js"></script>
|
||||
<script>
|
||||
var config = {
|
||||
startOnLoad:true,
|
||||
callback:function(id){
|
||||
console.log(id,' rendered');
|
||||
},
|
||||
flowchart:{
|
||||
useMaxWidth:true,
|
||||
htmlLabels:true
|
||||
}
|
||||
};
|
||||
mermaid.initialize(config);
|
||||
</script>
|
||||
<script>
|
||||
function coolAction(){
|
||||
console.log('Got callback in user defined function');
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.cluster {
|
||||
fill: #fcac93;
|
||||
rx:4px;
|
||||
stroke: grey;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../../dist/mermaid.forest.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Issue 211</h1>
|
||||
A should have a red background.
|
||||
<div class="mermaid" id="i211">
|
||||
|
||||
graph LR;
|
||||
A-->B[AAA<span>BBB</span>];
|
||||
B-->D;
|
||||
classDef test fill:#FF0000,stroke:#FFFF00,stroke-width:4px;
|
||||
class A test;
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user