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