← #152 Find the root NPM package to update

Escape CSS class names

Topics: CSS

CSS class names can't contain the : character. For example, it's not possible to declare the following class in CSS:

.lg:flex {

However we can use the \ character to correct it:

.lg\:flex {

The class name is usable in HTML as usual:

<div class="lg:flex">

Using \ to escape CSS class names has been used a lot in some CSS frameworks such as Tailwind.

Fix a typo or suggest an improvement
#154 Pick the first and last items of an array