W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2016

[csswg-drafts] [css-pseudo] Can ::spelling-error and ::grammar-error occur anywhere?

From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
Date: Thu, 20 Oct 2016 06:46:34 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-184147867-1476945992-sysbot+gh@w3.org>
frivoal has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-pseudo] Can ::spelling-error and ::grammar-error occur 
anywhere? ==
https://drafts.csswg.org/css-pseudo/#highlight-selectors

Generally, spelling/grammar mistake markers are only expected in 
editable content. 

The behavior exhibited by chrome and safari (but not Firefox and Edge)
 in the following example feels like a bug to me. Something is 
editable and gets focused (and editted), so spelling mistakes get 
highlighted. Then when it is made non editable. I would expect the 
markers to go away, but they do not.

http://output.jsbin.com/caqusop

While I think that's wrong, there's nothing in the css-pseudo spec (or
 any other spec I am aware of) to support that opinion. Should there 
be?

Should we say that the ::spelling-error and ::grammar-error pseudos 
can only occur as children of editable elements, and the browsers must
 not highlight such things in non editable content?

Or should we instead say that browser can make them match anywhere, 
but mandate (or merely recommend?) a UA stylesheet that by default 
only highlights them when they are in editable content?
```
:read-write ::spelling-error {
  text-decoration: red dotted underline;
}
:read-write ::grammar-error {
  text-decoration: green dotted underline;
}
```

Or should we just leave it up to the UA, and report these against 
browsers separately not as a case of standards violation but as a case
 of bad UX?

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/623 using your GitHub 
account
Received on Thursday, 20 October 2016 06:46:41 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:04 UTC