I know I may get pelted with eggs for even suggesting this, but I've
been running across some repetitive code in my stylesheets that would
be remedied with a little helper love in Sass. In particular writing
styles for pages that have similar designs but different color schemes
(where user preferences set the scheme) can be very painful to write
body#seagreen
p
:background = !algae
:color = !caribe
body#candyred
p
:background = !swedish_fish
:color = !wintermint
// etc etc etc
What I wish I could do is write my own helpers for Sass
def make_theme(body_id,p_color,p_background)
"body##{body_id}"
" p"
" :background = #{p_background}"
" :color = #{p_color}"
end
Then I could just do this for each theme
make_theme('candyred','!swedish_fish','!wintermint')
Is this idea totally wacked, or am I actually onto something here?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---