Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains all the functions needed to convert a CSS document from its internal representation (Block
) to a concrete text-format CSS output.
- renderCSS :: CSS -> Text
- printCSS :: CSS -> IO ()
- type BlockPrinter = Block -> Text
- renderCSSWith :: BlockPrinter -> CSS -> Text
- renderStitchTWith :: Monad m => BlockPrinter -> StitchT m () -> m Text
- basic :: BlockPrinter
- compressed :: BlockPrinter
Documentation
type BlockPrinter = Block -> Text Source
renderCSSWith :: BlockPrinter -> CSS -> Text Source
Convert an abstract CSS
document to a real CSS document using a specific printer. A simple printer called basic
is included, as well as a compressing printer called compressed
.
renderStitchTWith :: Monad m => BlockPrinter -> StitchT m () -> m Text Source
Outputs a basic human-readable version of the CSS document. Line breaks are added between blocks, and properties are spaced nicely.
compressed :: BlockPrinter Source
A minimal printer that aims for tiny output CSS. All spaces are removed.