File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -821,6 +821,26 @@ namespace Sass {
821
821
if (h && h->length ()) {
822
822
if (last ()->combinator () != ANCESTOR_OF && c != ANCESTOR_OF) {
823
823
error (" Invalid parent selector" , pstate_);
824
+ } else if (last ()->head_ && last ()->head_ ->length ()) {
825
+ Compound_Selector* rh = last ()->head ();
826
+ size_t i = 0 , L = h->length ();
827
+ if (Type_Selector* ts = dynamic_cast <Type_Selector*>(h->first ())) {
828
+ if (Selector_Qualifier* sq = dynamic_cast <Selector_Qualifier*>(rh->last ())) {
829
+ Selector_Qualifier* sqs = new Selector_Qualifier (*sq);
830
+ sqs->name (sqs->name () + (*h)[0 ]->name ());
831
+ (*rh)[rh->length ()-1 ] = sqs;
832
+ for (i = 1 ; i < L; ++i) *rh << (*h)[i];
833
+ } else if (Type_Selector* ts = dynamic_cast <Type_Selector*>(rh->last ())) {
834
+ Type_Selector* tss = new Type_Selector (*ts);
835
+ tss->name (tss->name () + (*h)[0 ]->name ());
836
+ (*rh)[rh->length ()-1 ] = tss;
837
+ for (i = 1 ; i < L; ++i) *rh << (*h)[i];
838
+ } else {
839
+ *last ()->head_ += h;
840
+ }
841
+ } else {
842
+ *last ()->head_ += h;
843
+ }
824
844
} else {
825
845
*last ()->head_ += h;
826
846
}
You can’t perform that action at this time.
0 commit comments