I was researching precedence in CSS and reading some articles, including this: http://www.w3.org/TR/CSS2/cascade.html. According to him, attributes like classes have higher precedence over pseudo-elements. However, when I did a simple test, the opposite happened. Below, my code:
HTML:
<ul>
<li class="item">Item</li>
</ul>
CSS:
ul li.item { font-size: 12px; }
ul li:first-letter { font-size: 20px; }
See it here. Why the font-size of the first letter has 12 pixels instead of 20 pixels if the class has higher precedence than pseudo-elements? Thanks in advance.