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

Load custom CSS #1160

Closed
weichensw opened this issue Nov 9, 2019 · 7 comments
Closed

Load custom CSS #1160

weichensw opened this issue Nov 9, 2019 · 7 comments
Labels
enhancement Some improvement that isn't a feature

Comments

@weichensw
Copy link

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.

@weichensw weichensw added the enhancement Some improvement that isn't a feature label Nov 9, 2019
@sr229
Copy link
Contributor

sr229 commented Nov 10, 2019

We do not support nor plan to support it. This is considered out of scope for VS Code and code-server.

@sr229 sr229 closed this as completed Nov 10, 2019
@weichensw
Copy link
Author

@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.

@ncolletti
Copy link

@xbtsw Use this chrome app to load custom css: Stylish

@sr229
Copy link
Contributor

sr229 commented Jan 20, 2020

@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.

@code-asher
Copy link
Member

code-asher commented Jan 21, 2020 via email

@Just-Insane
Copy link

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.

@nhooyr
Copy link
Contributor

nhooyr commented Feb 27, 2020

See #1374

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Some improvement that isn't a feature
Projects
None yet
Development

No branches or pull requests

6 participants