Proper way to scale text/max width with flexbox

What is the proper way to scale text i feel like using vw isn't a good way. How do i make it so my objects inside my block is filling the entire width and scales everything the width/text so it keeps fitting
5 Replies
kami
kamiOP•2y ago
First picture is a example: it just get push to the sides using em second picture: its not taking the entire width
kami
kamiOP•2y ago
vince
vince•2y ago
flex: 1 on your flex children should scale them width wise, typography wise you may want to look into clamp function
kami
kamiOP•2y ago
flex: 1; does work but it makes the centered text of centered clamp also works thank you nvm about the of center i just needed to center it haha
vince
vince•2y ago
Cool 🙂 More specifically you probably only want to use flex-grow: 1 if you want it to only grow, flex is shorthand for flex grow, flex shrink, and flex basis
Want results from more Discord servers?
Add your server