The overflow-clip-box-inline CSS property specifies relative to which box the clipping happens when there is an overflow — in the inline direction.
/* Keyword values */ overflow-clip-box-inline: padding-box; overflow-clip-box-inline: content-box; /* Global values */ overflow-clip-box-inline: inherited; overflow-clip-box-inline: initial; overflow-clip-box-inline: unset;
Note: On Gecko, by default, padding-box is used everywhere, but <input type="text"> and similar use the value content-box. Note that this property is activated by default only in the UA stylesheet and chrome contexts.
Value not found in DB!
padding-boxcontent-boxSyntax not found in DB!
<div class="things"> <input value="ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖ" class="scroll padding-box"> <div class="scroll padding-box"><span>ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖ</span></div> </div>
.scroll {
overflow: auto;
padding: 0 30px;
width: 6em;
border: 1px solid black;
background: lime content-box;
}
.padding-box {
overflow-clip-box-inline: padding-box;
}
function scrollSomeElements() {
var elms = document.querySelectorAll('.scroll');
for (i=0; i < elms.length; ++i) {
elms[i].scrollLeft=80;
}
}
var elt = document.queryElementsByTagName('body')[0];
elt.addEventListener("load", scrollSomeElements, false);
This property has been proposed to the W3C CSSWG; it is not yet on the standard track but, if accepted, should appear in CSS Overflow Module Level 3.
| Desktop | Mobile | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
overflow-clip-box-inline | Chrome No support No | Edge No support No | Firefox Full support 59 | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Edge Mobile No support No | Firefox Android Full support 59 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
text-overflow, white-space, overflow, overflow-x, overflow-y, clip, display