Hey there,

I have a problem using the @extend rule in sass.

I have the following rules in the .scss file:

.box {width:100px;}
.wrapper {background:black;}
.box.wrapper {margin-right:8px;}

.box1 {@extend .box; @extend .wrapper; background:red;}
.box2, .box3 {@extend .box; @extend .wrapper; background:green;}

The output in the css file is correct except for this strange line:

.box.wrapper, .box1, .box1.box2, .box1.box3, .box2, .box2.box3, .box3
{
  margin-right: 8px; }

Why does the algorithm combine .box1.box2, .box1.box3 and so forth and
applys the rule that I had specified for .box.wrapper?

It gets very bloated, especially with more classes, because it should
just say:

.box.wrapper, .box1, .box2, .box3 {margin-right:8px;}

Am I missing something?
Is the interpretation from scss to css correct?
Can I somehow avoid this redundant code?

Thanks alot,

Andrej



-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to haml@googlegroups.com.
To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to