I have one way to get what I want wish SASS, the simple parent child selectors to handle the z-index of tabs.
SASS
//HANDLE THE Z-INDEXS for the SECTION TAB
$tab: 'a.x-tab.sectionbar-tab';
$active: 'a.sectionbar-tab.x-tab-active'; //Currently Active Tab
.section {
&.tabs.x-tab-bar-plain {
#{$tab}:first-child {z-index: 4 !important;};
#{$active}:first-child {z-index: 4 !important;};
#{$tab} + #{$tab} {z-index: 3 !important;};
#{$tab} + #{$active} {z-index: 3 !important;};
#{$tab} + #{$tab} + #{$tab} {z-index: 2 !important;};
#{$tab} + #{$tab} + #{$active} {z-index: 2 !important;};
}
}
My new solution.
I'd like a simpler way to add the child selectors than shown up above. I have the z-indexes being added in.
SASS
$tab: unquote("a.x-tab.sectionbar-tab");
$active: unquote("a.sectionbar-tab.x-tab-active"); //Currently Active Tab
$plustab: unquote("+ a.x-tab.sectionbar-tab");
$plusactive: unquote("+ a.sectionbar-tab.x-tab-active"); //Currently Active Tab
$appendedlist: append($tab, $plustab, space);
$activeappendedlist: append($active, $plusactive, space);
@mixin tab-type($tabtype) {
@if $tabtype == eightabs {
$items: 4;
@while $items > 0 {
&.tabs .x-tab-bar-plain {
#{$appendedlist} {
z-index: $items;
}
#{$activeappendedlist} {
z-index: $items;
}
}
$items: $items - 1;
}
}
}
.section {
@include tab-type(eightabs);
}
Hopefully this makes sense. Any help is appreciated.
Note: I am using Extjs 4.2.2 / Sencha CMD 4 to process my SASS to CSS so I am only using SASS 3.0.2, so the @extend/%extendable breaks.