Giter Club home page Giter Club logo

Comments (11)

emilio avatar emilio commented on June 24, 2024

cc @mfreed7 @josepharhar @annevk

from html.

mfreed7 avatar mfreed7 commented on June 24, 2024

Icky.

So the spec and MDN both say size doesn't apply to number inputs. I'm not sure if there was logic behind that decision? It does seem reasonable to me to expand it to include number inputs, but yeah I'd be concerned about compat.

from html.

emilio avatar emilio commented on June 24, 2024

@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 size.

from html.

mfreed7 avatar mfreed7 commented on June 24, 2024

@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 size.

Right, of course. I just meant that changing the layout size of <input type=number> based on attributes can be a source of breakage. The Firefox issue was about min/max, but I don't see a reason, a-priori, to assume that changes to the width based on size won't break something too. I don't think we have any use counter data measuring <input type=number size> usage. Do you have any data on this?

from html.

emilio avatar emilio commented on June 24, 2024

I do not. Happy to add it and come back here in a couple months if you want (but changing based on size is what I'd expect off-hand since that's what happens on most other text inputs)

from html.

annevk avatar annevk commented on June 24, 2024

cc @pxlcoder @nt1m

from html.

mfreed7 avatar mfreed7 commented on June 24, 2024

I do not. Happy to add it and come back here in a couple months if you want (but changing based on size is what I'd expect off-hand since that's what happens on most other text inputs)

Cool, thanks! I agree with the sentiment that it would make sense for size to work on number inputs, if it's web compatible.

from html.

annevk avatar annevk commented on June 24, 2024

Reading this thread again I'm not sure about doing 2 as size would be a presentational attribute here.

from html.

dbaron avatar dbaron commented on June 24, 2024

I think size is at the border of presentational versus semantic: as a semantic you could see it as saying "this is the number of characters that the input's value should be able to hold".

from html.

annevk avatar annevk commented on June 24, 2024

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:

  1. Make size conforming to use for <input type=number>.

from html.

emilio avatar emilio commented on June 24, 2024

Sure, consider that part of the proposal :)

from html.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.