2010/1/26 Mislav Marohnić <[email protected]>: > You're forgetting that in CSS these are not functions with arguments. They > are various syntaxes for marking up color literals. Sass is a scripting > language and it can have real functions. In a programming language, you > mostly name functions with regard on what they do, not what kind of > arguments they take.
Yes, in a programming language you name functions based on what they do, but we're talking about something that needs to be used and understood by non-programmers. The "functional notation" (that's the wording used in the spec) found in CSS3 uses the "function" name to describe what is between the brackets. It's my belief that Sass should more closely follow the conventions of CSS rather than programming. > We don't need a function. Functions, by definition, map their argument(s) to > some other value. We shouldn't need a function just to enter color values. > What we need is a good syntax. I proposed this in my last email. > In CSS, this is syntax (not function): > > rgba(0,0,0,.5) > We want to be able to specify the same, only with hex. We could do: > rgba(#000,.5) or rgba(black,.5) > But that might be confusing. We could change the name, but—in my > opinion—keeping it simple like: > #000.5 or #000%50 > …is much nicer. I don't really care whether it is a programming function or CSS "functional notation". What I care about is whether whatever syntax is used in order to generate the CSS makes sense and is intuitive. Hex values are already well understood by designers, and the method of expressing the level of alpha also makes sense, therefore the following would make sense, to me: p.foo color: hexa(#cc3,0.5) But this would not: p.foo color: rgba(#cc3,0.5) That's all I'm trying to say. :-) Cheers, Charles -- 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.
