<!DOCTYPE HTML>
<!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/publicdomain/zero/1.0/
-->
<html><head>
  <meta charset="utf-8">
  <title>Test: INPUT type=range percent intrinsic inline-size</title>
  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1513959">
  <link rel="help" href="https://drafts.csswg.org/css-sizing-3/#percentage-sizing">
  <link rel="help" href="https://drafts.csswg.org/css-sizing-3/#min-content-zero">
  <link rel="match" href="range-percent-intrinsic-size-1-ref.html">
  <style>
html,body {
  color:black; background-color:white; font:16px/1 monospace;
}

input { margin: 2px; }

input.i {
  width: 50%;
  min-width: -moz-min-content;
  min-width: min-content;
  background: lime;
}

input.mi {
  max-width: 50%;
  min-width: -moz-min-content;
  min-width: min-content;
  background: lime;
}

input.i.min-auto, input.mi.min-auto {
  min-width: auto;
}

.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: flex;
  border: 1px solid pink;
}
.innerFlex > input {
  width: 50%;
  flex: 1;
  background: yellow;
  -moz-appearance: none;
  -webkit-appearance: none;
}

</style></head><body>

<div style="width:30px"><div>
  <input type="range" class="i">
</div></div>

<div style="width:200px"><div>
  <input type="range" class="i">
</div></div>

<div class="grid" style="grid-template-columns:minmax(min-content,30px)">
  <input type="range" class="i">
</div>

<div class="grid" style="grid-template-columns:minmax(auto,30px)">
  <input type="range" class="i">
</div>

<div class="grid" style="grid-template-columns:minmax(auto,30px)">
  <input type="range" class="i min-auto">
</div>

<div style="width:30px"><div>
  <input type="range" class="i n">
</div></div>

<div class="grid" style="grid-template-columns:minmax(min-content,30px)">
  <input type="range" class="i n">
</div>

<div class="grid" style="grid-template-columns:minmax(auto,30px)">
  <input type="range" class="i n">
</div>

<div class="grid" style="grid-template-columns:minmax(auto,30px)">
  <input type="range" class="i n min-auto">
</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>
  <input type="range" class="mi n min-auto">
</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="grid-template-columns:minmax(auto,30px)">
  <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>
