-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Load custom CSS #1160
Comments
We do not support nor plan to support it. This is considered out of scope for VS Code and code-server. |
@sr229 I can see why it is out of scope for VSCode. But for code-server, since code-server owns the whole webpage after auth redirection. There's no way to load additional styles without using some sort of user styles, which needs client-side setup and is not possible in many intended scenario of code-server (say, iPads). For example, loading a custom font-family is a quite valid use case - it is common for webpages to import the font-family that it uses. |
@xbtsw We do not plan to have extended support for features that are not provided by VS Code natively. If you want better themeing, please use the Extensions instead. Use the VSCode API as well to build your own themes if you wish. It's already easy to make one. |
Something I haven't tried but sounds really interesting is to use a
reverse proxy like Nginx to intercept the HTML and then inject your own
CSS or JavaScript links. At least, I think that's possible. If not you
could just copy the HTML and serve a modified version of it.
The web font scenario is an interesting one though. Maybe that would be
a good reason to add an option for loading arbitrary CSS.
|
The ability to load fonts via CSS would be nice to have. @sr229 from a quick look at the extension docs, extensions cannot embed fonts, only theme colours and icons. @code-asher That would be a good idea, but it is undocumented what you would have to change either via injection or in the HTML, and it looks like to modify the HTML, you would have to build from source. This is likely not desireable from a UX standpoint. |
See #1374 |
Is it possible to enable some parameter to load custom CSS onto the page? It will be useful for many things. For one, loading a font-family that may not exist on target system.
The text was updated successfully, but these errors were encountered: