.dcss-quantile

Gives the number a fraction p of the way through a list once it is sorted. A p of 0.5 is the median.

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" style="--p: 0.25">
  <ol>
    <li style="--value: 0"></li>
    <li style="--value: 10"></li>
    <li style="--value: 30"></li>
  </ol>
  <div>
    <div>
      <div>
        <output class="dcss-format-fixed" style="--value: var(--dcss-quantile); --precision: 1"></output>
      </div>
    </div>
  </div>
</figure>

Browser support

BrowserSupport
ChromeYes
SafariYes
FirefoxWhole numbers only

See also