Why is the <sub>
and <sup>
not supporting the ::first-letter
CSS pseudo-element? Any solutions?
p:first-letter,
sub:first-letter,
sup:first-letter {
color: red;
font-weight: bold;
}
<p>This text contains <sub>subscript</sub> text.</p>
<p>This text contains <sup>superscript</sup> text.</p>
Update
According to @temani-afif, this issue was addressed on html - CSS :first-letter not working - Stack Overflow, but it does not specifically mention <sub>
and <sup>
tags.