-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[0.8] Shady style processor doesn't drop operator for ::content #1293
Comments
Thx for the clear write up and suggestion. Will make it so. |
Cool thanks. I think operators on both sides have to be dropped and replaced with a single descendant selector to match shadow DOM as closely as possible.. For example: /* Yes this is _weird_, but the selector works with real shadow DOM */
#main > ::content + [core-drawer-toggle] should become: #main[style-scope] [core-drawer-toggle] |
Well that replacement will screw up in odd cases, but that might be close enough. |
My example might be invalid because the recommendation is to wrap a |
With the above change, these selectors should now be shimmed as follows:
This should ensures that:
We also have an idea to improve shimming of |
🍻 Thanks, @sorvell. |
Shadow land
In shady land the
::content
pseudo element selector is simply dropped, but it's valid to treat it as a real element in selectors and surround it with operators like>
:That should be "select all [core-drawer-toggle] that is a descendant of a
<content>
, which is a child of #main". The distributedbutton
is selected in the above case when?dom=shadow
is enabled.Shady land
In shady land the
::content
is just dropped:Actual:
Now the selector expects a different DOM structure: "select all [core-drawer-toggle] that are children of #main". The
button
in the above example is no longer selected.Expected is to drop the operators surrounding
::content
:Expected:
The text was updated successfully, but these errors were encountered: