Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class Val a => Font a where
- data Optional = Optional (Maybe FontWeight) (Maybe FontVariant) (Maybe FontStyle)
- data Required a = Required (Size a) (Maybe (Size a)) [Text] [GenericFontFamily]
- fontColor :: Color -> Css
- color :: Color -> Css
- fontFamily :: [Text] -> [GenericFontFamily] -> Css
- sansSerif :: GenericFontFamily
- serif :: GenericFontFamily
- monospace :: GenericFontFamily
- cursive :: GenericFontFamily
- fantasy :: GenericFontFamily
- data FontSize
- fontSize :: Size a -> Css
- fontSizeCustom :: FontSize -> Css
- xxSmall :: FontSize
- xSmall :: FontSize
- small :: FontSize
- medium :: FontSize
- large :: FontSize
- xLarge :: FontSize
- xxLarge :: FontSize
- smaller :: FontSize
- larger :: FontSize
- data FontStyle
- fontStyle :: FontStyle -> Css
- italic :: FontStyle
- oblique :: FontStyle
- data FontVariant
- fontVariant :: FontVariant -> Css
- smallCaps :: FontVariant
- data FontWeight
- fontWeight :: FontWeight -> Css
- bold :: FontWeight
- bolder :: FontWeight
- lighter :: FontWeight
- weight :: Integer -> FontWeight
- data NamedFont
- caption :: NamedFont
- icon :: NamedFont
- menu :: NamedFont
- messageBox :: NamedFont
- smallCaption :: NamedFont
- statusBar :: NamedFont
- lineHeight :: Size a -> Css
Generic font property.
class Val a => Font a where Source #
We implement the generic font property as a type class that accepts multiple value types. This allows us to combine different font aspects into a shorthand syntax. Fonts require a mandatory part and have a optional a part.
Nothing
Color.
Font-family.
fontFamily :: [Text] -> [GenericFontFamily] -> Css Source #
The fontFamily
style rules takes to lists of font families: zero or more
custom font-families and preferably one or more generic font families.
Font-size.
fontSizeCustom :: FontSize -> Css Source #
Font-style
Font-variant.
data FontVariant Source #
Instances
Inherit FontVariant Source # | |
Defined in Clay.Font | |
Normal FontVariant Source # | |
Defined in Clay.Font normal :: FontVariant Source # | |
Other FontVariant Source # | |
Val FontVariant Source # | |
fontVariant :: FontVariant -> Css Source #
Font-weight
data FontWeight Source #
Instances
Inherit FontWeight Source # | |
Defined in Clay.Font inherit :: FontWeight Source # | |
Normal FontWeight Source # | |
Defined in Clay.Font normal :: FontWeight Source # | |
Other FontWeight Source # | |
Val FontWeight Source # | |
fontWeight :: FontWeight -> Css Source #
bold :: FontWeight Source #
bolder :: FontWeight Source #
lighter :: FontWeight Source #
weight :: Integer -> FontWeight Source #
Named fonts.
Line-height.
lineHeight :: Size a -> Css Source #