mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-03 15:46:43 +02:00
Merge pull request #4930 from Mister-Hope/patch-2
feat(gantt): update styles
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
const getStyles = (options) =>
|
const getStyles = (options) =>
|
||||||
`
|
`
|
||||||
.mermaid-main-font {
|
.mermaid-main-font {
|
||||||
font-family: "trebuchet ms", verdana, arial, sans-serif;
|
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
||||||
font-family: var(--mermaid-font-family);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.exclude-range {
|
.exclude-range {
|
||||||
fill: ${options.excludeBkgColor};
|
fill: ${options.excludeBkgColor};
|
||||||
}
|
}
|
||||||
@@ -45,11 +45,7 @@ const getStyles = (options) =>
|
|||||||
|
|
||||||
.sectionTitle {
|
.sectionTitle {
|
||||||
text-anchor: start;
|
text-anchor: start;
|
||||||
// font-size: ${options.ganttFontSize};
|
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
||||||
// text-height: 14px;
|
|
||||||
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
||||||
font-family: var(--mermaid-font-family);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -59,10 +55,11 @@ const getStyles = (options) =>
|
|||||||
stroke: ${options.gridColor};
|
stroke: ${options.gridColor};
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
shape-rendering: crispEdges;
|
shape-rendering: crispEdges;
|
||||||
text {
|
}
|
||||||
font-family: ${options.fontFamily};
|
|
||||||
fill: ${options.textColor};
|
.grid .tick text {
|
||||||
}
|
font-family: ${options.fontFamily};
|
||||||
|
fill: ${options.textColor};
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid path {
|
.grid path {
|
||||||
@@ -89,33 +86,27 @@ const getStyles = (options) =>
|
|||||||
|
|
||||||
.taskText {
|
.taskText {
|
||||||
text-anchor: middle;
|
text-anchor: middle;
|
||||||
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
||||||
font-family: var(--mermaid-font-family);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// .taskText:not([font-size]) {
|
|
||||||
// font-size: ${options.ganttFontSize};
|
|
||||||
// }
|
|
||||||
|
|
||||||
.taskTextOutsideRight {
|
.taskTextOutsideRight {
|
||||||
fill: ${options.taskTextDarkColor};
|
fill: ${options.taskTextDarkColor};
|
||||||
text-anchor: start;
|
text-anchor: start;
|
||||||
// font-size: ${options.ganttFontSize};
|
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
||||||
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
||||||
font-family: var(--mermaid-font-family);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.taskTextOutsideLeft {
|
.taskTextOutsideLeft {
|
||||||
fill: ${options.taskTextDarkColor};
|
fill: ${options.taskTextDarkColor};
|
||||||
text-anchor: end;
|
text-anchor: end;
|
||||||
// font-size: ${options.ganttFontSize};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Special case clickable */
|
/* Special case clickable */
|
||||||
|
|
||||||
.task.clickable {
|
.task.clickable {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.taskText.clickable {
|
.taskText.clickable {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
fill: ${options.taskTextClickableColor} !important;
|
fill: ${options.taskTextClickableColor} !important;
|
||||||
@@ -134,6 +125,7 @@ const getStyles = (options) =>
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Specific task settings for the sections*/
|
/* Specific task settings for the sections*/
|
||||||
|
|
||||||
.taskText0,
|
.taskText0,
|
||||||
@@ -255,9 +247,8 @@ const getStyles = (options) =>
|
|||||||
.titleText {
|
.titleText {
|
||||||
text-anchor: middle;
|
text-anchor: middle;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
fill: ${options.textColor} ;
|
fill: ${options.titleColor || options.textColor};
|
||||||
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
|
||||||
font-family: var(--mermaid-font-family);
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user