The best way to ask my question is to lay out a scenario.
Say I have the following markup:
<div class="box">
<div class="jack">
</div>
<div class="jill">
</div>
</div>
Right, so the way I was taught to affect the child through the parent was with something like this:
.box .jack, .box .jill{
width: 100px;
height: 100px;
background-color: yellow;
}
My question stems from my recent learning of responsive CSS, where I've seen lines such as: @media only screen{}. It has (please forgive any botched terminology) CSS listed inside CSS?? (Curly Brackets within Curly Brackets).
Is there a way to affect the aforementioned markup with something like that? Example:
.box{
.jack{
/*Mooooom, I don't want to go shopping for school clothes*/
}
.jill{
/*Yay, shopping! I need all the new styles!!!*/
}
}
I've experimented a couple times in a JSFiddle, and it didn't work. My hope is that I'm missing some kind of key word or character. Or is this just not possible to affect elements with CSS in this format?
P.S. I do not know the term of what I am looking for, so Google isn't helping. If you know that this is already answered, please link me to it!