hi,
we've started converting all our css templates to sass. really
beautiful stuff.
While doing this I got an idea that I wanted to pitch here (I could
not find any post about this in the group yet, but I guess you might
already have thought about this).
Wouldn't it be interesting if sass stylesheets could have macros that
e.g. would take w3c css-properties and generate css that work in most
browsers? A basic example would be the opacity property, where you
basically have to write something like:

#transparent {
  opacity : 0.5; /* ff 2 (or 3?)+), safari 2 (or 3+?) */
  -moz-opacity : 0.5; /* older ff */
  filter:alpha(opacity=50);
}

wouldn't it be nice if you in sass would simply do:

#transparent
  opacity: 0.5

and the ugliness would stay in the generated files. I'm sure there are
a few more standard cases (corner-radius would be one) where this
technique could be used. This could also be done through special
comments or namespaced css selectors in the sass as well, e.g:

#transparent
  opacity 0.5 //@my-opacity-macro

#transparent
  -sass-opacity : 0.5

I think I like the last style best, actually. it could also be
implemented so that there were certain "targets" that the sass file
could be generated for (and several ones at the same time, too). for
example there could be an extra file generated for ie5.5 and 6 that
contained only the #transparent filter:alpha(...) part in the example
above.

What do you think?

cheers // eric
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to