hamlet-0.8.2.1: Haml-like template files that are compile-time checkedSource codeContentsIndex
Text.Cassius
Contents
Datatypes
Type class
Rendering
Parsing
ToCss instances
Color
Size
Synopsis
type Cassius url = (url -> [(Text, Text)] -> Text) -> Css
type Css = [CssTop]
class ToCss a where
toCss :: a -> Builder
renderCassius :: (url -> [(Text, Text)] -> Text) -> Cassius url -> Text
renderCss :: Css -> Text
cassius :: QuasiQuoter
cassiusFile :: FilePath -> Q Exp
cassiusFileDebug :: FilePath -> Q Exp
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
Datatypes
type Cassius url = (url -> [(Text, Text)] -> Text) -> CssSource
type Css = [CssTop]Source
Type class
class ToCss a whereSource
Methods
toCss :: a -> BuilderSource
show/hide Instances
Rendering
renderCassius :: (url -> [(Text, Text)] -> Text) -> Cassius url -> TextSource
renderCss :: Css -> TextSource
Parsing
cassius :: QuasiQuoterSource
cassiusFile :: FilePath -> Q ExpSource
cassiusFileDebug :: FilePath -> Q ExpSource
ToCss instances
Color
data Color Source
Constructors
Color Word8 Word8 Word8
show/hide Instances
colorRed :: ColorSource
colorBlack :: ColorSource
Size
mkSize :: String -> ExpQSource
Create a CSS size, e.g. $(mkSize 100px).
data AbsoluteUnit Source
Absolute size units.
Constructors
Centimeter
Inch
Millimeter
Pica
Point
show/hide Instances
data AbsoluteSize Source
Not intended for direct use, see mkSize.
Constructors
AbsoluteSize
absoluteSizeUnit :: AbsoluteUnitUnits used for text formatting.
absoluteSizeValue :: RationalNormalized value in centimeters.
show/hide Instances
absoluteSize :: AbsoluteUnit -> Rational -> AbsoluteSizeSource
Constructs AbsoluteSize. Not intended for direct use, see mkSize.
data EmSize Source
Constructors
EmSize Rational
show/hide Instances
data ExSize Source
Constructors
ExSize Rational
show/hide Instances
data PercentageSize Source
Not intended for direct use, see mkSize.
Constructors
PercentageSize
percentageSizeValue :: RationalNormalized value, 1 == 100%.
show/hide Instances
percentageSize :: Rational -> PercentageSizeSource
Constructs PercentageSize. Not intended for direct use, see mkSize.
data PixelSize Source
Constructors
PixelSize Rational
show/hide Instances
Produced by Haddock version 2.6.1