This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 827
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using a reduced set of CSS variables to change the colors at runtime
these values are not exactly the same as the palette values, so we're essentially flattening the color palette used in the theme, but this is needed when assigning custom colors for it to look good.
also move theme setting code from MatrixChat to own file.
when badges with and without highlighted state have a very different brightness (as they might do in dark mode), hardcoding the fg color of a badge independent of it's highlighted state to $accent-fg-color doesn't work well, so add an extra SASS variable we can reassign to something more specific in the custom theme
bwindels
added
X-Release-Blocker
This affects the current release cycle and must be solved for a release to happen
and removed
X-Release-Blocker
This affects the current release cycle and must be solved for a release to happen
labels
Oct 1, 2019
turt2live
approved these changes
Oct 1, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm enough to merge for release. My comments are mostly tiny cleanup tasks than anything else.
Would also be good to add to the riot-web docs on this how to set the default_theme
to a custom theme, assuming that works.
Edit: to be clear: feel free to merge this and do the cleanup post-release. It's more important that we ship this to the customer than fix the inconsequential bits.
Co-Authored-By: Travis Ralston <[email protected]>
This was referenced Oct 2, 2019
4 tasks
dbkr
added a commit
to element-hq/element-web
that referenced
this pull request
Nov 20, 2019
Mostly just c+ped from Bruno's PR: matrix-org/matrix-react-sdk#3503
Hell yes. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Requires element-hq/element-web#11017
Related to element-hq/element-web#10946
This adds custom theming provided as JSON blob in the
custom_themes
settings. The custom themes appear in the theme picker together with the built-in ones. Custom themes are derived from the light or dark theme (for sensible defaults of some colors, as we had to reduce the palette). All SASS variables are assigned 1 of 13 CSS variables which are set at runtime from the JSON blob.Might be best to review the PR as one change, as the direction of this PoC went a bit left and right.
Example configuration this would use:
Which is exposed in the theme picker as:
The setting also supports the
account
level so it can be set/overwritten in the devtools by setting the account data:One improvement would be to watch the
custom_themes
settings to reapply it when the account data changes, but we want to get a PoC out rather fast, so doing that later if needed.