.dcss-scale-quantize

Cuts a domain into equal parts and gives the item for the part a value falls in.

Example

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

<figure class="dcss-scale-quantize" style="--value: 0.8; --domain-0: 0; --domain-1: 1; --ranges: 3; --range-0: 'low'; --range-1: 'mid'; --range-2: 'high'">
  <output></output>
</figure>

Browser support

BrowserSupport
ChromeYes
SafariYes
FirefoxWhole numbers only

See also