Re: [csswg-drafts] [css-pseudo-4] styling the spelling error marker

The Working Group just discussed `Styling the ::spelling-error marker`, and agreed to the following resolutions:

* `RESOLVED: Specify that custom styling of the underline overrides the UA-rendered underline (not just adds to it). Details to be determined in a separate issue.`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: Styling the ::spelling-error marker<br>
&lt;TabAtkins> GitHub: https://github.com/w3c/csswg-drafts/issues/1828<br>
&lt;TabAtkins> florian: In Pseudo4 we have ::spelling-error and ::grammar-error. The spec doesn't say that the browser is supposed to use these to put their own markers.<br>
&lt;TabAtkins> florian: So technically it's valid for your outlines to *add* to the browser UI, not replace.<br>
&lt;TabAtkins> florian: So the spec needs to state that...<br>
&lt;fantasai> +1 to Florian's proposal<br>
&lt;fantasai> to require that UA styles are expressed in this manner<br>
&lt;TabAtkins> florian: Maybe do UA stylesheet to mandate what they look like by default, or just say that the UA one has to use ::spelling-error<br>
&lt;TabAtkins> TabAtkins: Don't mandate the UA style, let it do whatever. But definitely mandate that it replaces.<br>
&lt;TabAtkins> myles: The existing markers don't necessarily map to something in CSS, so we can't do it precisely in the UA stylesheet.<br>
&lt;TabAtkins> myles: For example, the MacOS style is under-dots with a gradient inside, and we try hard to make sure there's never a partial dot.<br>
&lt;tantek> q+<br>
&lt;TabAtkins> florian: Okay, so how to specify it?<br>
&lt;fantasai> I don't think making sure there's never a partial dot is incompatible with CSS<br>
&lt;TabAtkins> florian: Any property specified, it shuts down the native one?<br>
&lt;fantasai> CSS doesn't mandate dot spacing, leaves it up to the UA so that it can do exactly these things<br>
&lt;TabAtkins> florian: That seems too much, they might just want to do the color.<br>
&lt;TabAtkins> myles: Adjusting the color of our dots isn't possible. It should be just like 'outline'.<br>
&lt;TabAtkins> TabAtkins: Agreed.<br>
&lt;astearns> ack tantek<br>
&lt;TabAtkins> fremy: Yes, it should also have a value that means "native", just like outline.<br>
&lt;TabAtkins> tantek: Agreed as well, it's also like borders - the natives might look more special than you can get with built-in stuff.<br>
&lt;TabAtkins> tantek: The key aspect here is normative text that says "if you draw it normally, don't draw it when CSS specifies one".<br>
&lt;TabAtkins> astearns: And we can agree on that text regardless of whether UAs can specify something today.<br>
&lt;dbaron> Tantek was also pointing out to me that what myles described with the dots sounds like a new underline style<br>
&lt;TabAtkins> florian: So is that sufficient? If you set color, does that count as "CSS-drawn"?<br>
&lt;fantasai> "Any styling provided by the author must override, not duplicate, any particular aspect of the UA's default styling, even if the exact characteristics of that styling are not expressable in CSS."<br>
&lt;TabAtkins> myles: That seems like a clear intent that they want a pink error, should switch to the CSS one.<br>
&lt;TabAtkins> florian: So what happens then? What style?<br>
&lt;TabAtkins> TabAtkins: The default one.<br>
&lt;TabAtkins> florian: The default is "none".<br>
&lt;tantek> "text-decoration-style:system-spelling-error"<br>
&lt;TabAtkins> fantasai: Cant' change the default value - it's 'text-decoration', used more widely than just ::spelling-error.<br>
&lt;TabAtkins> fremy: We can say that the default pixel is "1px wavy red" in the UA stylesheet, and the browser is free to render whatever way it wants...<br>
&lt;TabAtkins> fremy: Say that if you don't override anything you get the UA rendering, but if you override something you get the other values defined in the spec.<br>
&lt;TabAtkins> florian: Model after outline-style:auto which lets UA do whatever, or is the same as solid. We could do somethign similar here, with t-d-s: auto, which can do what it wants, or fall back to wavy.<br>
&lt;tantek> or even just text-decoration: system-spelling-error<br>
&lt;tantek> since it may affect color/style/etc.<br>
&lt;TabAtkins> florian: Only problem is that then you can use the spelling-error style on any element.<br>
&lt;TabAtkins> TabAtkins: Is taht a problem?<br>
&lt;gregwhitworth> this sounds like possibly an option for env()<br>
&lt;tantek> and there may be no way to decompose the system-spelling-error "look" into components<br>
&lt;TabAtkins> florian: No, I think it's useful, so you can do your own spelling marking in JS or something and have it match with native.<br>
&lt;gregwhitworth> env(spelling-error)<br>
&lt;tantek> same with text-decoration: system-grammar-error<br>
&lt;TabAtkins> astearns: So it sounds like we want to add a system-spelling-error style for text-decoration.<br>
&lt;tantek> just thinking off the top of my head<br>
&lt;TabAtkins> myles: We have a new concern, and have the WK person implementing this.<br>
&lt;tantek> please consider these proposals with a grain of salt. or is that sand. I forget.<br>
&lt;TabAtkins> Daniel: So are you proposing these for each of the error types?<br>
&lt;tantek> haven't through through the connotations for the cascade, but similar to outline right?<br>
&lt;TabAtkins> florian: Just the two.<br>
&lt;TabAtkins> TabAtkins: We only recognzie two with pseudo-elements so far.<br>
&lt;TabAtkins> Daniel: Sounds great to opt into the system-spelling one.<br>
&lt;TabAtkins> Daniel: What if they want to style the errors and achieve the look of the system one.<br>
&lt;TabAtkins> Daniel: So on Mac the spelling errors are always drawn beneath existing text decorations, so if you have underlines, the spelling markers are put below them.<br>
&lt;TabAtkins> Daniel: How do you achieve the same effect?<br>
&lt;TabAtkins> florian: No problem here, I think. The underline isn't set on the spelling error, it's set on some parent element. The spelling error decoration is set on ::spelling-error.<br>
&lt;dbaron> maybe somebody should write up what the proposal is and we should come back to it once people had a chance to read and ask questions?<br>
&lt;astearns> +1<br>
&lt;TabAtkins> Daniel: I specifically mean if you just want, say, a black wavy underline, but definitely underneath the existing underline.<br>
&lt;TabAtkins> fantasai: We have a control for that in Text level 4.<br>
&lt;TabAtkins> florian: text-underline-offset.<br>
&lt;florian> https://drafts.csswg.org/css-text-decor-4/#underline-offset<br>
&lt;TabAtkins> Daniel: Okay, so that would allow offsetting.<br>
&lt;TabAtkins> fantasai: Yeah. The "auto" value is different tho - "auto" just means "UA decides on the offset appropriately", and can use text information or something.<br>
&lt;TabAtkins> fantasai: Currently can't pay attention to other decorations to avoid overlapping, we would need another value for that.<br>
&lt;TabAtkins> astearns: So we're going to resolve that if the ::spelling-error has t-d styles, we'll use CSS drawing for that, and override the system-level decoration.<br>
&lt;tantek> q+ dbaron<br>
&lt;TabAtkins> dbaron: I think that might need to be specific to certain properties.<br>
&lt;tantek> ack dbaron<br>
&lt;TabAtkins> dbaron: Dont' want it to happen just if the selector exists, want specific properties to be specified.<br>
&lt;TabAtkins> florian: The proposal was to have a t-d value of "system-spelling-error" that gives magic rendering, and if that gets overridden, it uses CSS rendering instead.<br>
&lt;tantek> btw feel free to bikeshed the value. e.g. env-spelling-error and env-grammar-error<br>
&lt;tantek> etc.<br>
&lt;TabAtkins> TabAtkins: So back to what dbaron said in the chat, can we get the actual new proposal in the issue, and reoslve on it next week?<br>
&lt;tantek> I have no attachmen to any particular name, presented straw-name only to illustrate concept<br>
&lt;gregwhitworth> I must have missed this - but who is asking for this?<br>
&lt;gregwhitworth> ^ the feature as a whole<br>
&lt;TabAtkins> astearns: Yeah, can we resolve to just do the UA overriding?<br>
&lt;tantek> ok with that<br>
&lt;TabAtkins> RESOLVED: Specify that custom styling of the underline overrides the UA-rendered underline (not just adds to it). Details to be determined in a separate issue.<br>
</details>


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

Received on Wednesday, 4 October 2017 23:40:09 UTC