Skip to content

Instantly share code, notes, and snippets.

@beastaugh
Created April 24, 2009 22:47
Show Gist options
  • Save beastaugh/101383 to your computer and use it in GitHub Desktop.
Save beastaugh/101383 to your computer and use it in GitHub Desktop.
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