Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Generate some seasonal CSS with Stylish
# 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