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

Safe HaskellNone

Text.Lucius

Contents

Synopsis

Parsing

lucius :: QuasiQuoterSource

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

Mixins

data Mixin Source

Instances

Runtime

luciusRT' :: Text -> Either String ([(Text, Text)] -> Either String [TopLevel Resolved])Source

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

Same as luciusRT, but output has no added whitespace.

Since 1.0.3

Mixin

luciusRTMixinSource

Arguments

:: Text

template

-> Bool

minify?

-> [(Text, RTValue)]

scope

-> Either String Text 

Runtime Lucius with mixin support.

Since 1.0.6

data RTValue Source

Constructors

RTVRaw Text 
RTVMixin Mixin 

Datatypes

data Css Source

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

Type class

Rendering

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

ToCss instances

Color

data Color Source

Constructors

Color Word8 Word8 Word8 

Instances

Size

mkSize :: String -> ExpQSource

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

data AbsoluteUnit Source

Absolute size units.

Constructors

Centimeter 
Inch 
Millimeter 
Pica 
Point 

data AbsoluteSize Source

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 -> AbsoluteSizeSource

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

data PercentageSize Source

Not intended for direct use, see mkSize.

Constructors

PercentageSize 

Fields

percentageSizeValue :: Rational

Normalized value, 1 == 100%.

percentageSize :: Rational -> PercentageSizeSource

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

Internal

parseTopLevels :: Parser [TopLevel Unresolved]Source

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

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