Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions csstyle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,12 @@ $csstyle-root-id: 'csstyle' !default;
$partIndex: $partIndex - 1;

$component: str-slice(#{&}, 0, $optionIndex);
$component: str-slice($component, 0, $partIndex);

// part is nested in an option
@if $optionIndex > 0 {
// part is also nested in another part
@if ($partIndex > 0){
#{_build_selector("&" + $csstyle-part-symbol, $names)}{
@content;
}
}
@else{
#{_build_selector("& " + $component + $csstyle-part-symbol, $names)}{
@content;
}
// part is nested in an option or in another part
@if $optionIndex > 0 or $partIndex > 0 {
#{_build_selector("& " + $component + $csstyle-part-symbol, $names)}{
@content;
}
}
@else {
Expand Down