I have a SASS list for my colors
I have a mixin to create panels, which has nested elements (e.g. the panel heading)
when I use my mixin on panel-1 and panel-2 I get the right color on the heading of the panels...
here is the sample: http://www.sassmeister.com/gist/0d958ed38e58466d61c32a46e8e2538f
Now I tried that approach on a bit more complex scenario but I get the wrong color on the heading... any idea why would that be?
http://codepen.io/Zurc/pen/EWbOKG?editors=0100
$colors: #123456, #234567;
@mixin panelcolor($color: red) {
background: rgba($color, .1);
border: 1px solid $color;
&-heading {
background: rgba($color, .2);
}
}
.panel-1 {
@include panelcolor(nth($colors, 1))
}
.panel-2 {
@include panelcolor(nth($colors, 2))
}
Thanks!