Your Style Sheet
You need to create a style sheet in order for your view to be rendered.
The stylesheet you're going to create is analagous to a stylesheet in css that only has class selectors.
Here's what it looks like:
import Style import Style.Color as Color import Style.Font as Font -- We need a type that represents out style identifiers. -- These act like css classes type MyStyles = Title -- We define our stylesheet stylesheet = Style.styleSheet [ Style.style Title [ Color.text darkGrey , Color.background white , Font.size 5 -- all units given as px , Font.typeface [ Font.font "Helvetica" , Font.font "Comic Sans" , Font.font "Papyrus" ] ] ]
Now you can then use
Title as a style identifier on your layouts!
There are a number of
Style modules that all handle a specific aspect of your styling.