Skip to content

Mdfx css fixes#89

Merged
FlorianKirmaier merged 12 commits intomainfrom
mdfx-css-fixes
Mar 12, 2026
Merged

Mdfx css fixes#89
FlorianKirmaier merged 12 commits intomainfrom
mdfx-css-fixes

Conversation

@dlemmermann
Copy link
Collaborator

Using em values for fonts is very important.
No hardcoded font for just this control ... we need to pick up the global theme.

Copilot AI review requested due to automatic review settings March 11, 2026 10:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the MDFX default styling to better respect the application’s global JavaFX theme by removing hardcoded font settings and switching various sizes to relative units, while consolidating code-block styling into the main MDFX stylesheet.

Changes:

  • Scope MDFX looked-up colors and styling variables and replace hardcoded colors with JavaFX theme colors in mdfx.css.
  • Replace fixed heading font sizes with em values and normalize various paddings/spacings to explicit px units.
  • Remove MarkdownCodeBlock’s dedicated user-agent stylesheet and delete markdown-code-block.css, moving code-block rules into mdfx.css.
  • Update the example to add padding and apply the markdown-view style class.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
jpro-mdfx/src/main/resources/one/jpro/platform/mdfx/mdfx.css Theme-aligned looked-up colors, sizing adjustments, and consolidated block quote/code block styling.
jpro-mdfx/src/main/resources/one/jpro/platform/mdfx/markdown-code-block.css Removed (styles moved into mdfx.css).
jpro-mdfx/src/main/java/one/jpro/platform/mdfx/MarkdownCodeBlock.java Removes per-control UA stylesheet hookup for code blocks.
jpro-mdfx/example/src/main/java/one/jpro/platform/mdfx/example/MarkdownViewSample.java Adjusts sample padding and adds required style class (plus a problematic import).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@FlorianKirmaier FlorianKirmaier merged commit b8c6a35 into main Mar 12, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants