2

Currently I display my article titles with a background of 90% width of the post thumbnail, placed on top of it. Since there's only room for 1 line of text in the title, there is rare occurrences where a character limit is needed. My question is if there's a way to instead of cutting the title short with a character limit, as I'm currently doing, scale down the font-size to fit the entire title?

Short and simple: If title goes over width of 90% of entry-header, shrink the font size to fit the max-size of 90%, so I won't have to use a character limit.

Finding JS solutions, but they use a set width. Also viewport units scales in relation to body, so that wouldn't work.

I'm just curious, as I can how this would be quite useful in designing WordPress-themes in general, if anyone got a specific solution. Thanks. :)

Matthew Arkin
  • 4,460
  • 2
  • 27
  • 28
Thomas
  • 85
  • 1
  • 6

0 Answers0