Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Datastructures for parsing table styling properties, & for positioning cells into Grid layout regions.
Synopsis
- type Overflowed = [Int]
- emptyRow :: Overflowed
- commitRow :: Overflowed -> Overflowed
- allocCol :: Int -> Overflowed -> Int
- insertCell :: Int -> Int -> Int -> Overflowed -> Overflowed
- data TableOptions = TableOptions {}
- finalizeGap :: TableOptions -> Font' -> (Length, Length)
- type UPaddedBox = PaddedBox Unitted Unitted
- collapseBorders :: TableOptions -> UPaddedBox -> UPaddedBox
- collapseTBorders :: TableOptions -> UPaddedBox -> UPaddedBox
- half :: Fractional a => (a, b) -> (a, b)
- finalizeVAlign :: TableOptions -> Alignment
- finalizeHAlign :: ParagraphOptions -> Direction -> Alignment
Documentation
type Overflowed = [Int] Source #
Tracks rowspan
attributes so later rows can dodge it.
emptyRow :: Overflowed Source #
A row with no cells overflowing into it.
commitRow :: Overflowed -> Overflowed Source #
Decrement all rowspan
s being overflowed, removing 0'd ones.
allocCol :: Int -> Overflowed -> Int Source #
Find the next column which a previous multi-row cell hasn't called "dibs" on.
insertCell :: Int -> Int -> Int -> Overflowed -> Overflowed Source #
data TableOptions Source #
Parsed CSS properties & HTML attributes for laying out "table" elements. To parse HTML attributes, expects the following useragent stylesheet rules:
- rowspan
- { -argo-rowspan: attr(rowspan) }
- colspan
- { -argo-colspan: attr(colspan) }
TableOptions | |
|
Instances
PropertyParser TableOptions Source # | |
Defined in Graphics.Layout.Grid.Table temp :: TableOptions # inherit :: TableOptions -> TableOptions # priority :: TableOptions -> [Text] # shorthand :: TableOptions -> Text -> [Token] -> [(Text, [Token])] # longhand :: TableOptions -> TableOptions -> Text -> [Token] -> Maybe TableOptions # getVars :: TableOptions -> Props # setVars :: Props -> TableOptions -> TableOptions # pseudoEl :: TableOptions -> Text -> (TableOptions -> Maybe TableOptions -> TableOptions) -> TableOptions # |
finalizeGap :: TableOptions -> Font' -> (Length, Length) Source #
Resolve any units in the "border-spacing" property according to the given font. If "border-collapse" is set, removes this spacing.
type UPaddedBox = PaddedBox Unitted Unitted Source #
Shorthand for a padded box without its CSS units resolved, simplifies type signatures.
collapseBorders :: TableOptions -> UPaddedBox -> UPaddedBox Source #
Removes margins & halves borders if "border-collapse" is set, as per the CSS specification. Apply this on the table cells, rows, & columns.
collapseTBorders :: TableOptions -> UPaddedBox -> UPaddedBox Source #
Removes padding & halves borders if "border-collapse" is set, as per the CSS specification. Apply this on the table itself.
half :: Fractional a => (a, b) -> (a, b) Source #
Helper for halving a unit.
finalizeVAlign :: TableOptions -> Alignment Source #
Lower vertical alignment to grid alignment options.
finalizeHAlign :: ParagraphOptions -> Direction -> Alignment Source #
Lower text alignment to grid alignment.