-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Stick your haskell variables into css at compile time. -- -- Shakespeare is a template family for type-safe, efficient templates -- with simple variable interpolation . Shakespeare templates can be used -- inline with a quasi-quoter or in an external file. Shakespeare -- interpolates variables according to the type being inserted. In this -- case, the variable type needs a ToCss instance. -- -- This package contains 2 css template languages. The Cassius language -- uses whitespace to avoid the need for closing brackets and -- semi-colons. Lucius does not care about whitespace and is a strict -- superset of css. There are also some significant conveniences added -- for css. -- -- Please see -- http:www.yesodweb.combookshakespearean-templates for a -- more thorough description and examples @package shakespeare-css @version 1.0.2 module Text.Lucius -- |
--   >>> renderCss ([lucius|foo{bar:baz}|] undefined)
--   "foo{bar:baz}"
--   
lucius :: QuasiQuoter luciusFile :: FilePath -> Q Exp luciusFileDebug :: FilePath -> Q Exp luciusFileReload :: FilePath -> Q Exp luciusRT :: Text -> [(Text, Text)] -> Either String Text luciusRT' :: Text -> Either String ([(Text, Text)] -> Either String [CssTop]) data Css type CssUrl url = (url -> [(Text, Text)] -> Text) -> Css class ToCss a toCss :: ToCss a => a -> Builder renderCss :: Css -> Text renderCssUrl :: (url -> [(Text, Text)] -> Text) -> CssUrl url -> Text data Color Color :: Word8 -> Word8 -> Word8 -> Color colorRed :: Color colorBlack :: Color -- | Create a CSS size, e.g. $(mkSize 100px). mkSize :: String -> ExpQ -- | Absolute size units. data AbsoluteUnit Centimeter :: AbsoluteUnit Inch :: AbsoluteUnit Millimeter :: AbsoluteUnit Pica :: AbsoluteUnit Point :: AbsoluteUnit -- | Not intended for direct use, see mkSize. data AbsoluteSize AbsoluteSize :: AbsoluteUnit -> Rational -> AbsoluteSize -- | Units used for text formatting. absoluteSizeUnit :: AbsoluteSize -> AbsoluteUnit -- | Normalized value in centimeters. absoluteSizeValue :: AbsoluteSize -> Rational -- | Constructs AbsoluteSize. Not intended for direct use, see -- mkSize. absoluteSize :: AbsoluteUnit -> Rational -> AbsoluteSize data EmSize EmSize :: Rational -> EmSize data ExSize ExSize :: Rational -> ExSize -- | Not intended for direct use, see mkSize. data PercentageSize PercentageSize :: Rational -> PercentageSize -- | Normalized value, 1 == 100%. percentageSizeValue :: PercentageSize -> Rational -- | Constructs PercentageSize. Not intended for direct use, see -- mkSize. percentageSize :: Rational -> PercentageSize data PixelSize PixelSize :: Rational -> PixelSize parseTopLevels :: Parser [TopLevel] -- | Determine which identifiers are used by the given template, useful for -- creating systems like yesod devel. luciusUsedIdentifiers :: String -> [(Deref, VarType)] module Text.Cassius data Css type CssUrl url = (url -> [(Text, Text)] -> Text) -> Css class ToCss a toCss :: ToCss a => a -> Builder renderCss :: Css -> Text renderCssUrl :: (url -> [(Text, Text)] -> Text) -> CssUrl url -> Text cassius :: QuasiQuoter cassiusFile :: FilePath -> Q Exp cassiusFileDebug :: FilePath -> Q Exp cassiusFileReload :: FilePath -> Q Exp data Color Color :: Word8 -> Word8 -> Word8 -> Color colorRed :: Color colorBlack :: Color -- | Create a CSS size, e.g. $(mkSize 100px). mkSize :: String -> ExpQ -- | Absolute size units. data AbsoluteUnit Centimeter :: AbsoluteUnit Inch :: AbsoluteUnit Millimeter :: AbsoluteUnit Pica :: AbsoluteUnit Point :: AbsoluteUnit -- | Not intended for direct use, see mkSize. data AbsoluteSize AbsoluteSize :: AbsoluteUnit -> Rational -> AbsoluteSize -- | Units used for text formatting. absoluteSizeUnit :: AbsoluteSize -> AbsoluteUnit -- | Normalized value in centimeters. absoluteSizeValue :: AbsoluteSize -> Rational -- | Constructs AbsoluteSize. Not intended for direct use, see -- mkSize. absoluteSize :: AbsoluteUnit -> Rational -> AbsoluteSize data EmSize EmSize :: Rational -> EmSize data ExSize ExSize :: Rational -> ExSize -- | Not intended for direct use, see mkSize. data PercentageSize PercentageSize :: Rational -> PercentageSize -- | Normalized value, 1 == 100%. percentageSizeValue :: PercentageSize -> Rational -- | Constructs PercentageSize. Not intended for direct use, see -- mkSize. percentageSize :: Rational -> PercentageSize data PixelSize PixelSize :: Rational -> PixelSize -- | Determine which identifiers are used by the given template, useful for -- creating systems like yesod devel. cassiusUsedIdentifiers :: String -> [(Deref, VarType)]