-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hard to customize font-size for gantt charts #783
Comments
I'm using the following workaround: .mermaid text[font-size="14"] {
font-size: 14px !important;
} It's pretty ugly and will break at the first chance, but it in some cases it leads to better results. I think the other text on the chart should scale accordingly with the set fontSize, which I don't think it's the case currently. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@knsv can you label this issue so that the stupid bot won't close it? |
i have the same problem! |
Classified as a bug. I assumed the behaviour was not intentional. |
I have trouble reproducing this bug, could you give me an example? Is that not what you were looking for or did you run into problems with the specificity of the css styles? In my browser (Chrome) the themeCSS overrides the default from gantt.sccs, although both have the same selectors, so I guess it's loaded later. |
- deselect theme style if font-size is set on the taskText element (e.g. via gantt-config)
I added the :not([font-size]) to the theme scss, but if you now want to overwrite the theme property, you will have to use something like
do reach a higher specificity |
- deselect theme style if font-size is set on the taskText element (e.g. via gantt-config)
#783 Hard to customize font-size for gantt charts
Is this still an issue after the commit mentioned above? |
The default themes set a default font-size:
https://github.com/knsv/mermaid/blob/7d3578b31aeea3bc9bbc618dcda57d82574eaffb/src/themes/gantt.scss#L78
But if I override that via the settings then a
font-size
attribute gets added to the text element, but the CSS has the priority here and my setting is not used:Basically the font-size becomes unless.
I think the selector should include a
:not([font-size])
, so that the property doesn't get overridden.The text was updated successfully, but these errors were encountered: