~alcinnz/CatTrap

ref: 074d5d9c1b8ad4db9d357fcce9076bd49413c4d9 CatTrap/Graphics/Layout/CSS.hs -rw-r--r-- 498 bytes
074d5d9c — Adrian Cochrane Finish drafting CSS4 Grid support! 1 year, 7 months ago
                                                                                
09970dfc Adrian Cochrane
c06fd552 Adrian Cochrane
09970dfc Adrian Cochrane
c06fd552 Adrian Cochrane
09970dfc Adrian Cochrane
3dce4d79 Adrian Cochrane
09970dfc Adrian Cochrane
3dce4d79 Adrian Cochrane
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module Graphics.Layout.CSS where

import Graphics.Layout.Box
import Graphics.Layout

data CSSBox = CSSBox {
    boxSizing :: BoxSizing,
    cssBox :: PaddedBox Unitted Unitted -- 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
type Unitted = (Double, String)

{-instance PropertyParser CSSBox where
    ...

finalizeCSS :: CSSBox -> LayoutItem Length-}