mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
#5237 Allow more text styles for labelStyles
This commit is contained in:
parent
f791ea00ef
commit
6d91ae4a09
@ -41,7 +41,26 @@ export const styles2String = (node: Node) => {
|
||||
|
||||
stylesArray.forEach((style) => {
|
||||
const key = style[0];
|
||||
if (key === 'color') {
|
||||
if (
|
||||
key === 'color' ||
|
||||
key === 'font-size' ||
|
||||
key === 'font-family' ||
|
||||
key === 'font-weight' ||
|
||||
key === 'font-style' ||
|
||||
key === 'text-decoration' ||
|
||||
key === 'text-align' ||
|
||||
key === 'text-transform' ||
|
||||
key === 'line-height' ||
|
||||
key === 'letter-spacing' ||
|
||||
key === 'word-spacing' ||
|
||||
key === 'text-shadow' ||
|
||||
key === 'text-overflow' ||
|
||||
key === 'white-space' ||
|
||||
key === 'word-wrap' ||
|
||||
key === 'word-break' ||
|
||||
key === 'overflow-wrap' ||
|
||||
key === 'hyphens'
|
||||
) {
|
||||
labelStyles.push(style.join(':') + ' !important');
|
||||
} else {
|
||||
nodeStyles.push(style.join(':') + ' !important');
|
||||
|
Loading…
x
Reference in New Issue
Block a user