Re: [csswg-drafts] [css-pseudo-4] Specify better handling of text shadows for ::selection (#3605)

The CSS Working Group just discussed `Specify better handling of text shadows for ::selection`, and agreed to the following:

* `RESOLVED: text-shadow:none in UA style sheets are override-able by authors for selection`

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: Specify better handling of text shadows for ::selection<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/3605<br>
&lt;dael> Rossen_: Discussed once and the discussion was cut short. Who wants to resume that discussion and catch up the group?<br>
&lt;dael> fantasai: The question was really the text shadows spec on an element and highlight element w/ bg should text shadows show through<br>
&lt;dael> Rossen_: On element or on text?<br>
&lt;dael> fantasai: On text.<br>
&lt;dael> fantasai: Shadow is set on the element on DOM and you have highlighted that element. Are you seeing the shadow or not? THe highlight has a bg and generally paint text over bg but that menas text might not visible b/c have changed both text and bg color and there's no assurance shadow color is appropritate to preserve contrast<br>
&lt;dael> fantasai: Highlight colors come from elsewhere then dom element. I think it makes most sense to suppress text shadow unless author explicitly says what it should be<br>
&lt;dael> florian: If an author explicitly considers shadows so they'll set it to the right thing. Most of the time they won't think about it and inherit and it prob will be wrong. I agree<br>
&lt;dael> AmeliaBR: Complication I brought up last time is that there's no easy way to just say use whatever text shadow is on surrounding b/c weirdness of how selection inherits. Not jsut suppressing by default, but taking away option for author to say keep text shadw as is<br>
&lt;dael> florian: Could do custom properties but that's a bit of a cludge<br>
&lt;dael> AmeliaBR: In contrast if we leave it as is which is keep drawing text shadow it's easy for author to override with text shadow:none<br>
&lt;dael> fantasai: But most won't<br>
&lt;dael> florian: Robust by default is important<br>
&lt;dael> fantasai: I think cases where author will want text shadows and showing when highlighting will be less common then when author sets text shadow and not highlight or setting highlight colors and not thinking about it when setting shadows<br>
&lt;dael> AmeliaBR: That's true. I think as far as weither text shadow looks good or bad is 50/50<br>
&lt;dael> fantasai: Not good or bad, this is about readable. This is a11y<br>
&lt;dael> AmeliaBR: Reasonable to say default selection remove text shadows. Not reasonable to override user set selection styles. But if others disagree I've made my statement and won't object<br>
&lt;dael> nigel: Makes sense. If have default selection color for bg and fg they apply and all the defaults make it readable that's fine. If someone overrides text shadow for selection they should look out. Other is if they override text shadow for selections we try and push a color change, but that's a pain to try and do to only modify the color if it's overwritten<br>
&lt;dael> fantasai: I want to keep this not crazy complicated. WE should try and use cascade as much as possible<br>
&lt;nigel> +1 to not crazy complicated!<br>
&lt;dael> fantasai: Prob simpliest is add a text-shadow:none to UA default style sheet. If you want more complicated we can consider<br>
&lt;dael> AmeliaBR: Do have some complications since default UA sets bg and fg but if author sets either, neither value applies. Set text shadow in same group where if author sets any we ignore whole set of UA rules<br>
&lt;bradk> +1 to just being in UA stylesheet. Allowing footguns is better than being author-nanny.<br>
&lt;dael> fantasai: Could do that. Additional weirdness. Not concernedwith jsut UA but that author that sets selection is not the one that puts text shadow on this specific heading. They just want the header to look good on the page when it loads but not in this case. Will be difficult if want text shadow to show up in selection but not impossible. We should bias toward readable page<br>
&lt;dael> AmeliaBR: Sure. As you say selections are about a11y not fancy styling<br>
&lt;dael> AmeliaBR: So you are saying UA style sheet would have text-shadow:none but if author sets it in their selection styles that's fine?<br>
&lt;dael> fantasai: Yes<br>
&lt;dael> AmeliaBR: Okay<br>
&lt;dael> Rossen_: Nearing consensus. Any other feedback on this or is everyone getting around the same page. text-shadow:none in UA style sheets are overridable by authors for selection<br>
&lt;dael> Rossen_: Objections?<br>
&lt;dael> RESOLVED: text-shadow:none in UA style sheets are override-able by authors for selection<br>
</details>


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

Received on Wednesday, 20 March 2019 16:25:18 UTC