samedi 23 octobre 2021

How to conditionally set font-size on Sass depending on string length

I want to conditionally set the font-size of a div depending of the string length with Scss.

Something like this:

if id.length > 30 id.style.fontSize = 2vw

Aucun commentaire:

Enregistrer un commentaire