0 | module Text.CSS.Length
5 | data Length : Type where
6 | Pt : Bits16 -> Length
7 | Px : Bits16 -> Length
8 | Em : Double -> Length
9 | Rem : Double -> Length
12 | Interpolation Length where
13 | interpolate (Pt x) = show x ++ "pt"
14 | interpolate (Px x) = show x ++ "px"
15 | interpolate (Em x) = show x ++ "em"
16 | interpolate (Rem x) = show x ++ "rem"
19 | pt : Cast Length a => Bits16 -> a
23 | px : Cast Length a => Bits16 -> a
27 | em : Cast Length a => Double -> a
31 | rem : Cast Length a => Double -> a
35 | (.pt) : Cast Length a => Bits16 -> a
39 | (.px) : Cast Length a => Bits16 -> a
43 | (.em) : Cast Length a => Double -> a
47 | (.rem) : Cast Length a => Double -> a