NoRedInk / style-elements / Style.Font

Font Properties

Meant to be imported as:

import Style.Font as Font

Typefaces

typeface : List Style.Font -> Style.Property class variation

font : String -> Style.Font

serif : Style.Font

sansSerif : Style.Font

cursive : Style.Font

fantasy : Style.Font

monospace : Style.Font

importUrl : { url : String, name : String } -> Style.Font

Properties

size : Basics.Float -> Style.Property class variation

Font size as px

lineHeight : Basics.Float -> Style.Property class variation

This is the only unitless value in the library that isn't px.

Given as a proportion of the Font.size.

This means the final lineHeight in px is:

  Font.size * Font.lineHeight == lineHeightInPx

letterSpacing : Basics.Float -> Style.Property class variation

In px.

wordSpacing : Basics.Float -> Style.Property class variation

In px.

alignLeft : Style.Property class variation

Align the font to the left.

alignRight : Style.Property class variation

Align the font to the right.

center : Style.Property class variation

Align font center.

justify : Style.Property class variation

justifyAll : Style.Property class variation

Font Styles

uppercase : Style.Property class variation

capitalize : Style.Property class variation

lowercase : Style.Property class variation

underline : Style.Property class variation

strike : Style.Property class variation

italic : Style.Property class variation

bold : Style.Property class variation

weight : Basics.Int -> Style.Property class variation

light : Style.Property class variation