Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
dumps sass variables
# 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
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
%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;"}  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.