Professional-React-and-Next.js-Course icon indicating copy to clipboard operation
Professional-React-and-Next.js-Course copied to clipboard

Fancy Counter : How to make the font size dynamic to the length of the text content inside ?

Open madhavanand-github opened this issue 1 year ago • 0 comments

I searched for couple of solutions, but still didn't answer the quest.

  1. clamp property, but I see that makes responsive to viewport.
  2. Pure CSS to make font-size responsive based on dynamic amount of characters
  3. Dynamically change the size of the font size based on text length
  4. This is pretty close solution Codepen
  5. Also tried, ChatGPT, Bard, Claude, all stuck with clamp & viewport.

Any pure css solution or other work around.

image

madhavanand-github avatar Dec 18 '23 08:12 madhavanand-github