Skip to content
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

fix: correctly scale css fonts based on ide defaults #654

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

andrewrobinsonhodges-snyk
Copy link
Contributor

Description

Provide description of this PR and changes, if linked Jira ticket doesn't cover it in full.

Checklist

  • Tests added and all succeed
  • Linted
  • CHANGELOG.md updated
  • README.md updated, if user-facing

Screenshots / GIFs

Visuals that may help the reviewer. Please add screenshots for any UI change. GIFs are most welcome!

@andrewrobinsonhodges-snyk andrewrobinsonhodges-snyk requested a review from a team as a code owner February 10, 2025 15:03
@@ -32,7 +32,9 @@ class ThemeBasedStylingGenerator {
val isHighContrast =
EditorColorsManager.getInstance().globalScheme.name.contains("High contrast", ignoreCase = true)
html = html.replace("--default-font: ", "--default-font: \"${JBUI.Fonts.label().asPlain().family}\", ")
html = html.replace("var(--main-font-size)", JBFont.small().size.toString() + "px")
// CSS from the language server assumes a default size of 10px. JBFont uses a default of 13pt, so we
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wondering. Should we scale it proportionally or just add the +3 everytime. Also, if we don't scale it but use the configured JBFont size - how does it look?

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.

2 participants