Skip to content

hmsk/elm-css-modern-normalize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elm-css-modern-normalize

An Elm port of modern-normalize for rtfeldman/elm-css.

Install

elm install hmsk/elm-css-modern-normalize

Usage

import Css.ModernNormalize as ModernNormalize

view : Model -> Html Msg
view _ =
    [
      ModernNormalize.globalHtml
      -- Your application view comes here
    ]

elm-css friendly functions

import Css exposing (color, hex)
import Css.Global exposing (global, selector)
import Css.ModernNormalize as ModernNormalize
import Html.Styled

buildGlobal : Html.Styled.Html msg
buildGlobal =
    global <|
        [
          selector ".myGlobalStyle" [ color <| hex "#597B8C" ]
        ]
          ++ ModernNormalize.snippets
import Css.ModernNormalize as ModernNormalize
import Html.Styled exposing (h1)

styledView : Html.Styled.Html msg
styledView =
    [ h1 [] [text "header"]
    , ModernNormalize.globalStyledHtml
    ]

License

MIT