Skip to content
Permalink
Browse files

Simplify css methods

  • Loading branch information...
Koen Bok
Koen Bok committed Mar 13, 2013
1 parent ec69c6d commit 67f1220c93ec07c61c98091e5824bd356a50afa3
Showing with 3 additions and 26 deletions.
  1. +3 −26 src/css.coffee
@@ -4,33 +4,10 @@ _STYLESHEET = null

exports.addStyle = (css) ->

# styleSheet = document.getElementById STYLESHEET_ID
#
# if not styleSheet
#
# head = document.getElementsByTagName "head"
# head = head[0] if head
#
# if not head
# head = document.body or document.documentElement
#
# styleSheet = document.createElement "style"
# styleSheet.id = STYLESHEET_ID
#
# head.appendChild styleSheet
#
# styleSheet.appendChild document.createTextNode css

# if _STYLESHEET is null
_STYLESHEET = document.createElement('style');
document.head.appendChild(_STYLESHEET);

_STYLESHEET.innerHTML += css

# style = document.createElement('style');
# style.innerHTML = css

styleSheet = document.createElement "style"
styleSheet.innerHTML = css

document.head.appendChild styleSheet


exports.addStyle "

0 comments on commit 67f1220

Please sign in to comment.
You can’t perform that action at this time.