the direct child selector in css(>) selects the direct descedants and passes color to them, but when it comes to text-decoration, it selects other elements too. How come?
http://codepen.io/anon/pen/dDJmE
for color i see it selects only the direct descedants, but why is not the behaviour for text-decoration correct? What am i missing?
CSS
li {
text-decoration: none;
color: black;
}
ol.numbers > li {
text-decoration: underline;
color: red;
}
HTML
<ol class="numbers">
<li> First! </li>
<li> Second!
<ul>
<li> hehe </li>
<li> huhu
<ol>
<li> nested! </li>
</ol>
</li>
</ul>
</li>
<li> Third! </li>
<li> Fourth!
<ol>
<li> oh lala </li>
</ol>
</li>
</ol>