-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[forms] Number input intrinsic size. #10390
Comments
@mfreed7 the compat issue you linked is tangential to whether number inputs respect the size attribute. I've never seen a compat issue on Firefox for respecting |
Right, of course. I just meant that changing the layout size of |
I do not. Happy to add it and come back here in a couple months if you want (but changing based on |
See whatwg/html#10390 for the spec issue. Differential Revision: https://phabricator.services.mozilla.com/D212545 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1898214 gecko-commit: cd09151a1c46cba9d56b45684eebc6465a5e869c gecko-reviewers: smaug
Cool, thanks! I agree with the sentiment that it would make sense for |
…>. r=smaug See whatwg/html#10390 for the spec issue. Differential Revision: https://phabricator.services.mozilla.com/D212545
See whatwg/html#10390 for the spec issue. Differential Revision: https://phabricator.services.mozilla.com/D212545 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1898214 gecko-commit: 7fdc398eba165528948b2abf22341424a4d6cd3e gecko-reviewers: smaug
…>. r=smaug See whatwg/html#10390 for the spec issue. Differential Revision: https://phabricator.services.mozilla.com/D212545
See whatwg/html#10390 for the spec issue. Differential Revision: https://phabricator.services.mozilla.com/D212545 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1898214 gecko-commit: 7fdc398eba165528948b2abf22341424a4d6cd3e gecko-reviewers: smaug
Reading this thread again I'm not sure about doing 2 as |
I think |
That's fair and it seems like we haven't attempted to make it non-conforming generally, but then the proposal would have to include:
|
Sure, consider that part of the proposal :) |
…>. r=smaug See whatwg/html#10390 for the spec issue. Differential Revision: https://phabricator.services.mozilla.com/D212545
…>. r=smaug See whatwg/html#10390 for the spec issue. Differential Revision: https://phabricator.services.mozilla.com/D212545
So the spec seems to account for something like this here. I still think that the |
Should it end up with a different width because of the inline number manipulation buttons? I noticed that in Firefox cc @whatwg/forms |
Yes, that is fixed already fwiw: https://bugzilla.mozilla.org/show_bug.cgi?id=1905743 |
That's what you get for testing with a July 2 Nightly. I think it's reasonable to add this, but I don't think editing just that section is enough. You also need to make |
What is the issue with the HTML Standard?
We just found out that Blink and WebKit have some magic default sizing behavior for
<input type=number>
, derived from the min / max attributes:In particular:
size
seems to be ignored.min
andmax
, and the step is notany
, then you infer a size based on "sign + max digits + dot (if needed) + decimals (if needed)". The logic seems to come from WebKit so it matches in both.So, I think inferring
size
from min / max if possible makes sense. However, I think disregardingsize
otherwise feels wrong?My proposal would be to:
Standardize the WebKit/Blink
min
/max
behavior. It's not pretty but it makes sense I guess.Standardize the Firefox
size
behavior (that is, still honorsize
if present, probably with higher priority thanmin
/max
, but I guess either order works).Would something like that feel palatable? The first is probably a requirement for compat, but
<input type=number size="N">
getting completely ignored seems unfortunate otherwise.The text was updated successfully, but these errors were encountered: