Allow stylus to target elements in shadow-root
当前为
This userscript allows Stylus' users to style shadow-DOM elements that are by definition out of reach of global stylesheets.
Supported userstyles manager extension are: "Stylus", "Stylish", "User JavaScript and CSS", "xStyle".
Any style rule whose selectors includes :host or :host-context will be injected into the shadow-root node.
By default the userscript is not running on any website. You'll have to edit the script settings (eg. in tampermonkey): open the userscript, go to the script's "settings" tab and add the mask (don't forget the *) of the website(s) you want to run it on.
To test:
https://web.archive.org/web/* to "user matches"https://web.archive.org/web/2/ appended with the full url of a webpage.https://web.archive.org/web/2/https://procyon-b.github.io/programming/https://web.archive.org/web/* and define this style: :host * {
outline: 1px solid red !important;
}