shakespeare-css-1.0.3: Stick your haskell variables into css at compile time.

Safe HaskellNone

Text.Lucius

Contents

Synopsis

Parsing

lucius :: QuasiQuoter

>>> renderCss ([lucius|foo{bar:baz}|] undefined)
"foo{bar:baz}"

Runtime

luciusRT' :: Text -> Either String ([(Text, Text)] -> Either String [CssTop])

luciusRTMinified :: Text -> [(Text, Text)] -> Either String Text

Same as luciusRT, but output has no added whitespace.

Since 1.0.3

Datatypes

data Css

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

Type class

Rendering

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

ToCss instances

Color

data Color

Constructors

Color Word8 Word8 Word8 

Instances

Size

mkSize :: String -> ExpQ

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

data AbsoluteUnit

Absolute size units.

Constructors

Centimeter 
Inch 
Millimeter 
Pica 
Point 

data AbsoluteSize

Not intended for direct use, see mkSize.

Constructors

AbsoluteSize 

Fields

absoluteSizeUnit :: AbsoluteUnit

Units used for text formatting.

absoluteSizeValue :: Rational

Normalized value in centimeters.

absoluteSize :: AbsoluteUnit -> Rational -> AbsoluteSize

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

data PercentageSize

Not intended for direct use, see mkSize.

Constructors

PercentageSize 

Fields

percentageSizeValue :: Rational

Normalized value, 1 == 100%.

percentageSize :: Rational -> PercentageSize

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

Internal

parseTopLevels :: Parser [TopLevel]

luciusUsedIdentifiers :: String -> [(Deref, VarType)]

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