Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Commit

Permalink
remove global var; full on recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
aeosynth committed Feb 5, 2011
1 parent 98215f6 commit b6a5f96
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions ccss.coffee
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,6 @@
css = '' @compile = (ccss) ->
css = ''


compile = (ccss) ->
for selector, pairs of ccss for selector, pairs of ccss
# a pair can be a css declaration, or a pair of the child ccss object # a pair can be a css declaration, or a pair of the child ccss object
child = {} child = {}
Expand All @@ -20,10 +20,6 @@ compile = (ccss) ->
css += declarations css += declarations
css += '}\n' css += '}\n'


compile child css += @compile child


@compile = (ccss) -> css
compile ccss
ret = css
css = ''
ret

0 comments on commit b6a5f96

Please sign in to comment.