-
Notifications
You must be signed in to change notification settings - Fork 661
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
[selectors] :autofill pseudo-class #5775
Comments
Can you clarify what exactly it matches? Like if an |
That is to-be-defined in whatwg/html#6181, but it shouldn't match when the user edits the value. All browsers agree on that. |
css-pseudo is for pseudo-elements, this is a pseudo-class, so I guess it would be in selectors? |
Would we also require that UA styling of autofilled form fields be done in CSS so that the author can override them? |
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic: [css-pseudo?] :autofill pseudo-class<dael> astearns: This is emilio who is likely not here <dael> github: https://github.com//issues/5775 <dael> tantek: Are there particual concerns? <dael> florian: GIven it exists and unlikely to be removed makes sense to have it. I'm wondering about privacy concern of it. Content of field isn't changed but if it is filled by a human or something saved might have privacy considerations <dael> fantasai: I feel there are other ways to get that information. If all forms are filled in a second it is autofill <dael> tantek: That does sound like a concern to raise. Sounds like :visited <dael> florian: Yes, jsut thinking about it. <dael> tantek: At a minimum I think it's excellent feedback. Maybe they can doc as potential privacy concern. <dael> tantek: It would be good to get that as feedback from the WG <dael> florian: I'll drop in GH <dael> fantasai: Should we resolve to add the pseudo class? <dael> astearns: Prop: Add an :autofill pseudoclass to selectors <dael> RESOLVED: : Add an :autofill pseudo-class to selectors |
No strong objection to this, but just a note: I think we should consider whether there are privacy implications to this, and whether we should do anything to mitigate them. Whether a browser autofills something depends on whether a user as visited a site before or nor, whether the user has saved some information for that particular type of field or not, etc. This feels like a (small) source of information about the user, as well as a potential source of finger printing. Admittedly, as @fantasai pointed out, sites can already infer that information by looking at whether forms field have been filled in withing less than 1 second of loading the site or something like that. At the same time, this would offer an easier way to access that information, which would work even when JS is turned off. This is probably not a fatal flaw, but it seems worth considering. |
I think at least Gecko doesn't auto-fill without user action, which mitigates the fingerprinting risk here, AIUI. |
Ok, I think the spec work here should be done in html. @frivoal do you need the issue open for the privacy tracker bits? Otherwise maybe we should close this. |
Oh, I guess we do have duplicate definitions for a bunch of these pseudo-classes in html/selectors... |
After removing the prefix, can the user overwrite the browser's default style? |
@emilio: |
I guess you are talking about styling inputs when the browser/user uses autocomplete, right? There already is a pseudo-class in CSS using input:-webkit-autofill {
-webkit-text-fill-color: white;
-webkit-box-shadow: 0 0 0 30px lightblue inset;
} Having to deal with An input:autofill {
color: white;
background-color: lightblue;
} I found some documentation on developer.mozilla.org with a code example using Edit:I found the use of
On caniuse.com the It would be nice if at least SCSS compiled input:autofill,
input:-webkit-autofill {
...
} And if the use of |
Can you elaborate? On Linux, on Nightly at least, what I see is that if I go to a page where I have credentials saved, I need to click on the I can ask around to see if it's somehow different across platforms or settings though. |
Ah, I got an answer back. Apparently we do autofill without user interaction, but:
This is also user-configurable via |
Thanks for the details. Should we any further discussion on privacy issues? I think the |
@emilio The default style of input:autofill in Firefox can cause errors in some page styles. Is there a similar problem in the newly implemented WebKit? https://login.taobao.com/member/login.jhtml 2021-07-05.10-48-07.mp4 |
@Iconejey Yes, we now have to use a very hacky method to overwrite Chrome's default style, because input:-webkit-autofill {
-webkit-box-shadow: 0 0 0 1000px #fff inset;
box-shadow: 0 0 0 1000px #fff inset;
} See Chrome Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=951476 |
See whatwg/html#6181 for the reasons why I think we should add this pseudo-class.
I think this is mostly uncontroversial, is there any reason people would think this is a bad idea / bad naming?
The text was updated successfully, but these errors were encountered: