simple-css-0.0.4: simple binding of css and html

SimpleCss

Contents

Synopsis

Types

data Css a Source

representing Css data type

Css's parameter is html type

Constructors

prim :: a -> Css aSource

html element constructor

hcat :: [Css a] -> Css aSource

span groupping

vcat :: [Css a] -> Css aSource

div groupping

acat :: Href -> [Css a] -> Css aSource

a groupping

div' :: Css a -> Css aSource

vcat for singleton

span' :: Css a -> Css aSource

hcat for singleton

a' :: Href -> Css a -> Css aSource

acat for singleton

dot :: [Decl] -> Css a -> Css aSource

set class

pseudo :: Pseudo -> Css a -> Css aSource

set class with pseudo- element/class

context :: Context -> [Decl] -> Css a -> Css aSource

styles descendants

Render

data HtmlSpec a Source

Html specification

to render css you should specify html's elements groupping with a, div and span tags and way to assign values of class attribute

Constructors

HtmlSpec 

Fields

divTag :: [a] -> a
 
spanTag :: [a] -> a
 
aTag :: Href -> [a] -> a
 
classAttr :: String -> a -> a
 

renderCss :: HtmlSpec a -> [Css a] -> ([RuleSet], [a])Source

render css

returns string of css code and list of htmls

toBlaze :: [Css Html] -> ([RuleSet], [Html])Source

render css for blaze-html