Skip to content

Commit

Permalink
Use font size variable providd by JetBrains in webview (#6134)
Browse files Browse the repository at this point in the history
## Test plan

1. Run this branch with
sourcegraph/jetbrains#2654 (using CODY_DIR and
`:customRunIde`)
2. In IntelliJ open `Settings > Appearance`
3. Tick `Use custom font` and change font size
4. Apply changes
5. You should notice that both editor and webview font size changed
  • Loading branch information
pkukielka authored Nov 18, 2024
1 parent 0070f3c commit 05cdd34
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions vscode/webviews/themes/jetbrains.css
Original file line number Diff line number Diff line change
Expand Up @@ -580,15 +580,13 @@ html[data-ide='JetBrains'] {
/* Mimic rules injected by VSCode */
--vscode-font-family: var(--font-family);
--vscode-font-weight: var(--font-weight);
--vscode-font-size: var(--type-ramp-base-font-size);
--vscode-font-size: var(--jetbrains-font-size);

--vscode-editor-font-family: var(--font-family);
--vscode-editor-font-weight: var(--font-weight);
--vscode-editor-font-size: var(--type-ramp-minus1-font-size);

--vscode-widget-shadow: rgba(0, 0, 0, 0.36);

/* todo: get this from the vscode implementation instead of hardcoded on this theme file*/
--vscode-font-size: 13px;
scrollbar-color: var(--vscode-scrollbarSlider-background) var(--vscode-editor-background);
}

Expand Down

0 comments on commit 05cdd34

Please sign in to comment.