Skip to content

Customizing styling based on theme - vscode integration #1358

Answered by tortmayr
jmenzies12 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @jmenzies12,
it shouldn't matter whether you add you custom css on the client side or directly in the webview part. (The webview consumes the client anyways and should have all of its css imported as well). However, if you want to be on the safe side adding it to the webview is the right call.

I have never tried using @media for theme specific customizations. In general, there are two common approaches for theme specific css customizations

  1. Reuse the builtin --vscode-xxx css variables. VSCode uses css variables to provide theme specific colors. So a straight forward and simple solution is to reuse these css-variables in your custom style. The GLSP Vscode integration heavily uses this …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jmenzies12
Comment options

Answer selected by jmenzies12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants