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

Allow custom CSS import in config.json #13137

Closed
fooness opened this issue Apr 11, 2020 · 9 comments
Closed

Allow custom CSS import in config.json #13137

fooness opened this issue Apr 11, 2020 · 9 comments

Comments

@fooness
Copy link
Contributor

fooness commented Apr 11, 2020

It would be great to allow custom CSS import in config.json … this could be as easy as adding @import url("/custom.css"); to: https://github.com/matrix-org/matrix-react-sdk/blob/develop/res/themes/light-custom/css/_custom.scss

Maybe it’s even possible to use a css variable here, like: @import url("var(--custom-css-path)"); … or maybe via sass, like:

$custom-css-path: var(--custom-css-path);
@import url("{$custom-css-path}")

Think that’s the easiest solution to this, but I’m more than happy if anyone know an even more simple solution which would make it into master very soon.

@fooness
Copy link
Contributor Author

fooness commented Apr 12, 2020

This would also allow proper custom font support via defining paths to webfont files.

@turt2live
Copy link
Member

Duplicate of #7316

We are not currently intending on supporting this ourselves - there are several web browser extensions which achieve this.

@fooness
Copy link
Contributor Author

fooness commented Apr 13, 2020

@turt2live Web browser based, or client-side approaches to this problems are not comparable to server-side approaches. There really should be some way to add some custom css without having to manually edit the newly built index.html each and every time, over and over again. There needs to be some solutions that’s upstream-compatible in regards of being loaded.

@turt2live
Copy link
Member

The linked issue isn't for server-side support.

@fooness
Copy link
Contributor Author

fooness commented Apr 13, 2020

@turt2live My issue was meant to be server-side. Riot-web-instance-specific. Not client-/browser-specific.

@turt2live
Copy link
Member

The config.json is not server side, it's client side. Server side would mean putting objects into account data or similar.

In any case, custom css isn't a feature at the moment, so would be best to track it with one issue.

@jryans
Copy link
Collaborator

jryans commented Apr 14, 2020

@fooness It may help to discuss your ideas in #riot-web:matrix.org so we can comment on how they may fit with ongoing plans, etc.

@fooness
Copy link
Contributor Author

fooness commented Apr 14, 2020

@jryans What’s your handle on Matrix, also @jryans? Didn’t find someone with that handle, yet …

@turt2live
Copy link
Member

I believe your query was answered: https://matrix.to/#/!YTvKGNlinIzlkMTVRl:matrix.org/$sRa0_sb5Hv_dlJMFeyfIXr9h_0iWdh7mlDvC7KEYToA?via=matrix.org&via=privacytools.io&via=mozilla.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants