[Feature Request] Add a class to a top level HTML element to identify Dark Reader style applied
See original GitHub issueI was thinking more about our discussion on allowing the user to edit the dynamic or other themes for user-specified sites.
I think it’s a very worthwhile long-term goal. In the short-term, I have a proposal that is easy to implement while simultaneously providing maximum flexibility: Add a class to a top level HTML element (such as body
) that identifies the Dark Reader style being applied (dynamic, filter, filter+, custom01, custom02, etc.).
This simple improvement allows the user to apply any additional styles (or other functionality, such as scripts) they want, dependent on the Dark Reader theme being applied. People can apply those styles using userContent.css
, Stylish, or whatever they prefer.
This other project already performs this class-adding behavior, and as you can see, the implementation is rather simple: https://github.com/codebicycle/videospeed
The only hiccup I can think of right now is ensuring that the user-override styles are able to override any Dark Reader CSS that uses !important
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (6 by maintainers)
Top GitHub Comments
Checks status of #4860 >> Open
#4860 Not sure how I’ve missed these 2 notifications.