Hi Tom,
On 31 Mar 2008, at 15:49, Tom Stuart wrote:
> 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;
> }
>
Very good point, but my experience is that this is a maintainability
nightmare.
To figure out all the rules on a single selector you have to jump
around all over
a file (basically using a search) and mentally piece together the
final set of rules.
Plus if you want to rename a selector, you have to do it in all the
places you've
grouped it. Eeek.
I like to have all the rules for a selector in one place. I know that
with the include
syntax I still have to jump up the file to see what those rules are,
but at least
with an include/mixin method it's just a case of jumping up to the one
place
where those rules are defined.
I just think the mixin syntax is less taxing on my (possibly failing)
memory.
Now I think about it, one of my ultimate goals for this idea was to be
able to choose
the style you want, either have the mixins work as per my patch,
included in each
definition, or have Sass manage the selector groupings. The problem is
that the
latter method is significantly more difficult to implement and, IMHO,
only has the
advantage of marginally smaller final file sizes.
Best,
g
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---