When using jpro-mdfx's MarkdownView, JavaFX prints CSS conversion warnings for code block styling.
Environment
- jpro-mdfx:
0.6.2
- JavaFX:
26
- OpenJDK 25
- OS: Windows
Warning
javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint
(java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module javafx.graphics@26 of loader 'app')'
while converting value for '-fx-border-color' from rule '*.markdown-code-background' in stylesheet jar:file:///.../mdfx/mdfx.css
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint
(java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module javafx.graphics@26 of loader 'app')'
while converting value for '-fx-background-color' from rule '*.markdown-code-block *.code-text-flow' in stylesheet jar:file:///.../mdfx/mdfx.css
Behavior
The warning appears when rendering Markdown that includes a code block with the default jpro-mdfx styling.
If I explicitly define these CSS properties in my application stylesheet, the warnings disappear:
* {
/* ... */
-mdfx-code-block-border: /* My color */;
-mdfx-code-block-background: /* My color */;
}
Expected behavior
MarkdownView should not emit JavaFX CSS warnings with its default stylesheet/settings. If these properties are required for code block rendering, it would be helpful if jpro-mdfx provided safe default values.
Actual behavior
Without explicitly setting -mdfx-code-block-border and -mdfx-code-block-background, JavaFX logs a ClassCastException warning.
When using
jpro-mdfx'sMarkdownView, JavaFX prints CSS conversion warnings for code block styling.Environment
0.6.226Warning
Behavior
The warning appears when rendering Markdown that includes a code block with the default jpro-mdfx styling.
If I explicitly define these CSS properties in my application stylesheet, the warnings disappear:
Expected behavior
MarkdownViewshould not emit JavaFX CSS warnings with its default stylesheet/settings. If these properties are required for code block rendering, it would be helpful if jpro-mdfx provided safe default values.Actual behavior
Without explicitly setting
-mdfx-code-block-borderand-mdfx-code-block-background, JavaFX logs a ClassCastException warning.