Created
April 24, 2009 22:47
-
-
Save beastaugh/101383 to your computer and use it in GitHub Desktop.
Generate some seasonal CSS with Stylish
This file contains 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 characters
# To get the Stylish gem: | |
# | |
# sudo gem install ionfish-stylish -s http://gems.github.com | |
# | |
require 'rubygems' | |
require 'stylish' | |
style = Stylish.generate do | |
rule :season do | |
a :color => :link | |
rule "a:hover", :color => :hover | |
end | |
end | |
seasons = [{:season => ".autumn", :link => "90211c", :hover => "bb5f1b"}, | |
{:season => ".winter", :link => "16335f", :hover => "5a9bce"}, | |
{:season => ".spring", :link => "448e1c", :hover => "6bcf35"}, | |
{:season => ".summer", :link => "c8ad1a", :hover => "d3482c"}] | |
seasons.each do |season| | |
puts style.to_s(season) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment