Skip to content

Instantly share code, notes, and snippets.

@imetallica
Last active June 8, 2016 02:42
Show Gist options
  • Save imetallica/02fdcfeff94c9bba19823301da72bc12 to your computer and use it in GitHub Desktop.
Save imetallica/02fdcfeff94c9bba19823301da72bc12 to your computer and use it in GitHub Desktop.
module MetroUi.Css exposing (class, classes, Styles(..))
import List
import MetroUi.Css.SimpleGrid as SimpleGrid
import Html.Attributes as Attr
import Debug
type Styles a = SimpleGrid.Classes a | Others a
class style =
case style of
SimpleGrid.Classes s -> Attr.class (SimpleGrid.transformToString s)
_ -> Debug.crash "TODO"
classes styles =
Attr.classList (List.map transformStyleIntoTuple styles)
transformStyleIntoTuple style =
(style, True)
module MetroUi.Css.SimpleGrid exposing ( Classes(..), transformToString )
import String
type Classes
= Grid
| Row
| Cell
| Cells2
| Cells3
| Cells4
| Cells5
| Cells6
| Cells7
| Cells8
| Cells9
| Cells10
| Cells11
| Cells12
| Condensed
| Colspan2
| Colspan3
| Colspan4
| Colspan5
| Colspan6
| Colspan7
| Colspan8
| Colspan9
| Colspan10
| Colspan11
| Colspan12
transformToString : Classes -> String
transformToString t =
toString t
|> String.toLower
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment