Scroll Percentage Units - tomhodgins/process-css-demo GitHub Wiki

These units represent a 1% of either an element's scrollWidth or scrollHeight property.

Syntax

<number><unit>
  • <number> is any number CSS understands
  • <unit> is one of --sw, --sh

Usage

--sw

The --sw unit represents 1% of the element's scroll width, so a dimension like 10--sw would represent 10% of the element's scroll width:

height: 10--sw;

--sh

The --sh unit represents 1% of the element's scroll height, so a dimension like 10--sh would represent 10% of the element's scroll height:

font-size: 10--sh;
⚠️ **GitHub.com Fallback** ⚠️