-
Notifications
You must be signed in to change notification settings - Fork 642
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
[css-align][css-overflow] Specify treatment of border-box padding for text input elements #1717
Comments
The basic question is what the scrollable area is here. Is the padding inside the scrollable area, or outside? The actual behavior of at least Chrome is rather inconsistent here. For example, horizontal padding is not included in the scrollable area, but vertical padding is. In particular, the "chrome paints text over padding, and firefox paints padding over text" summary in whatwg/compat#81 is wrong as a blanket statement. See https://bugzilla.mozilla.org/show_bug.cgi?id=752790#c7 |
I don't think this has much to do with css-ui or This is either an overflow and/or an alignment problem. Retriaging accordingly. |
Btw, this can be observed (at least) using dev tools. |
That's unclear. The "padding" that browsers claim in their devtools doesn't actually behave like padding is defined to in CSS. |
Thanks for pointing me to css-overflow @frivoal. I'm submitting a ref test in I'm still not sure what the relevant spec change is and am looking for help on that. |
#1941 might be a duplicate of this. |
@frivoal @boazsender It doesn't seem to be an issue with overflow either. Changing the overflow value doesn't change the behavior of the text in Chrome and Safari for this specific case. @yachiehwu documented this clearly in #1941 and in https://bugzilla.mozilla.org/show_bug.cgi?id=752790#c29 |
I'm closing this in favor of #1941 which lays out a more cogent proposal for a spec change. |
@alijuma, @Hexcles and I are working to squash an old compatibility issue over on whatwg/compat#81 where firefox clips input text and chrome, safari and edge don't.
Section 3.1 of css-ui comes close to specifying this behavior but does not (thanks for pointing that out @alijuma): https://drafts.csswg.org/css-ui-3/#valdef-box-sizing-border-box
What do we think of adding language to this section to specify border-box text/padding interaction. Per our conversation on the other issue, I would suggest that the correct behavior is not to clip the text when the input
height
minus the inputpadding
minus the inputborder
is smaller than the height of the text. In other words, when the padding is too large, ignore it, or paint it behind the text.Here's what the compat issue looks like:
![ff-chrome-txt-height](https://user-images.githubusercontent.com/122117/29188784-480ea6b4-7de2-11e7-9e95-454d41d1569e.png)
CC @dbaron, @bzbarsky, @tabatkins, @frivoal
The text was updated successfully, but these errors were encountered: