<!DOCTYPE HTML>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html><head>
<meta charset="utf-8">
<title>Reference: INPUT type=range percent intrinsic inline-size</title>
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1513959">
<style>
html,body {
color:black; background-color:white; font:16px/1 monospace;
}
input { margin: 2px; }
input.i {
min-width: 0;
background: lime;
}
input.mi {
min-width: 0;
max-width: 100%;
width: max-content;
background: lime;
}
.n {
-webkit-appearance: none;
}
div {
display: inline-block;
border:1px solid;
}
.grid {
display: inline-grid;
grid: auto / min-content;
place-items: start;
}
.outerFlex {
display: flex;
width: 100px;
border: 1px solid black;
}
.innerFlex {
display: grid;
border: 1px solid pink;
}
.innerFlex > input {
min-width: 0;
justify-self: stretch;
background: yellow;
-moz-appearance: none;
-webkit-appearance: none;
}
</style></head><body>
<div style="width:30px"><div style="width:28px">
<input type="range" class="i" style="width:14px; margin-right:0">
</div></div>
<div style="width:200px"><div style="">
<input type="range" class="i" style="max-width:50%">
</div></div>
<div class="grid" style="grid-template-columns:30px">
<input type="range" class="i" style="width:15px">
</div>
<div class="grid" style="grid-template-columns:30px">
<input type="range" class="i" style="width:15px">
</div>
<div class="grid" style="grid-template-columns:30px">
<input type="range" class="i min-auto" style="width:15px">
</div>
<div style="width:30px"><div style="width:28px;">
<input type="range" class="i n" style="width:14px; margin-right:0">
</div></div>
<div class="grid" style="grid-template-columns:30px">
<input type="range" class="i n" style="width:15px">
</div>
<div class="grid" style="grid-template-columns:30px">
<input type="range" class="i n" style="width:15px">
</div>
<div class="grid" style="grid-template-columns:30px">
<input type="range" class="i n min-auto" style="width:15px">
</div>
<br>
<br>
<div style="width:30px"><div>
<input type="range" class="mi">
</div></div>
<div class="grid">
<input type="range" class="mi">
</div>
<div class="grid" style="grid-template-columns:minmax(min-content,30px)">
<input type="range" class="mi">
</div>
<div class="grid" style="grid-template-columns:minmax(auto,30px)">
<input type="range" class="mi">
</div>
<div style="width:30px"><div>
<input type="range" class="mi n">
</div></div>
<div style="width:30px"><div style="width:max-content">
<input type="range" class="mi n" style="width:50%">
</div></div>
<div class="grid">
<input type="range" class="mi n">
</div>
<div class="grid" style="grid-template-columns:minmax(min-content,30px)">
<input type="range" class="mi n">
</div>
<div class="grid" style="grid-template-columns:minmax(auto,30px)">
<input type="range" class="mi n">
</div>
<div class="grid" style="width:30px; grid-template-columns:15px">
<input type="range" class="mi n min-auto">
</div>
<br>
<br>
<div class="outerFlex">
<div class="innerFlex">
<input type="range">
</div>
abc
</div>
</body></html>