Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-pseudo-4] UA must (instead of should) use the OS-default highlight colors ... #4785

Closed
TalbotG opened this issue Feb 18, 2020 · 3 comments

Comments

@TalbotG
Copy link
Collaborator

TalbotG commented Feb 18, 2020

If "Historically (and at the time of writing) only color and background-color have been interoperably supported."
coming from §3.2 Styling Highlights
https://www.w3.org/TR/css-pseudo-4/#highlight-styling

then I think the following statement can safely use a MUST and not a SHOULD:

"
The UA should use the OS-default highlight colors for ::selection when neither color nor background-color has been specified by the author.
"
coming from §3.4 Cascading and Per-Element Highlight Styles
https://www.w3.org/TR/css-pseudo-4/#highlight-cascade

@frivoal frivoal added the css-pseudo-4 Current Work label Feb 18, 2020
@frivoal
Copy link
Collaborator

frivoal commented Feb 18, 2020

OS-default highlight colors are not well defined, not really testable, and not even necessarily a thing that exists on all platforms. General purpose OSes will certainly have something, but special purpose devices might not.

All in all, I think “should” is fine, but I'll also note that this text is likely to evolve as a consequence of #4720

@TalbotG
Copy link
Collaborator Author

TalbotG commented Feb 19, 2020

OS-default highlight colors are not well defined,

OS-default highlight colors can be user-settable, therefore they can not be predictable. This was the case in Windows XP and it is the case in KDE3 and KDE4 (and probably other desktop environments and possibly with browser themes) in Linux.

not really testable

The repository has now 2 tests:
http://test.csswg.org/suites/css21_dev/nightly-unstable/html4/system-colors-001.htm
and
http://wpt.live/css/CSS2/ui/system-colors-001.xht
which is a manual test
and
http://wpt.live/css/css-color/parsing/system-color-valid.html

, and not even necessarily a thing that exists on all platforms. General purpose OSes will certainly have something, but special purpose devices might not.

I do not know about other OSes, other platforms and other devices. So I can not comment on this.

All in all, I think “should” is fine, but I'll also note that this text is likely to evolve as a consequence of #4720

My understanding is that #4720 only relates to presence of fill/stroke ... which only apply to SVG objects.

@fantasai
Copy link
Collaborator

@TalbotG is correct, the wording here is not as tight as it should be. I've switched it out to:

The UA must use its own highlight colors for ''::selection'' only when (and only when) neither 'color' nor 'background-color' has been specified by the author.

I believe this is what was meant.

There's an additional expectation that these colors should match the OS colors, but I'm not sure we need to impose that as a requirement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants