{"id":2071,"date":"2009-01-26T05:45:44","date_gmt":"2009-01-26T12:45:44","guid":{"rendered":"http:\/\/css-tricks.com\/?p=2071"},"modified":"2016-08-15T12:27:34","modified_gmt":"2016-08-15T19:27:34","slug":"set-font-size-based-on-word-count","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/set-font-size-based-on-word-count\/","title":{"rendered":"Set Font Size Based On Word Count"},"content":{"rendered":"

In my little Quotes on Design<\/a> project, some of the quotes are longer than others. I thought it might be kind of nifty to beef up the font-size on the shorter quotes and trim down the size for the longer quotes so they all match a bit better in terms of the size they take up on the screen.<\/p>\n

\"\"<\/figure>\n

Rather than do this with a hard-coded number in each of the quotes, I did it with JavaScript. This allows for easier adjustments down the road and nicely keeps content and presentation separate. <\/p>\n

The Plan<\/h3>\n