stitch-0.2.0.0: lightweight CSS DSL

Safe HaskellNone
LanguageHaskell2010

Stitch

Contents

Synopsis

Core

type CSS = Stitch () Source

Abstract representation of a CSS document. This can be transformed to an actual CSS document with renderCSS.

renderCSS :: CSS -> Text Source

Convert an abstract CSS document to a real CSS document.

newtype Selector Source

Represents a CSS selector. Can be combined with other Selectors using its Monoid instance.

Constructors

Selector 

Fields

unSelector :: [Text]
 

Combinators

(?) :: Monad m => Selector -> StitchT m a -> StitchT m a infixr 6 Source

Nest a selector under the current selector.

(.=) :: Monad m => Text -> Text -> StitchT m () infix 7 Source

Add a key-value property pair.

comment :: Monad m => Text -> StitchT m () Source

Add a comment to the CSS output.