Hi Garry,
On 31 Mar 2008, at 14:57, Garry Hill wrote:
> Having variables is alright, but sometimes
> you want to include blocks of css into a selector. At the moment the
> only way to do this is to have multiple css classes on an element, but
> to me that's exposing too much of how your css is structured to the
> html. I have always wanted to be able to use single class names where
> ever possible and use some kind of inheritance in the css code itself
> to sort out repetitive styles.
You can already avoid repetitive styles in CSS by judicious use of
selector grouping, e.g.
.blueoutline, .freebie {
border-color: #000099;
border-width: 3px;
border-style: dotted;
}
.freebie {
font-size: 10px;
padding: 4px;
}
My 2c is that you don't get much benefit by building this
functionality into Sass, even if the syntax is slightly nicer. If
nothing else you end up with larger and more repetitive CSS, unless
you engineer Sass to convert your style of "includes" to the CSS style
(i.e. emit a rule for each "module" of properties, using the group of
all selectors that want to "include" it), but again I can't see that
you win much just by changing the syntax slightly.
Cheers,
-Tom
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---