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
Wasd | Kamikaze
Wasd | Kamikazeβ€’15mo ago
First picture is a example: it just get push to the sides using em second picture: its not taking the entire width
Wasd | Kamikaze
Wasd | Kamikazeβ€’15mo ago
vince
vinceβ€’15mo ago
flex: 1 on your flex children should scale them width wise, typography wise you may want to look into clamp function
Wasd | Kamikaze
Wasd | Kamikazeβ€’15mo 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β€’15mo 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