shakespeare-2.0.13: A toolkit for making compile-time interpolated templates

Safe HaskellNone
LanguageHaskell98

Text.Cassius

Contents

Synopsis

Datatypes

data Css #

type CssUrl url = (url -> [(Text, Text)] -> Text) -> Css #

Type class

class ToCss a where #

Minimal complete definition

toCss

Methods

toCss :: a -> Builder #

Instances

Rendering

renderCssUrl :: (url -> [(Text, Text)] -> Text) -> CssUrl url -> Text #

Parsing

Mixims

cassiusMixin :: QuasiQuoter #

Create a mixin with Cassius syntax.

Since 2.0.3

data Mixin #

Instances

Monoid Mixin # 

Methods

mempty :: Mixin #

mappend :: Mixin -> Mixin -> Mixin #

mconcat :: [Mixin] -> Mixin #

Lift Mixin # 

Methods

lift :: Mixin -> Q Exp #

ToCss instances

Color

data Color #

Constructors

Color Word8 Word8 Word8 

Instances

Show Color # 

Methods

showsPrec :: Int -> Color -> ShowS #

show :: Color -> String #

showList :: [Color] -> ShowS #

ToCss Color # 

Methods

toCss :: Color -> Builder #

Size

mkSize :: String -> ExpQ #

Create a CSS size, e.g. $(mkSize "100px").

absoluteSize :: AbsoluteUnit -> Rational -> AbsoluteSize #

Constructs AbsoluteSize. Not intended for direct use, see mkSize.

percentageSize :: Rational -> PercentageSize #

Constructs PercentageSize. Not intended for direct use, see mkSize.

Internal

cassiusUsedIdentifiers :: String -> [(Deref, VarType)] #

Determine which identifiers are used by the given template, useful for creating systems like yesod devel.