| @@ -218,7 +218,6 @@ class StylusPlugin(CLTransformer): | |||||
| return | return | ||||
| stylus = self.app | stylus = self.app | ||||
| source = File.make_temp(text.strip()) | source = File.make_temp(text.strip()) | ||||
| target = source | |||||
| supported = [("compress", "c"), ("include", "I")] | supported = [("compress", "c"), ("include", "I")] | ||||
| args = [unicode(stylus)] | args = [unicode(stylus)] | ||||
| @@ -231,6 +230,7 @@ class StylusPlugin(CLTransformer): | |||||
| "Cannot process %s. Error occurred when " | "Cannot process %s. Error occurred when " | ||||
| "processing [%s]" % (stylus.name, resource.source_file), | "processing [%s]" % (stylus.name, resource.source_file), | ||||
| sys.exc_info()) | sys.exc_info()) | ||||
| target = File(source.path + '.css') | |||||
| return target.read_all() | return target.read_all() | ||||
| @@ -1,18 +1,22 @@ | |||||
| * { | |||||
| border: 0; | |||||
| padding: 0; | |||||
| margin: 0; | |||||
| } | |||||
| #header { | |||||
| color: #333333; | |||||
| border-left: 1px; | |||||
| border-right: 2px; | |||||
| .rounded (@radius: 5px){ | |||||
| -webkit-border-radius: @radius; | |||||
| -moz-border-radius: @radius; | |||||
| border-radius: @radius; | |||||
| }@the-border: 1px; | |||||
| @base-color: #111;* { | |||||
| border: 0; | |||||
| padding: 0; | |||||
| margin: 0; | |||||
| }#header { | |||||
| color: @base-color * 3; | |||||
| border-left: @the-border; | |||||
| border-right: @the-border * 2; | |||||
| } | } | ||||
| #footer { | #footer { | ||||
| color: #333333; | |||||
| color: (@base-color + #111) * 1.5; | |||||
| } | } | ||||
| #content { | #content { | ||||
| -webkit-border-radius: 10px; | |||||
| -moz-border-radius: 10px; | |||||
| border-radius: 10px; | |||||
| } | |||||
| .rounded(10px); | |||||
| } | |||||
| @@ -1,16 +1,15 @@ | |||||
| * { | |||||
| border: 0; | |||||
| padding: 0; | |||||
| margin: 0; | |||||
| } | |||||
| @import "inc/reset.css"; | |||||
| #header { | #header { | ||||
| color: #333333; | |||||
| color: #333; | |||||
| border-left: 1px; | border-left: 1px; | ||||
| border-right: 2px; | border-right: 2px; | ||||
| } | } | ||||
| #footer { | #footer { | ||||
| color: #333333; | |||||
| color: #333; | |||||
| } | } | ||||
| #content { | #content { | ||||
| -webkit-border-radius: 10px; | -webkit-border-radius: 10px; | ||||
| -moz-border-radius: 10px; | -moz-border-radius: 10px; | ||||
| @@ -1,4 +1,4 @@ | |||||
| @option compress: no; | |||||
| @option style: expanded; | |||||
| @import "inc/mixin"; | @import "inc/mixin"; | ||||
| @import "inc/vars"; | @import "inc/vars"; | ||||
| @@ -1,4 +1 @@ | |||||
| *{border:0;padding:0;margin:0} | |||||
| #header{color:#333;border-left:1px;border-right:2px} | |||||
| #footer{color:#333} | |||||
| #content{-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px} | |||||
| *{border:0;padding:0;margin:0}#header{color:#333;border-left:1px;border-right:2px}#footer{color:#333}#content{-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px} | |||||
| @@ -29,7 +29,7 @@ class TestStylus(object): | |||||
| def test_can_execute_stylus(self): | def test_can_execute_stylus(self): | ||||
| s = Site(TEST_SITE) | s = Site(TEST_SITE) | ||||
| s.config.plugins = ['hyde.ext.plugins.css.StylusPlugin'] | s.config.plugins = ['hyde.ext.plugins.css.StylusPlugin'] | ||||
| paths = ['/usr/local/share/npm/bin/stylus'] | |||||
| paths = ['/usr/local/bin/stylus', '/usr/local/share/npm/bin/stylus'] | |||||
| for path in paths: | for path in paths: | ||||
| if File(path).exists: | if File(path).exists: | ||||
| s.config.stylus = Expando(dict(app=path)) | s.config.stylus = Expando(dict(app=path)) | ||||
| @@ -47,7 +47,7 @@ class TestStylus(object): | |||||
| s = Site(TEST_SITE) | s = Site(TEST_SITE) | ||||
| s.config.mode = "production" | s.config.mode = "production" | ||||
| s.config.plugins = ['hyde.ext.plugins.css.StylusPlugin'] | s.config.plugins = ['hyde.ext.plugins.css.StylusPlugin'] | ||||
| paths = ['/usr/local/share/npm/bin/stylus'] | |||||
| paths = ['/usr/local/bin/stylus', '/usr/local/share/npm/bin/stylus'] | |||||
| for path in paths: | for path in paths: | ||||
| if File(path).exists: | if File(path).exists: | ||||
| s.config.stylus = Expando(dict(app=path)) | s.config.stylus = Expando(dict(app=path)) | ||||