File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ namespace Sass {
117
117
if (sel) sel = sel->eval (eval);
118
118
119
119
// check for parent selectors in base level rules
120
- if (r->is_root ()) {
120
+ if (r->is_root () || (block_stack. back () && block_stack. back ()-> is_root ()) ) {
121
121
if (Selector_List_Ptr selector_list = Cast<Selector_List>(r->selector ())) {
122
122
for (Complex_Selector_Obj complex_selector : selector_list->elements ()) {
123
123
Complex_Selector_Ptr tail = complex_selector;
@@ -741,8 +741,14 @@ namespace Sass {
741
741
Trace_Obj trace = SASS_MEMORY_NEW (Trace, c->pstate (), c->name (), trace_block);
742
742
743
743
env->set_global (" is_in_mixin" , bool_true);
744
+ if (Block_Ptr pr = block_stack.back ()) {
745
+ trace_block->is_root (pr->is_root ());
746
+ }
744
747
block_stack.push_back (trace_block);
745
748
for (auto bb : body->elements ()) {
749
+ if (Ruleset_Ptr r = Cast<Ruleset>(bb)) {
750
+ r->is_root (trace_block->is_root ());
751
+ }
746
752
Statement_Obj ith = bb->perform (this );
747
753
if (ith) trace->block ()->append (ith);
748
754
}
You can’t perform that action at this time.
0 commit comments