clay-0.12.2: CSS preprocessor as embedded Haskell.

Safe HaskellNone
LanguageHaskell98

Clay.Font

Contents

Synopsis

Generic font property.

class Val a => Font a where #

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.

http://www.w3.org/TR/css3-fonts/#font-prop

Methods

font :: a -> Css #

Instances

Font (Required a) # 

Methods

font :: Required a -> Css #

Font (Optional, Required a) # 

Methods

font :: (Optional, Required a) -> Css #

data Optional #

Instances

Val Optional # 

Methods

value :: Optional -> Value #

Font (Optional, Required a) # 

Methods

font :: (Optional, Required a) -> Css #

data Required a #

Constructors

Required (Size a) (Maybe (Size a)) [Text] [GenericFontFamily] 

Instances

Val (Required a) # 

Methods

value :: Required a -> Value #

Font (Required a) # 

Methods

font :: Required a -> Css #

Font (Optional, Required a) # 

Methods

font :: (Optional, Required a) -> Css #

Color.

fontColor :: Color -> Css #

An alias for color.

Font-family.

fontFamily :: [Text] -> [GenericFontFamily] -> Css #

The fontFamily style rules takes to lists of font families: zero or more custom font-families and preferably one or more generic font families.

sansSerif :: GenericFontFamily #

serif :: GenericFontFamily #

monospace :: GenericFontFamily #

cursive :: GenericFontFamily #

fantasy :: GenericFontFamily #

Font-size.

data FontSize #

Instances

fontSize :: Size a -> Css #

Font-style

Font-variant.

Font-weight

Named fonts.

data NamedFont #

Instances

Line-height.