.dcss-quantile-index

Tells you where the quantile p sits in a list, counting from 0.

Example

Result
Markup
<link rel="stylesheet" href="dcss.css">
<link rel="stylesheet" href="families/array.css">
<link rel="stylesheet" href="families/format.css">

<figure class="dcss-quantile-index" style="--p: 0.75">
  <ol>
    <li style="--value: 5"></li>
    <li style="--value: 1"></li>
    <li style="--value: 2"></li>
    <li style="--value: 3"></li>
    <li style="--value: 9"></li>
  </ol>
  <div>
    <div>
      <div>
        <output class="dcss-format-fixed" style="--value: var(--dcss-quantile-index); --precision: 0"></output>
      </div>
    </div>
  </div>
</figure>

Browser support

BrowserSupport
ChromeYes
SafariYes
FirefoxWhole numbers only

See also