Am 16.12.2009 12:06, schrieb Andrey Popp: > Just for the note. I've managed to add support for simple flat > macroses in CleverCSS. > > > Example: > > def bigmargin: > margin: 20px > > p.box: > $bigmargin > font-size: 95% > > > Some points: > - Macroses cannot contain subrules, only style definition. > - You can't define macros and variable with the same name. > > > Some possibly improvements: > - Add support for macroses with subrules, i.e.: > > def richmacros: > font-size: 12px > p: > text-transform: uppercase > > - Add support for parametrized macroses, i.e: > def richmacros(a): > font-size: $a > > > This work was done in hour or less, so code looks like a dirty hack, sorry.
You may want to look at the Haskell implementation syntax, to which I added macros (with arguments) some time ago: http://sandbox.pocoo.org/clevercss-hs/ cheers, Georg -- You received this message because you are subscribed to the Google Groups "pocoo-libs" 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/pocoo-libs?hl=en.
