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;
@@ -744,8 +744,14 @@ namespace Sass {
744
744
Trace_Obj trace = SASS_MEMORY_NEW (Trace, c->pstate (), c->name (), trace_block);
745
745
746
746
747
+ if (Block_Ptr pr = block_stack.back ()) {
748
+ trace_block->is_root (pr->is_root ());
749
+ }
747
750
block_stack.push_back (trace_block);
748
751
for (auto bb : body->elements ()) {
752
+ if (Ruleset_Ptr r = Cast<Ruleset>(bb)) {
753
+ r->is_root (trace_block->is_root ());
754
+ }
749
755
Statement_Obj ith = bb->perform (this );
750
756
if (ith) trace->block ()->append (ith);
751
757
}
You can’t perform that action at this time.
0 commit comments