shuding / react-wrap-balancer

Simple React Component That Makes Titles More Readable
https://react-wrap-balancer.vercel.app
MIT License
4.01k stars 65 forks source link

native css variables for this #91

Closed sakgoyal closed 6 months ago

sakgoyal commented 6 months ago

what is the difference in using this package versus just applying the text-wrap : pretty property for text? using native css should be much more efficient wouldn't it?

markpinero commented 6 months ago

@sakgoyal This package is for cross-browser functionality. If you check Safari's compatibility, it only supports the latest version. And if you check the source code implementation, it checks if text-wrap: balance is supported, it defaults to that rather than the package code. So it does just what you're eluding to!