CSS cannot find words or anything related to this, and it cannot automatically just add colors or apply styles.
You can use JavaScript, or you can use some server-side encoding to find out the word "$" and apply some style to this div. For instance:
<div style="color: red;"> $<span style="color: black">php app/console doctrine:schema:create</span> </div>
This will work if you know that the server will read files, in ASP you can use string.Split()
to find out some parts. You can use Regex, for PHP, you may need to do a search!
But this will not work in CSS, its just JavaScript or the server side. You can use CSS only for applying colors or just use style
for each element.
source share