-
-
Save jonjaques/d8f18bbdc9f5a1872b4d to your computer and use it in GitHub Desktop.
Revisions
-
jonjaques revised this gist
May 29, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ def sass_literals(file_path) engine = Sass::Engine.for_file(file_path, {}) environment = Sass::Environment.new -
jonjaques revised this gist
May 29, 2014 . 1 changed file with 13 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,16 @@ def sass_literals(file) engine = Sass::Engine.for_file(file_path, {}) environment = Sass::Environment.new keyvals = [] engine.to_tree.children.each do |node| next unless node.kind_of? Sass::Tree::VariableNode if node.expr.kind_of? Sass::Script::Tree::Literal value = node.expr.perform(environment) keyvals.push [node.name, value.to_s] end end return keyvals end -
jonjaques revised this gist
May 29, 2014 . 1 changed file with 10 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,16 @@ def sass_literals(file) engine = Sass::Engine.for_file(file_path, {}) environment = Sass::Environment.new keyvals = [] engine.to_tree.children.each do |node| next unless node.kind_of? Sass::Tree::VariableNode if node.expr.kind_of? Sass::Script::Tree::Literal value = node.expr.perform(environment) keyvals.push [node.name, value.to_s] end end return keyvals end -
jonjaques revised this gist
May 29, 2014 . 2 changed files with 15 additions and 23 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,16 @@ def sass_literals(file) engine = Sass::Engine.for_file(file_path, {}) environment = Sass::Environment.new keyvals = [] engine.to_tree.children.each do |node| next unless node.kind_of? Sass::Tree::VariableNode if node.expr.kind_of? Sass::Script::Tree::Literal value = node.expr.perform(environment) keyvals.push [node.name, value.to_s] end end return keyvals end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +0,0 @@ -
aurelian revised this gist
Jan 20, 2011 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,6 @@ # ref: http://bit.ly/fN2ep8 # http://twitpic.com/3rr8dk def sass_colors engine= Sass::Engine.new(File.read("app/stylesheets/_colors.scss"), :syntax => :scss, :load_paths => ["app/stylesheets"]) environment= Sass::Environment.new -
aurelian revised this gist
Jan 20, 2011 . 1 changed file with 11 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ %h2 SASS Colors %table %tr %th Variable %th Color - @sass_vars.each do |var| %tr %td= "#{var[0]}: #{var[1]}" %td{:style => "background-color:#{var[1]};width:80%;height:32px;"} -
aurelian renamed this gist
Jan 20, 2011 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
aurelian created this gist
Jan 20, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ def sass_colors engine= Sass::Engine.new(File.read("app/stylesheets/_colors.scss"), :syntax => :scss, :load_paths => ["app/stylesheets"]) environment= Sass::Environment.new engine.to_tree.children.each do | node | next unless node.kind_of? Sass::Tree::VariableNode node.perform environment end @sass_vars= environment.instance_variable_get("@vars").reject{|k| k == "important" } end