Re: [csswg-drafts] [css-text-decor] [css-pseudo] default ‘text-decoration-color’ of ‘spelling-error’ and ‘grammar-error’ (#7522)

The CSS Working Group just discussed `[css-text-decor] [css-pseudo] default ‘text-decoration-color’ of ‘spelling-error’ and ‘grammar-error’`, and agreed to the following:

* `RESOLVED: other text decoration properties don't apply when native text-decoration-styles are in effect`

<details><summary>The full IRC log of that discussion</summary>
&lt;emilio> schenney: UA sheets need to specify a color for spelling / grammar markers<br>
&lt;Rossen_> q?<br>
&lt;emilio> ... no way to specify the platform-appropriate color to account for hcm etc<br>
&lt;emilio> q+<br>
&lt;myles> q+<br>
&lt;hober> ack emilio<br>
&lt;bramus> emilio: that is what system colors are for?<br>
&lt;Rossen_> ack myles<br>
&lt;emilio> emilio: in gecko we use internal system colors for this<br>
&lt;emilio> ... if we come up with a good name it seems it'd be ok to expose it?<br>
&lt;emilio> myles: our spelling and grammar dots are images, not just solid colors<br>
&lt;schenney> q+<br>
&lt;emilio> ... so I'm not convinced we should expose this through system colors<br>
&lt;emilio> ... also not sure there's a use case to use the system color but not the system design<br>
&lt;Rossen_> ack fantasai<br>
&lt;florian> q+<br>
&lt;emilio> fantasai: I think when we brought the issue there were three options: (1) text-decoration-color don't apply without a style (2) add text-decoration-color: auto and make it compute to something<br>
&lt;emilio> q+<br>
&lt;Rossen_> ack schenney<br>
&lt;emilio> ... I'd be ok with saying you can't use t-d-c unless you also specify style<br>
&lt;fantasai> s/to something/depending on the text-decoration-line value/<br>
&lt;emilio> schenney: I agree that using the system design is probably better<br>
&lt;emilio> ... but if we use a color can we pick a good one?<br>
&lt;Rossen_> ack schenney<br>
&lt;emilio> myles: how do we know to pick a good or bad color?<br>
&lt;emilio> fantasai: the original intention for text-decoration-style: spelling-error/grammar-error was to accommodate for platforms where it's not a simple style<br>
&lt;fremy> @florian, use the mike :P<br>
&lt;emilio> florian: agreed, color should just do nothing for those text-decoration-style values<br>
&lt;Rossen_> ack<br>
&lt;Rossen_> q<br>
&lt;Rossen_> ack *<br>
&lt;Rossen_> ack florian<br>
&lt;Rossen_> ack emilio<br>
&lt;bramus> emilio: is this parallel to how we deal with outline style? and right now there are differences in how browsers deal with that. I tihnk it should be possible for a browser to not use text-decoration-color or their native style<br>
&lt;bramus> florian: yes, that is allowed<br>
&lt;florian> qq+<br>
&lt;GameMaker> q+<br>
&lt;bramus> emilio: do we allow uas to use it? e.g. ??? have their outline derived from sth else. do we want to allow this for this styles or say just no?<br>
&lt;Rossen_> ack florian<br>
&lt;Zakim> florian, you wanted to react to emilio<br>
&lt;bramus> florian: UA is allowed to but not required<br>
&lt;bramus> emilio: is myles fine with that? or should we say text deco color explicitly has no effect?<br>
&lt;schenney> q+<br>
&lt;emilio> ack GameMaker<br>
&lt;Rossen_> ack GameMaker<br>
&lt;emilio> GameMaker: with our current grammar error is blue dots, is that ok?<br>
&lt;emilio> fantasai: yes<br>
&lt;nicole> q+<br>
&lt;emilio> GameMaker: I don't know if I can speak to this but if our designers wanted to take this into account, to draw  orange dots if the author specified that, would that be fine?<br>
&lt;Rossen_> ack fantasai<br>
&lt;emilio> florian: that's what the spec says right now<br>
&lt;emilio> fantasai: the spec is very flexible now, the downside to not forbidding it is that authors might expect it to have an effect based on the browser they're testing it<br>
&lt;emilio> ... let's say mozilla implements it and allows it, then firefox and chrome do that<br>
&lt;emilio> ... they put something on a blue background and use text-decoration-color: orange<br>
&lt;florian> q+<br>
&lt;emilio> ... then safari users get blue on blue<br>
&lt;Rossen_> ack schenney<br>
&lt;emilio> ... not sure that's worth locking it down more or not<br>
&lt;emilio> schenney: curious, say chromium on mac wanted to match the macOS platform<br>
&lt;emilio> ... we could have a system color and we'd be ok not defining that color<br>
&lt;emilio> fantasai: if we're going to honor the color automatically but not all the time then we need a keyword to distinguish<br>
&lt;emilio> q+<br>
&lt;ntim> q+<br>
&lt;emilio> nicole: it seems something where what's good for the user might be different from what's good for the developer<br>
&lt;emilio> ... user probably wants to match the OS<br>
&lt;Rossen_> ack nicole<br>
&lt;emilio> ... then there's a developer need<br>
&lt;emilio> ... to change it if needed<br>
&lt;bramus> q+<br>
&lt;Rossen_> ack florian<br>
&lt;emilio> ... is that the case? if so it might be worth doing something like with accent-color<br>
&lt;emilio> florian: going back to fantasai's example, that's one case where it might be needed to break the convention<br>
&lt;emilio> ... if the apple folks have blue dots, they need to deal with blue backgrounds in some way<br>
&lt;hober> q?<br>
&lt;emilio> nicole: I'm thinking something about grammarly when they might have more sophisticated than what browsers provide<br>
&lt;emilio> florian: but they can either pick the default platform style, but changing text-decoration-style is already available<br>
&lt;emilio> hober: the grammarly case is handled by customizing it<br>
&lt;schenney> q+<br>
&lt;bramus> q-<br>
&lt;Rossen_> ack fantasai<br>
&lt;Zakim> fantasai, you wanted to react to florian<br>
&lt;emilio> fantasai: yeah grammarly could use the default grammar style<br>
&lt;emilio> ... or they could change the style<br>
&lt;emilio> nicole: so authors can't opt into the ua style?<br>
&lt;emilio> myles: they can, but they either get all of the magic or none of the magic<br>
&lt;Rossen_> q?<br>
&lt;emilio> ... we object to a middle ground where you get some of the magic<br>
&lt;emilio> florian: the other thing is you can also select based on the element to opt in or out of the native style<br>
&lt;emilio> nicole: how would they do it if you want to ensure contrast?<br>
&lt;emilio> florian: if you know the background you can get the color<br>
&lt;emilio> ... otherwise you set the background style to the UA and hope the UA does a good job at it<br>
&lt;Rossen_> ack emilio<br>
&lt;emilio> Rossen_: the problem nicole is describing is a lot more general<br>
&lt;bramus> emilio: the current spec seems fine. but we need to be careful with compat. Also see what fantasai said a while ago.<br>
&lt;bramus> … the defualt sstyle should work on any bg<br>
&lt;bramus> … if images need a different order; thats how native outlines work as well.<br>
&lt;emilio> ntim: I think it'd make sense to behave like outline-style: auto where the color is ignored<br>
&lt;bramus> emilio: the point is that there are browsers that can customize. e.g/ firefox uses AccentColor for the native outline-style<br>
&lt;Rossen_> ack ntim<br>
&lt;bramus> myles: I dont understand<br>
&lt;bramus> emilio: the whole point of this discussion is to determien if uas are allowed or not to change the rendering of their native grammar styles based on text-deco-color<br>
&lt;florian> qq+<br>
&lt;bramus> … right now they are allowed. q is should we restrict it<br>
&lt;bramus> … some browsersa llow to change the color, some dont<br>
&lt;bramus> … the ones that allow it do it in different ways<br>
&lt;bramus> …. are we fine with that? more grammar styles or not?<br>
&lt;bramus> ntim: (missed)<br>
&lt;bramus> emilio: in firefox we allow you to customize the AccentColor, but default it is the OS one<br>
&lt;astearns> s/(missed)/outline-color does not change the color of the built-in outline<br>
&lt;astearns> (I think)<br>
&lt;bramus> ntim: I guess speellin-error ang rammer-error would be up to the ua<br>
&lt;bramus> … maybe that’s all up to them?<br>
&lt;bramus> emilio: that is the q<br>
&lt;bramus> ntim: (missed2)<br>
&lt;emilio> ntim: I think customizing it via text-decoration-color would be a mistake<br>
&lt;Rossen_> q?<br>
&lt;Rossen_> ack florian<br>
&lt;Zakim> florian, you wanted to react to ntim<br>
&lt;emilio> florian: I don't think this is the question. That's already allowed in the spec, the question is "can we do something with the color"<br>
&lt;emilio> ... and it seems answer is no<br>
&lt;emilio> schenney: I was hoping to propose a resolution<br>
&lt;emilio> ... q is "should the browser and the author agree and define custom grammar markers"<br>
&lt;emilio> ... seems like we want the UA to allow any current color<br>
&lt;Rossen_> ack schenney<br>
&lt;bramus> emilio: no<br>
&lt;Rossen_> ack florian<br>
&lt;Rossen_> ack fantasai<br>
&lt;emilio> fantasai: we're looking at several options<br>
&lt;emilio> ... (1) no spec change, ua may interpret text-decoration-line: grammar-error using the system pattern and color<br>
&lt;emilio> ... but they can honor text-decoration-color<br>
&lt;emilio> ... if you are a UA that doesn't want to allow customization you ignore all t-d props<br>
&lt;emilio> ... but otherwise is when the author has set a color you honor<br>
&lt;emilio> ... the q is what is "when the author has set a color"<br>
&lt;emilio> ... t-d-c: currentColor? Something else?<br>
&lt;emilio> ... that's not clear<br>
&lt;emilio> ... So we can say t-d-c doesn't affect t-d-s: grammar-error<br>
&lt;emilio> ... or we say t-d-c allow t-d-c but provide a magic t-d-c: auto or something<br>
&lt;florian> q+<br>
&lt;schenney> q+<br>
&lt;emilio> ... third option is introducing new system colors<br>
&lt;emilio> ... doesn't seem we're going with that<br>
&lt;emilio> q+<br>
&lt;emilio> fantasai: but we should pick between the other two options<br>
&lt;ntim> I'm in favor of "Don't allow text-decoration-color to affect spelling/grammar errors."<br>
&lt;Rossen_> ack florian<br>
&lt;emilio> florian: for the UAs that want to ignore it the spec is fine but for the others it's not entirely clear what should happen<br>
&lt;emilio> ... so adding a normal/auto initial kw for t-d-c<br>
&lt;emilio> ... sounds useful<br>
&lt;emilio> fantasai: right but we want to go to the question of "do we want to allow that"<br>
&lt;Rossen_> ack schenney<br>
&lt;emilio> schenney: I think authors would be confused at not being able to specify the color<br>
&lt;emilio> fantasai: but they can't<br>
&lt;emilio> schenney: if you specify ::grammar-error {}<br>
&lt;ntim> q+<br>
&lt;emilio> fantasai: ::grammar-error {} has text-decoration-style: grammar-error, but I can also style it on an `&lt;u>` element<br>
&lt;emilio> ... and then I'd get that style<br>
&lt;emilio> ... if I want to style `::grammar-error {}` and I want a pink double underline I can set `text-decoration: pink double-underline` and that's already<br>
&lt;emilio> ... but if I do `u { text-decoration: grammar-error; text-decoration-color: pink }`<br>
&lt;emilio> ... do I get a pink styling<br>
&lt;Rossen_> q?<br>
&lt;astearns> my vote is to disallow UA-provided decorations to respond to CSS property values<br>
&lt;emilio> ... so if we allow it to be influenced by text-decoration-color we need something to differentiate<br>
&lt;emilio> schenney: I see in that case I'd vote to disallow t-d-c to influence t-d-s: grammar-error<br>
&lt;bramus> emilio: there is an alteratnive to providing a new value for tdc, similar to borders. ua already has meachnism to see if author specified a new value.<br>
&lt;bramus> … seems we are arriving to consensus of not allowing tdc to influence it<br>
&lt;Rossen_> ack emilio<br>
&lt;Rossen_> ack ntim<br>
&lt;bramus> ntim: I agree with not allowing<br>
&lt;florian> Option 1: disallow taking the color into account<br>
&lt;florian> Option2: allow it and introduce a initial value (auto or normal) to text-decoration-color. When that value is specified, do whatever the platform want, if some other color is specified, the UA may take it into account.<br>
&lt;emilio> option3: Use the same UA magic for appearance and borders/backgrounds<br>
&lt;ntim> +1 to that<br>
&lt;schenney> +1<br>
&lt;emilio> fantasai: proposal is for native text decorations none of the other t-d properties apply<br>
&lt;bramus> emilio: do we wan tto do color or also offsets and stuff?<br>
&lt;bramus> florian: nothing<br>
&lt;bramus> s/florian/fantasai<br>
&lt;emilio> s/florian:/fantasai:<br>
&lt;emilio> RESOLVED: other text decoration properties don't apply when native text-decoration-styles are in effect<br>
</details>


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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 19 July 2023 17:46:25 UTC