Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
dumps sass variables
# ref:
def sass_colors
engine="app/stylesheets/_colors.scss"), :syntax => :scss, :load_paths => ["app/stylesheets"])
engine.to_tree.children.each do | node |
next unless node.kind_of? Sass::Tree::VariableNode
node.perform environment
@sass_vars= environment.instance_variable_get("@vars").reject{|k| k == "important" }
%h2 SASS Colors
%th Variable
%th Color
- @sass_vars.each do |var|
%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