I'm working on a wordpress theme, using Mamp Local Server and SCSS to compile CSS.
I have a JS script for menu interaction because my menu has sub-menus.
This is before script:
<ul>
<li></li> //level 0
<li></li> //level 0
<li> //level 0
<ul class="children"> //level 1
<li></li>
<li></li>
</ul>
</li>
<li></li> //level 0
</ul>
And this is after script:
<ul>
<li></li> //level 0
<li></li> //level 0
<li> //level 0
<ul class="children toggled-on"> //level 1
<li></li>
<li></li>
</ul>
</li>
<li></li> //level 0
</ul>
So I set an SCSS rule like this:
.toggled-on {
display:block;
}
but the element doesn't get the style.
If I change the SCSS rule to this it works:
.children.toggled-on {
display:block;
}
From what I've learned about CSS it should work in both cases.
Where am I going wrong?