Skip to content

Instantly share code, notes, and snippets.

@sibsfinx
Created November 18, 2013 08:26
Show Gist options
  • Save sibsfinx/7524488 to your computer and use it in GitHub Desktop.
Save sibsfinx/7524488 to your computer and use it in GitHub Desktop.
using Rails variables in Sass
<% predefined_colors = Settings.predefined_colors.map{ |k,v| "(#{k} #{v})" }.join(',') %>
@each $color in <%= predefined_colors %>
.segment-color-#{nth($color,1)}
background: nth($color,2)
&:hover
background: lighten(nth($color,2),3%)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment