w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.5k stars 661 forks source link

[css-ui] Should appearance: textfield with <input type=number> hide number spinner? #7226

Open nt1m opened 2 years ago

nt1m commented 2 years ago

https://drafts.csswg.org/css-ui-4/#valdef-appearance-textfield defines that <input type=search> should look like <input type=text> with appearance: textfield. Should it be the same for <input type=number>.

data:text/html,<input type=number style="appearance: textfield"> hides the spinner only in Firefox. Safari and Chrome render it with the spinner.

nt1m commented 2 years ago

cc @zcorpan @emilio

emilio commented 2 years ago

Well, in Chromium and Safari there are other ways to hide the spinner (using pseudo-elements). We had to keep this on Gecko for compat, when implementing appearance: auto.

zcorpan commented 2 years ago

I think the pseudo-elements should probably be standardized (maybe with -webkit- aliases). If that happens and is implemented in Gecko, would be compatible to remove the appearance: textfield hides spinner behavior?

emilio commented 2 years ago

Maybe / maybe not? I'm not sure the DOM structure matches between Gecko and WebKit/Blink so it might not be trivial to standardize the pseudo-elements.