cattrap-0.6.0.0: Lays out boxes according to the CSS Box Model.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Graphics.Layout.Grid.CSS

Description

Infrastructure for parsing & desugaring grid-layout related CSS properties.

Synopsis

Documentation

data CSSGrid Source #

Parsed CSS Grid properties

Constructors

CSSGrid 

Fields

Instances

Instances details
PropertyParser CSSGrid Source # 
Instance details

Defined in Graphics.Layout.Grid.CSS

data Axis Source #

A grid axis.

Constructors

Row 
Col 

Instances

Instances details
Eq Axis Source # 
Instance details

Defined in Graphics.Layout.Grid.CSS

Methods

(==) :: Axis -> Axis -> Bool #

(/=) :: Axis -> Axis -> Bool #

data CSSCell Source #

Parsed CSS grid item properties.

Constructors

CSSCell 

Fields

Instances

Instances details
PropertyParser CSSCell Source # 
Instance details

Defined in Graphics.Layout.Grid.CSS

data Placement Source #

Identifies a cell in the CSS grid.

finalizeGrid :: PropertyParser x => CSSGrid -> Font' -> [CSSCell] -> [LayoutItem Length Length x] -> LayoutItem Length Length x Source #

Desugar grid properties to a grid layout.

type Areas = HashMap Text ((Int, Int), (Int, Maybe Int)) Source #

Mapping from area identifiers to bounding boxes.

parseASCIIGrid :: [[Text]] -> Int -> Areas -> Maybe Areas Source #

Converts a grid to lookup table start & indices for row & columns. Exported for the sake of testing