Skip to content

[css-pseudo] Should probably have a note about it not being OK to have a UA ::selection rule #1122

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

Closed
bzbarsky opened this issue Mar 23, 2017 · 4 comments

Comments

@bzbarsky
Copy link

Maybe this is already covered by the "The UA should use the OS-default highlight colors when neither color nor background-color has been specified by the author." bit, in that such a rule should be ignored anyway?

But if it should not be ignored, then I think the interaction with https://compat.spec.whatwg.org/#the-webkit-text-fill-color makes it impossible to use one anyway, while keeping the current behavior of browsers. See https://bugzilla.mozilla.org/show_bug.cgi?id=234102#c60

@upsuper
Copy link
Member

upsuper commented Mar 24, 2017

I think CSSWG should adopt text-fill-color and make all places which is about text color use that property instead. It would make color a builtin variable which merely provides a "foreground color" but doesn't directly control anything.

@bzbarsky
Copy link
Author

I don't see how that solves the problem with ::selection interaction and current browser behavior....

@fantasai fantasai added the css-pseudo-4 Current Work label Mar 30, 2017
@fantasai
Copy link
Collaborator

@bzbarsky I thought we already had a note about this?

Note: This paired-cascading behavior does not allow using the normal cascade to represent the OS default selection colors. However it has been interoperably implemented in browsers and is thus probably a Web-compatibility requirement.

Is there something wrong with the note?

@fantasai
Copy link
Collaborator

I think this is the best I can do with the information I have currently. Feel free to file a new issue if some more specific fix is required.

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