Safe Haskell | None |
---|---|
Language | Haskell98 |
Text.Lucius
- lucius :: QuasiQuoter
- luciusFile :: FilePath -> Q Exp
- luciusFileDebug :: FilePath -> Q Exp
- luciusFileReload :: FilePath -> Q Exp
- luciusMixin :: QuasiQuoter
- data Mixin
- luciusRT :: Text -> [(Text, Text)] -> Either String Text
- luciusRT' :: Text -> Either String ([(Text, Text)] -> Either String [TopLevel Resolved])
- luciusRTMinified :: Text -> [(Text, Text)] -> Either String Text
- luciusRTMixin :: Text -> Bool -> [(Text, RTValue)] -> Either String Text
- data RTValue
- data Css
- type CssUrl url = (url -> [(Text, Text)] -> Text) -> Css
- class ToCss a where
- renderCss :: Css -> Text
- renderCssUrl :: (url -> [(Text, Text)] -> Text) -> CssUrl url -> Text
- data Color = Color Word8 Word8 Word8
- colorRed :: Color
- colorBlack :: Color
- mkSize :: String -> ExpQ
- data AbsoluteUnit
- = Centimeter
- | Inch
- | Millimeter
- | Pica
- | Point
- data AbsoluteSize = AbsoluteSize {}
- absoluteSize :: AbsoluteUnit -> Rational -> AbsoluteSize
- data EmSize = EmSize Rational
- data ExSize = ExSize Rational
- data PercentageSize = PercentageSize {}
- percentageSize :: Rational -> PercentageSize
- data PixelSize = PixelSize Rational
- parseTopLevels :: Parser [TopLevel Unresolved]
- luciusUsedIdentifiers :: String -> [(Deref, VarType)]
Parsing
lucius :: QuasiQuoter #
>>>
renderCss ([lucius|foo{bar:baz}|] undefined)
"foo{bar:baz}"
luciusFile :: FilePath -> Q Exp #
luciusFileDebug :: FilePath -> Q Exp #
luciusFileReload :: FilePath -> Q Exp #
Mixins
Runtime
luciusRTMinified :: Text -> [(Text, Text)] -> Either String Text #
Same as luciusRT
, but output has no added whitespace.
Since 1.0.3
Mixin
Runtime Lucius with mixin support.
Since 1.0.6
Datatypes
Type class
Minimal complete definition
Rendering
renderCssUrl :: (url -> [(Text, Text)] -> Text) -> CssUrl url -> Text #
ToCss instances
Color
colorBlack :: Color #
Size
data AbsoluteSize #
Not intended for direct use, see mkSize
.
Constructors
AbsoluteSize | |
Fields
|
Instances
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
|
percentageSize :: Rational -> PercentageSize #
Constructs PercentageSize
. Not intended for direct use, see mkSize
.
Internal
parseTopLevels :: Parser [TopLevel Unresolved] #
luciusUsedIdentifiers :: String -> [(Deref, VarType)] #
Determine which identifiers are used by the given template, useful for creating systems like yesod devel.