Query
Is it feasible to style a specific portion of a single character?
Interpretation
You cannot apply CSS attributes to parts of characters. However, if you wish to style only a particular section of a character, there is currently no standardized method to achieve this.
Illustration
Can you apply styles to an "X" where half is red and the other half is black?
Ineffective Code
<div class="content">
X
</div>
.content {
position: relative;
font-size: 50px;
color: black;
}
.content:after {
content: 'X';
color: red;
width: 50%;
position: absolute;
overflow: hidden;
}
Check out the demo on jsFiddle
Objective
I am looking to style the Font Awesome icon-star
symbol. If I have a dynamic-width overlay, shouldn't it be possible to accurately represent scores visually?