Skip to content

Instantly share code, notes, and snippets.

@eeue56
Last active November 3, 2015 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eeue56/b1799407ea135bb8a533 to your computer and use it in GitHub Desktop.
Save eeue56/b1799407ea135bb8a533 to your computer and use it in GitHub Desktop.
import Json.Encode exposing (string)
import VirtualDom exposing (Node, property)
import Html exposing (div, Html)
style : String -> Html
style text =
VirtualDom.node
"style"
[ property "textContent" <| string text
, property "type" <| string "text/css" ]
[]
styleTag : Html
styleTag = style "body {background-color: red}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment