~alcinnz/CatTrap

ref: d0a8a7d61e0a8340adcb597e0c8f94553dbaff81 CatTrap/Graphics/Layout/CSS.hs -rw-r--r-- 464 bytes
d0a8a7d6 — Adrian Cochrane Finish drafting shunting yard interpreter for calc(). 1 year, 9 months ago
                                                                                
09970dfc Adrian Cochrane
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Graphics.Layout.CSS where

import Graphics.Layout.Box
import Graphics.Layout

data CSSBox = CSSBox {
    boxSizing :: BoxSizing,
    cssBox :: PaddedBox (Double, String), -- Some units need to be resolved per font. calc()?
    -- Other layout-mode specific properties?
    -- Resolve font here so we can resolve those units?
}
data BoxSizing = BorderBox | ContentBox

instance PropertyParser CSSBox where
    ...

finalizeCSS :: CSSBox -> LayoutItem Length