-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Enable fine-grained styling in code #11280
Conversation
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.
Looks super good 👍, and you've made it look easy! I thought it would take a lot more code than this to implement the feature. I haven't noticed any regressions in a quick look, but I'll leave an HC theme in place for a bit to see if anything comes up. A few comments on the code.
@colin-grant-work Thanks, I split the styling participants related to a certain area of the app into one class each 👍 |
ed09ad1
to
ffbc3c0
Compare
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.
With the modularization, it should be easier for downstream applications to customize or add to particular parts. 👍
What it does
Closes #11063
Closes #6743
Adds a new
StylingService
(and an associatedStylingParticipant
) which allows us to dynamically change styles using code. This has the advantage that we can set styles based on the existence of a color in a color theme.As a simple example, we can take the notification hover color, which isn't set for some themes (hc-black). Hovering over a notification when the color isn't set will make the background transparent, while it should usually just keep the existing background color.
I used this feature to also implement the missing capabilities for high contrast theming and clean up some more (unused) css files (such as the
variables-dark.useable.css
/variables-bright.useable.css
files).How to test
Review checklist
Reminder for reviewers