Re: box-sizing and text in value attribute of input element

> On 18 Nov 2014, at 21:30, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
> On Tue, Nov 18, 2014 at 12:20 PM, Greg Whitworth <gwhit@microsoft.com> wrote:
>>> That's a harder question.  We need to figure out what behavior is sane, and
>>> what we can converge on, if any.  I don't have the ability to easily test IE for
>>> this case right now, but getting that data would help; it'll either tell us that
>>> there's no compat whatsoever and we can probably do what we want, or it'll
>>> lean towards one behavior being something we should prefer.
>> 
>> Here is a comparison of FF/Chrome/IE: http://imgur.com/jTkVSk5
> 
> Okay, so IE is acting like I'd expect - the shadow contents of the
> <input> are overflow:visible by default, and so we see the "hi", just
> offset below the top padding.
> 
> With Boris' explanation that they use overflow-clip-box on <input>s to
> make it clip to the content box, FF's behavior also makes sense - it's
> doing the same thing as IE, just with an additional clip that prevents
> you from seeing anything.
> 
> It's just Chrome's behavior that looks like hardcoded wackiness.

Another thing that seemed whacky to me in chrome (even though it might have a perfectly reasonable explanation I just failed to notice) is that while input was shown as overflowing into the padding when there is enough padding, if you make the vertical dimension just small enough, the whole thing disappears.

For instance at 6px, it shows:
http://jsbin.com/pakihiqoti/1/edit

at 5px it’s gone:
http://jsbin.com/voqujibiqu/1/edit

 - Florian

Received on Tuesday, 18 November 2014 22:44:31 UTC