Re: [csswg-drafts] [cssom] getComputedStyle only supports ::before/::after

The Working Group just discussed `getComputedStyle only supports ::before/::after`, and agreed to the following resolutions:

* `RESOLVED: getComputedStyle for pseudo elements that are not slotted is supported.`
* `RESOLVED: Throw in this case`

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: getComputedStyle only supports ::before/::after<br>
&lt;dael> github:<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/2149<br>
&lt;dael> gsnedders: getComputedStyle takes a second arg we could pass a pseudo element. Spec desn't agree with impl. It only allows some pseudo and impl allow any.<br>
&lt;dael> gsnedders: What do we do when it's invalid?<br>
&lt;dael> TabAtkins: Seems that we should support first-letter and first-line, but I don't see why not all.<br>
&lt;dael> emilio: Except slotted<br>
&lt;dael> TabAtkins: Yeah. We do still want some sort of magic thing.<br>
&lt;dael> TabAtkins: Slotted is first case of a pseudo being an alias for 1 or more elements. Aliases wouldn't work from this sort of example.<br>
&lt;dael> TabAtkins: We should prob make a term for things like slotted and things not like slotted and say it works for all things in that category.<br>
&lt;dael> Rossen: Currently it should work for non-slotted pseudo elements.<br>
&lt;dael> TabAtkins: Yes.<br>
&lt;dael> TabAtkins: I need to make it into 2 categories where slotted is only one in the second currently.<br>
&lt;dael> Rossen: Reasonable. Other optinos or objections?<br>
&lt;dael> RESOLVED: getComputedStyle for pseudo elements that are not slotted is supported.<br>
&lt;dael> gsnedders: What to do given an invalid pseudo element? All browsers return a css style declaration. FF throws if you trya nd access a property, everyone else returns the element style declaration and ignores the pseudo element.<br>
&lt;dael> TabAtkins: Returning element styles is...there's no reason to do that. Throwing would be best.<br>
&lt;dael> gsnedders: Nothing does that. So can it be web compat?<br>
&lt;dael> TabAtkins: FF doesn't let you touch it. Unless there's code to getgCS and not do anything I suspect we can throw.<br>
&lt;dael> fremy: Empty strings?<br>
&lt;dael> gsnedders: Reasonable. I'd prefer try throwing.<br>
&lt;dael> TabAtkins: At gCS call time.<br>
&lt;dael> ???: incl slotted?<br>
&lt;dael> TabAtkins: Yeah.<br>
&lt;TabAtkins> s/???/ewilligers/<br>
&lt;dael> Rossen: Do we throw for non-elements?<br>
&lt;dael> emilio: Yes.<br>
&lt;dael> Rossen: So this is not different.<br>
&lt;dael> TabAtkins: We're trying to say do the same.<br>
&lt;dael> Rossen: I'm trying to align whatever we do in that situation we should do it for this situation<br>
&lt;dael> fremy: If people call getComputedStyle with a placeholder we'll throw.<br>
&lt;dael> emilio: blink claims to support all eleemnts at parse time which is weird.<br>
&lt;dael> fremy: [missed]<br>
&lt;dael> emilio: Does gCS webkit get a result now? I guess not.<br>
&lt;dael> fremy: They work in Edge and Chrome they return.<br>
&lt;dael> emilio: gCS in ::webkit-foo<br>
&lt;dael> fremy: I think that's why we returnt he element style. People do random things we don't support and since Chrome does something we do something.<br>
&lt;dael> fremy: I'm fine saying we should throw but I won't be first to impl.<br>
&lt;dael> Rossen: In terms of defining behavior the most sensible thing is throw.<br>
&lt;dael> Rossen: Objections to that proposal?<br>
&lt;dael> RESOLVED: Throw in this case<br>
</details>


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

Received on Wednesday, 11 April 2018 09:21:30 UTC