-
Notifications
You must be signed in to change notification settings - Fork 306
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
[Feature request] Add style option to insert at the beginning of document #1793
Comments
Judging by the diagram you can probably use a fake animation where |
If I'm reading the diagram and related docs correctly, the only rules with greater priority than
While I could specify a |
Named layers are fine in my specific use case as I could apply my previous approach (more specific selector) targeting specific layer names. Anonymous layers appear trickier as every declaration generates a unique layer that cannot be further amended (I wonder if that's a deliberate spec behavior), and only the order of the anonymous |
I wonder if the extension's default behavior should be to extract all |
Yes, it could be evaluated like that without introducing an option. An explicit setting might still turn out necessary if unexpected results appear because of possible combinations of |
Then maybe just the important layer declarations should be lifted? |
I can't currently assess if it could be deemed "too custom" behavior with its own set of side effects, hence I've suggested the addition of an option. Then yes, it could be a solution if it doesn't break another major behavior – I can't think of one at the moment. |
Feature
Description
Add a style option to insert its
<style>
element at the beginning of the document (possibly at the beginning of<head>
) vs. currently (the default) at the end of the document. This would allow to override!important
anonymous@layer
author styles occurring earlier in the document. See the priority diagram at:https://developer.mozilla.org/en-US/docs/Web/CSS/@layer#description
CSS Code
https://codepen.io/Stanimir-Stamenkov/details/rNELrxj
System Information
Additional Context
The latest version of Dark Reader places its styles in anonymous layer declarations. There are a few annoying rules including darkreader/darkreader#8906:
I've previously overridden these by having a style with a more specific selector:
but it doesn't work with styles placed in anonymous layers.
The text was updated successfully, but these errors were encountered: