Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

act like a real library

  • Loading branch information...
commit a62b81654bf88b22fcc021f70516ca983d276911 1 parent 97ac64d
@aeosynth authored
Showing with 7 additions and 23 deletions.
  1. +7 −23 ccss.coffee
View
30 ccss.coffee 100755 → 100644
@@ -1,24 +1,6 @@
-#!/usr/bin/env coffee
-
-boxShadow = (arg) ->
- '-webkit-box-shadow': arg
- '-moz-box-shadow': arg
- 'box-shadow': arg
-
-lighten = saturate = (color, diff) ->#TODO
- color
-
-rules =
- '.box': do ->
- base = '#f938ab'
- color: saturate base, '5%'
- 'border-color': lighten base, '5%'
- div:
- boxShadow '0 0 5px 0.4'
-
css = ''
-parse = (rules) ->
+compile = (rules) ->
for selector, declarations of rules
children = {}
text = ''
@@ -35,8 +17,10 @@ parse = (rules) ->
css += text
css += '}\n'
- parse children
-
-parse rules
+ compile children
-console.log css
+@compile = (rules) ->
+ compile rules
+ ret = css
+ css = ''
+ ret
Please sign in to comment.
Something went wrong with that request. Please try again.