.dcss-bisect-left
Tells you where a value would go in a sorted list, before any items equal to it.
Example
Result
Markup
<link rel="stylesheet" href="dcss.css">
<link rel="stylesheet" href="families/array.css">
<figure class="dcss-bisect-left" style="--value: 2">
<ol>
<li style="--value: 1"></li>
<li style="--value: 2"></li>
<li style="--value: 2"></li>
<li style="--value: 4"></li>
</ol>
<output></output>
</figure>
Browser support
| Browser | Support |
|---|---|
| Chrome | Yes |
| Safari | Yes |
| Firefox | Whole numbers only |
See also
d3.bisectLeftin d3’s documentationbisectLeft()with CSS layout alone