Skip to content

Commit

Permalink
Use UA styles rather than prose to define <input> clip
Browse files Browse the repository at this point in the history
The previous prose to make `overflow` act as `visible` with regards to other CSS features but still clip didn't work well with e.g. `text-overflow: ellipsis`. CSS now has a standard way to do what `input` buttons need, i.e. clip and also not affect interaction with `vertical-align`.

Fixes whatwg#9976.
  • Loading branch information
emilio authored Dec 18, 2023
1 parent 6bc6e2d commit f33d8b0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -131501,6 +131501,11 @@ input, select, button, textarea {
appearance: auto;
}

input:not([type=image i]) {
overflow: clip !important;
overflow-clip-margin: 0 !important;
}

input, select, textarea {
text-align: initial;
}
Expand Down Expand Up @@ -131540,11 +131545,6 @@ input:not([type=image i]), textarea { box-sizing: border-box; }</code></pre>

<ul>
<li><p>The <span>inner display type</span> is always 'flow-root'.</p></li>

<li><p>The <span>'overflow'</span> property is ignored, and always behaves as 'visible' for the
purpose of interaction with other CSS features (in particular, the <span>'vertical-align'</span>
property), but still clips any overflow at the border edge, and no scrolling mechanism is
displayed.</p></li>
</ul>


Expand Down

0 comments on commit f33d8b0

Please sign in to comment.