Last active
March 14, 2017 15:20
-
-
Save mdgriffith/af7d6f9d7d0a76407ef9cfafb7f6bab8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- A Color Palette is a record that tracks | |
-- border, text and background color | |
primary = | |
Style.Color.palette | |
{ border = Color.blue | |
, text = Color.red | |
, background = Color.white | |
} | |
roboto = | |
Style.Font.importGoogle | |
{ family = "Roboto" | |
, size = 20 | |
, lineHeight = 1 | |
} | |
stylesheet = | |
Style.stylesheet | |
[ style Test | |
[ Font.current | |
|> Font.bold | |
|> Font.size 20 | |
|> Font.lineHeight 1 | |
, Color.paletteFrom -- use the palette from above | |
primary | |
] | |
, style ExampleButton | |
[ Font.named roboto | |
|> Font.size 18 | |
|> Font.letterSpacing 20 | |
|> Font.light | |
|> Font.align center | |
|> Font.uppercase | |
, Color.transparent -- Start with a transparent palette | |
|> Color.text primary -- And replace the text color | |
-- with the text color | |
-- from the primary color palette | |
, box | |
|> width (px 100) | |
|> height (px 100) | |
|> padding (all 5) | |
, border | |
|> Border.width (all 5) | |
|> Border.radius (all 5) | |
|> Border.style solid | |
] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment