-
Notifications
You must be signed in to change notification settings - Fork 659
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
[cssom] getComputedStyle for ::before::marker or ::after::marker #4456
Comments
I guess there's also the 3rd possibility of allowing a CSSPseudoElement as the 1st argument, then getComputedStyle(elt.pseudo("::before"), "::marker")
getComputedStyle(elt.pseudo("::before").pseudo("::marker")) |
Regarding these two options: getComputedStyle(elt, "::before::marker")
getComputedStyle(elt, "::before", "::marker") My first concern for the second case is that it is bad for compatibility/progressive enhancement: existing browsers will silently ignore the final parameter & just return the However, now that I actually test it, it seems like the results for unrecognized selector strings aren't actually useful for catching the difference, either! See discussion in #3980. |
I'm wondering whether we can just ban nested pseudo-element of this kind from being used as selector as a whole... |
@upsuper There are various resolution in favour of nested pseudo-elements. See #3876 (comment) and #3836 (comment) |
It would be good if the solutions here and in #4487 were consistent. |
Seems like we can follow the footsteps of the resolution above and permit the same syntax for 'pseudoElt' in getComputedStyle? |
From https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle, the signature is
where
pseudoElt
is parsed as a<pseudo-element-selector>
.For example,
::before
or::marker
are<pseudo-element-selector>
s.However, https://drafts.csswg.org/css-pseudo-4/#marker-pseudo allows
::before::marker
and::after::marker
in stylesheets. These are not a single<pseudo-element-selector>
, but it seems useful for authors to expose their styles viagetComputedStyle
.So maybe we could allow one of these:
The text was updated successfully, but these errors were encountered: