File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1901,6 +1901,9 @@ namespace Sass {
1901
1901
virtual unsigned long specificity () {
1902
1902
return Constants::Specificity_Universal;
1903
1903
}
1904
+ virtual void set_media_block (Media_Block* mb) {
1905
+ media_block (mb);
1906
+ }
1904
1907
};
1905
1908
inline Selector::~Selector () { }
1906
1909
@@ -2405,6 +2408,11 @@ namespace Sass {
2405
2408
if (tail ()) sum += tail ()->specificity ();
2406
2409
return sum;
2407
2410
}
2411
+ virtual void set_media_block (Media_Block* mb) {
2412
+ media_block (mb);
2413
+ if (tail_) tail_->set_media_block (mb);
2414
+ if (head_) head_->set_media_block (mb);
2415
+ }
2408
2416
bool operator <(const Complex_Selector& rhs) const ;
2409
2417
bool operator ==(const Complex_Selector& rhs) const ;
2410
2418
inline bool operator !=(const Complex_Selector& rhs) const { return !(*this == rhs); }
@@ -2507,6 +2515,12 @@ namespace Sass {
2507
2515
}
2508
2516
return sum;
2509
2517
}
2518
+ virtual void set_media_block (Media_Block* mb) {
2519
+ media_block (mb);
2520
+ for (Complex_Selector* cs : elements ()) {
2521
+ cs->set_media_block (mb);
2522
+ }
2523
+ }
2510
2524
Selector_List* clone (Context&) const ; // does not clone Compound_Selector*s
2511
2525
Selector_List* cloneFully (Context&) const ; // clones Compound_Selector*s
2512
2526
virtual bool operator ==(const Selector& rhs) const ;
Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ namespace Sass {
136
136
env = new Env (environment ());
137
137
env_stack.push_back (env);
138
138
}
139
+ sel->set_media_block (media_block_stack.back ());
139
140
Block* blk = r->block ()->perform (this )->block ();
140
141
Ruleset* rr = SASS_MEMORY_NEW (ctx.mem , Ruleset,
141
142
r->pstate (),
You can’t perform that action at this time.
0 commit comments