Re: [csswg-drafts] [css-pseudo-4]: How should a selected spelling error be painted? (#2850)

The CSS Working Group just discussed `Color of text / decorations`.

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: Color of text / decorations<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/2850<br>
&lt;dael> fantasai: As I was working on the model for this I figured it would be useful to have this defined<br>
&lt;dael> fantasai: I wanted to double check that hte WG thinks it's fine<br>
&lt;dael> AmeliaBR: A little concerned from agenda summary, but issue seems that it's coming out of cascade where ::Selection pseudo element gets broken to sep pieces for selection inside each element so selection inside an element with different color will have different currentColor. Is that correct?<br>
&lt;dael> fantasai: It would resolve to a single color, but just be a keyword. If your value is currentColor you don't paint over text decorations with another color.<br>
&lt;dael> AmeliaBR: Makes sense. Works if you think of it as many pseudo elements in sequence. Wording in agenda makes it sound that you can't set current color in pseudo selection itself.<br>
&lt;dael> fantasai: This is jsut for color property itself. currentColor anywhere else behaves as expected<br>
&lt;dael> AmeliaBR: So it goes with this works by inheritence.<br>
&lt;dael> fantasai: I should double check spec, but that's what it should say<br>
&lt;dael> astearns: Other comments?<br>
&lt;dael> daniel: I came in mid-way, but this was my issue. What was that about current color and inheritence?<br>
&lt;dael> fantasai: If you look at issue example there is text that's black and underline black and there's a red word in there. What I'm proposing is to clarify the behavior you expect that the red will continue to be red if ::selection isn't given a color.<br>
&lt;AmeliaBR> ::selection{ background: yellow} is treated as ::selection{background: yellow; color: currentColor}<br>
&lt;dael> fantasai: As I clarified it seemed ti would be straightword to have a keyword to refer to this which is currentColor. So I wanted to tie it explicitly rather then if you just don't have a value. That way they can spec the behavior<br>
&lt;dael> daniel: If you leave out the value...in this example selection leaves out color so it inherits from spelling error pseudo element<br>
&lt;dael> fantasai: Way cascading is spec the ::selection inherits from the parent ::selection not directly from the originating element or another pseudo element<br>
&lt;dael> daniel: with you on that. If everyone agrees result should be bottom example it seems like you have to inherit from pseudo elements until you fall back to originating<br>
&lt;dael> fantasai: Could say inherits from pseudo element, but could be confusing if you have overlapping pseudo elements that don't forma  tree<br>
&lt;dael> daniel: Do you have a solution that achieves expected result?<br>
&lt;astearns> https://drafts.csswg.org/css-pseudo-4/#highlight-painting<br>
&lt;dael> fantasai: If you read current ED...let me pull<br>
&lt;fantasai> https://drafts.csswg.org/css-pseudo-4/#highlight-painting<br>
&lt;fantasai> the topmost active highlight overlay redraws that text (and its decorations) over the highlight overlay backgrounds (and outlines, if any) using its own color, with currentColor representing the color of the next highlight pseudo-element layer below, falling back finally to that of the originating element (the colors that would otherwise be used<br>
&lt;dael> florian: You're solving by having currentColor behave normally but at used time fetch the correct color<br>
&lt;dael> fantasai: Second paragraph<br>
&lt;dael> daniel: As long as the resolution gets the expected result I'll be happy<br>
&lt;dael> fantasai: That's the intention<br>
&lt;dael> daniel: I'm fine with that. If I have an issue witht he wording I'll file a spec issue.<br>
&lt;dael> fantasai: I would really like review on this section<br>
&lt;dael> daniel: I'm happy to do it offline. I'll send you an email and then you can tell me if we need to have a followup<br>
&lt;dael> astearns: It would be good to have this convo in the issue<br>
&lt;dael> daniel: I'll keep the issue updated<br>
</details>


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

Received on Thursday, 10 January 2019 01:03:55 UTC