I'm working on a new WordPress theme for a client and considering utilizing CSS Clamp for responsive typography across desktop and mobile devices. I've checked on its compatibility via "can I use" but I'd love to hear about any real-world experiences or potential pitfalls when implementing this. Thanks in advance!
2 Answers
I’m a big fan of CSS Clamp! As you might have noticed, its support started back in 2018/2019, so unless you're targeting that small percentage of users with older browsers, you should be in the clear. For me, it's my go-to for making things responsive. You can’t go wrong with using (rem, vw, rem)!
Good point! Even if some browsers don’t support clamp, you can easily set a fixed font size for those older versions, and tools like PostCSS can automate that!
Check out this insightful article by Adrian Roselli about how fluid typography can impact accessibility. It’s super informative, and the comments section has additional resources and solutions that might be helpful for you.
That’s great to hear! I’ve found it works really well. Just a heads up though, my minification process tends to mess with clamp because it removes essential spaces.