Module sauron::prelude::units [−][src]
Expand description
provides function and macro for html units such as px, %, em, etc.
Functions
Relative to the width of the “0” (zero)
centimeters
Relative to the font-size of the element (2em means 2 times the size of the current font)
Relative to the x-height of the current font (rarely used)
inches (1in = 96px = 2.54cm)
milimeters
picas (1pc = 12 pt)
percentage
points (1pt = 1/72 of 1in)
pixels (1px = 1/96th of 1in)
1q is equivalent to 1/40th of 1cm.
Relative to font-size of the root element
Relative to 1% of the height of the viewport*
Relative to 1% of the width of the viewport*