Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
madhavanand-github opened this issue Dec 18, 2023 · 0 comments

Comments

@madhavanand-github
Copy link

madhavanand-github commented Dec 18, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant