Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Text.Lucius
Synopsis
- 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
- toCss :: a -> Builder
- 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 {
- absoluteSizeUnit :: AbsoluteUnit
- absoluteSizeValue :: Rational
- absoluteSize :: AbsoluteUnit -> Rational -> AbsoluteSize
- data EmSize = EmSize Rational
- data ExSize = ExSize Rational
- data PercentageSize = PercentageSize {
- percentageSizeValue :: Rational
- percentageSize :: Rational -> PercentageSize
- data PixelSize = PixelSize Rational
- parseTopLevels :: Order -> Parser [TopLevel 'Unresolved]
- luciusUsedIdentifiers :: Order -> String -> [(Deref, VarType)]
Parsing
luciusFile :: FilePath -> Q Exp Source #
luciusFileDebug :: FilePath -> Q Exp Source #
luciusFileReload :: FilePath -> Q Exp Source #
Mixins
luciusMixin :: QuasiQuoter Source #
Runtime
luciusRTMinified :: Text -> [(Text, Text)] -> Either String Text Source #
Same as luciusRT
, but output has no added whitespace.
Since 1.0.3
Mixin
Arguments
:: Text | template |
-> Bool | minify? |
-> [(Text, RTValue)] | scope |
-> Either String Text |
Runtime Lucius with mixin support.
Since 1.0.6
Datatypes
Type class
Instances
ToCss AbsoluteSize Source # | |
Defined in Text.Internal.CssCommon Methods toCss :: AbsoluteSize -> Builder Source # | |
ToCss Color Source # | |
Defined in Text.Internal.CssCommon | |
ToCss EmSize Source # | |
Defined in Text.Internal.CssCommon | |
ToCss ExSize Source # | |
Defined in Text.Internal.CssCommon | |
ToCss PercentageSize Source # | |
Defined in Text.Internal.CssCommon Methods toCss :: PercentageSize -> Builder Source # | |
ToCss PixelSize Source # | |
Defined in Text.Internal.CssCommon | |
ToCss Text Source # | |
Defined in Text.Internal.Css | |
ToCss Text Source # | |
Defined in Text.Internal.Css | |
ToCss [Char] Source # | |
Defined in Text.Internal.Css |
Rendering
renderCssUrl :: (url -> [(Text, Text)] -> Text) -> CssUrl url -> Text Source #
ToCss instances
Color
Constructors
Color Word8 Word8 Word8 |
colorBlack :: Color Source #
Size
data AbsoluteUnit Source #
Absolute size units.
Constructors
Centimeter | |
Inch | |
Millimeter | |
Pica | |
Point |
Instances
Show AbsoluteUnit Source # | |
Defined in Text.Internal.CssCommon Methods showsPrec :: Int -> AbsoluteUnit -> ShowS show :: AbsoluteUnit -> String showList :: [AbsoluteUnit] -> ShowS | |
Eq AbsoluteUnit Source # | |
Defined in Text.Internal.CssCommon |
data AbsoluteSize Source #
Not intended for direct use, see mkSize
.
Constructors
AbsoluteSize | |
Fields
|
Instances
absoluteSize :: AbsoluteUnit -> Rational -> AbsoluteSize Source #
Constructs AbsoluteSize
. Not intended for direct use, see mkSize
.
Constructors
EmSize Rational |
Constructors
ExSize Rational |
data PercentageSize Source #
Not intended for direct use, see mkSize
.
Constructors
PercentageSize | |
Fields
|
Instances
percentageSize :: Rational -> PercentageSize Source #
Constructs PercentageSize
. Not intended for direct use, see mkSize
.
Constructors
PixelSize Rational |
Internal
parseTopLevels :: Order -> Parser [TopLevel 'Unresolved] Source #
luciusUsedIdentifiers :: Order -> String -> [(Deref, VarType)] Source #
Determine which identifiers are used by the given template, useful for creating systems like yesod devel.