Get the latest tech news

Targetting specific characters with CSS rules


You can't. There is no way to use CSS to apply a style to every letter "E". It simply can't be done. At least, that's what they want you to think… What if I told you there was a secret and forbidden way to target specific characters in text and apply some styles to them? As part of my experiments in creating a "drunk" CSS theme, I thought it would be useful to change the presentation of s…

What if I told you there was a secret and forbidden way to target specific characters in text and apply some styles to them? As part of my experiments in creating a "drunk" CSS theme, I thought it would be useful to change the presentation of specific characters. The WOFF2 format has a new(ish) COLR table which allows you to create multi-coloured fonts.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of css

css

Photo of CSS rules

CSS rules

Photo of specific characters

specific characters

Related news:

News photo

Apple has a private CSS property to add Liquid Glass effects to web content

News photo

Liquid Glass in the Browser: Refraction with CSS and SVG

News photo

What Does will-change In CSS Do?