RoleColorEverywhere: Embed/Time/Pronouns support #3098
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.
Before:
After:
Screenshots are made with 70% saturation.
So turns out my last PR #3036 was kinda broken
When trying to re-assign a css var with itself css can't find it!
will resolve in a black color because of circular dependency, but because we're using color-mix it just mixed our role color with black :)
That's why i'm doing this weird stuff in css, so we don't have circular dependency and colors will resolve as intended
Why changing patch location?
Previous patch was on a too "deep" level of a message, so it could be applied to a normal text, but text inside of embeds will be ignored.
So i've moved it to a message item itself, where MessageLogger and ThemeAtribbutes also have patches
So with both these changes we have:
Why use take className from a function call and not apply it imminently
With this approach i'm getting a bug
--saturation
and no--role-color
which will result it a #000 text!The only thing I don't like is how i'm calling the same function twice, but i have no idea how to reduce it in this example