<style>
    li:first-letter { color: red; }
    li.green:first-letter { color: green; }
</style>
<ul style="font-family: ahem; font-size: 100px; -webkit-font-smoothing: none;">
    <li id="target">a</li>
</ul>
<script>
    document.body.offsetTop;
    document.getElementById("target").className = "green";
</script>
