Re: [csswg-drafts] [selectors-4]Why "Pseudo-elements cannot be represented by the matches-any pseudo-class"? (#2284)

The CSS Working Group just discussed `Why \"Pseudo-elements cannot be represented by the matches-any pseudo-class\"?`, and agreed to the following:

* `RESOLVED: Defer this issue to L5`

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: Why \"Pseudo-elements cannot be represented by the matches-any pseudo-class\"?<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/2284<br>
&lt;dael> fantasai: I wanted to ask if this is something we should try and define or close as no change<br>
&lt;dael> TabAtkins: Valid.<br>
&lt;dael> TabAtkins: I know that safari allows pseudo elements, but it doesn't make sense and I don't know why<br>
&lt;TabAtkins> .foo:matches(::before):hover<br>
&lt;dael> TabAtkins: This selector ^ bothers me.<br>
&lt;dael> TabAtkins: Unclear if it means before when foo is hovered or when foo.before is hovered.<br>
&lt;TabAtkins> .foo:matches(::before).bar is invalid, then<br>
&lt;dael> fantasai: If we're going to define we have to define if a selecotr ends in a pseudo element and has same meaning as if you placed element outside of matches.<br>
&lt;TabAtkins> .foo:matches(::before, .baz).bar is invalid, too<br>
&lt;dael> fantasai: That's invalid, right.<br>
&lt;dael> TabAtkins: Reasonable sort of thing to define on<br>
&lt;dael> TabAtkins: It's weird and I don't like it, but if it's what we want I'm okay<br>
&lt;dael> ericwilligers: What's the need for this?<br>
&lt;TabAtkins> .foo:matches(::before, ::after)<br>
&lt;dael> TabAtkins: Safari does it for selectors like ^<br>
&lt;dael> TabAtkins: You want to assign a style to multiple psuedo elements. Can't do that with matches right now. That's annoying, I agree<br>
&lt;dael> TabAtkins: Reasonable thing. Even bikeshed stylesheet would like to do a selector like this.<br>
&lt;fantasai> s/matches/is/ btw ;)<br>
&lt;TabAtkins> .foo:matches(::before, .bar)<br>
&lt;TabAtkins> ^ invalid<br>
&lt;dael> TabAtkins: Another option is we're more limited and you can put psuedo elements in if they're the only thing in the selector. All options have to be pseudo elements<br>
&lt;TabAtkins> .foo:matches(::before:hover) is valid<br>
&lt;dael> TabAtkins: That would be okay way to deal<br>
&lt;plinss> .foo:matches(::before):matches(:hover) ?<br>
&lt;TabAtkins> would be valid by my rule I think<br>
&lt;dael> fantasai: Thing that's tricky is different pseudo elements can be followed by different things. No need to make first example invalid b/c each branch is valid. If any branch is invalid whole is invalid.<br>
&lt;dbaron_> Pseudo elements seem like they might differ in what is allowed after them<br>
&lt;dael> fantasai: More restrictive I'm not sure that gains us a whole lot. You'll still need contextual checking.<br>
&lt;fantasai> s/checking/checking, even if they're all pseudo-elements/<br>
&lt;dael> TabAtkins: ericwilligers we don't support pseudo elements in matches right now, correct?<br>
&lt;dael> ericwilligers: Correct<br>
&lt;dbaron_> It seems like you might want to ensure that all branches of the :matches end in the same restriction state<br>
&lt;dael> TabAtkins: FF or Edge, how does this sound. Should I close no change and Safari violates spec? Or do we want?<br>
&lt;TabAtkins> dbaron_, I agree with that as a good restriction if we go this way<br>
&lt;dael> Rossen: Curious to hear from Safari folks.<br>
&lt;dael> Rossen: dbaron_ is on IRC [reads]<br>
&lt;dbaron_> (where we need to be conservative about what is the same, e.g. before and after OK but not selection)<br>
&lt;TabAtkins> :matches(::before, ::spelling-error) would be invalid<br>
&lt;dael> TabAtkins: before and after are fine, but before and spelling wouldn't work because allow different things<br>
&lt;dael> ericwilligers: Safari uses different selector name. So it doesn't matter too much.<br>
&lt;dael> TabAtkins: Not a backwards compat concern. It's what we want to do for the future<br>
&lt;dael> TabAtkins: I'm perfectly fine saying close no change<br>
&lt;dbaron_> Still have mixed feelings about whether to allow pseudos in v1<br>
&lt;dael> TabAtkins: dbaron_ is unsure. We can relax restriction later<br>
&lt;dbaron_> (typing on phone, BTW)<br>
&lt;dael> Rossen: smfr said Safari folks can't follow because they're in a meeting<br>
&lt;dael> Rossen: Objections to resolving no change?<br>
&lt;dael> fantasai: I think deferred<br>
&lt;dael> fantasai: Close no change means we don't want to accept. We might accept in future<br>
&lt;dael> fantasai: I'd prefer...if we're going to consider in the future we leave it open for selectors 5. If it's a baad idea we close no change.<br>
&lt;dael> Rossen: Don't disagree<br>
&lt;dael> Rossen: objections to defer to L5?<br>
&lt;dael> RESOLVED: Defer this issue to L5<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2284#issuecomment-444705870 using your GitHub account

Received on Thursday, 6 December 2018 00:43:10 UTC