Functions would definitely only appear in SassScript (the stuff you use to define constants) so they don't conflict with other (future) CSS stuff.
As for conflicts with url and such-like, I could see two ways of handling this. First, we could just require that people wrap those with quotes: !background_image= "url(/images/foo.png)" Or we could make undefined functions evaluate to literal CSS, which would allow !background_image= url(/images/foo.png) to work. I'm liking the latter. - Nathan s.ross wrote: > This very interesting snippet re-raises the question of how you will > recognize function-like thingies. They appear to be useful in two > contexts: > > - right-hand-side of a constant definition > - attribute > > But how do you differentiate between a func and a css construct like > url() without compromising the clean readability of Sass? > > Any thoughts? > > > On Jun 14, 2007, at 11:51 AM, weepy wrote: > >> >> it would be useful to be able to do >> >> #myform >> background: hsl(3,4,255) >> >> as well >> >> >> >> On Jun 14, 6:20 pm, "s.ross" <[EMAIL PROTECTED]> wrote: >>> Nathan-- >>> >>> Were you anticipating some syntax like: >>> >>> !background-color=hsl(3,3,25) >>> >>> This would fit nicely into some kind of plugin architecture where a >>> function is recognized by the presence of some simple token like open >>> and close parentheses. However, there is one potential conflict I can >>> see: Constants like: >>> >>> !background-image=url(/images/foo.png) >>> >>> would conflict. Have you done any thinking about how the syntax might >>> look? >>> >>> Steve >>> >>> On Jun 13, 2007, at 7:30 PM, Nathan Weizenbaum wrote: >>> >>> >>> >>> >>> >>>> At the moment, SassScript doesn't have any support for function-like >>>> things, and I don't want to add anything major before 1.7. That is >>>> something I'd definitely consider adding for 2.0, though. >>> >>>> - Nathan >>> >>>> rebo wrote: >>>>> Nice one steve , good work. >>> >>>>> On Jun 13, 7:11 pm, "s.ross" <[EMAIL PROTECTED]> wrote: >>> >>>>>> I put a pastie out that might help: >>> >>>>>> http://pastie.caboo.se/70169 >>> >>>>>> Steve >>> >>>>>> On Jun 13, 2007, at 8:49 AM, rebo wrote: >>> >>>>>>> As an example could have >>> >>>>>>> !bgcol = rhsl(23,50,50) ( a green say) >>> >>>>>>> .lightbg = !bgcol + rhsl(0,0,20) ( for light green) >>>>>>> .darkbg = !bgcol - rhsl(0,0,20) (for dark green) >>> >>>>>>> The advantage is now that i can define a websites colour scheme by >>>>>>> just changing one colour. One could go further and define rcomp >>>>>>> () or >>>>>>> other colour functions to calculate a complementary colour for >>>>>>> instance. >>> >>>>>>> On Jun 13, 4:33 pm, rebo <[EMAIL PROTECTED]> wrote: >>> >>>>>>>> Just wondering if you could add a SASS command so that colours >>>>>>>> can be >>>>>>>> defined in HSL (hue,saturation, lightness) format, which then gets >>>>>>>> converted to rgb for the css (so it works in all browsers). This >>>>>>>> would be useful so that one could define a colour with a range of >>>>>>>> lightness's using the colour arithmetic in SASS. >>> >>>>>>>> thanks >>> >>>>>> Steve Ross >>>>>> [EMAIL PROTECTED]://www.calicowebdev.com >>>>>> <http://www.calicowebdev.com> >>> >>> Steve Ross >>> [EMAIL PROTECTED]://www.calicowebdev.com >>> <http://www.calicowebdev.com> >> >> >> > > Steve Ross > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > http://www.calicowebdev.com > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
