This repository was archived by the owner on Oct 24, 2025. It is now read-only.
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 {
19011901 virtual unsigned long specificity () {
19021902 return Constants::Specificity_Universal;
19031903 }
1904+ virtual void set_media_block (Media_Block* mb) {
1905+ media_block (mb);
1906+ }
19041907 };
19051908 inline Selector::~Selector () { }
19061909
@@ -2405,6 +2408,11 @@ namespace Sass {
24052408 if (tail ()) sum += tail ()->specificity ();
24062409 return sum;
24072410 }
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+ }
24082416 bool operator <(const Complex_Selector& rhs) const ;
24092417 bool operator ==(const Complex_Selector& rhs) const ;
24102418 inline bool operator !=(const Complex_Selector& rhs) const { return !(*this == rhs); }
@@ -2507,6 +2515,12 @@ namespace Sass {
25072515 }
25082516 return sum;
25092517 }
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+ }
25102524 Selector_List* clone (Context&) const ; // does not clone Compound_Selector*s
25112525 Selector_List* cloneFully (Context&) const ; // clones Compound_Selector*s
25122526 virtual bool operator ==(const Selector& rhs) const ;
Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ namespace Sass {
136136 env = new Env (environment ());
137137 env_stack.push_back (env);
138138 }
139+ sel->set_media_block (media_block_stack.back ());
139140 Block* blk = r->block ()->perform (this )->block ();
140141 Ruleset* rr = SASS_MEMORY_NEW (ctx.mem , Ruleset,
141142 r->pstate (),
You can’t perform that action at this time.
0 commit comments