You very well might be on to something.
Though, I'd like to improve the helper API for that though. Perhaps
use something more like our Haml helpers.
def make_theme(body_id,p_color,p_background)
open :body, :id => body_id do
open :p do
set.background = p_background
set.color = p_color
end
end
end
Maybe something like that?
Where would we define those?
-hampton.
On Nov 19, 2007 3:08 PM, pimpmaster <[EMAIL PROTECTED]> wrote:
>
> 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
-~----------~----~----~----~------~----~------~--~---