DEV Community

Discussion on: Never make your text container a flexbox container

 
afif profile image
Temani Afif

Even if you expect html and you want to have html the issue will still remain. How many developer are aware about how the output will be if the text will contain a link? how many beginners will even think that if I add a link to the above the result will look like I detailed? only few and this is what I am pointing here.

You may be aware about everything and you know perfectly your data but if you don't know flexbox very well you will get that surprise one day. I am trying to avoid you that surprice by explaining some quirks around flexbox that no one will explain to you until you face them ;)

Thread Thread
 
andreidascalu profile image
Andrei Dascalu

That is exactly what I'm saying. If you don't have guarantees it's just text then it's not just text and you don't treat it like just text (eg use a wrapper like you said or whatever fits the use case).
If you do expect just text then you implement the necessary safeguards and treat it like just text (case in which it's OK to just use the box setup).

Some comments have been hidden by the post's author - find out more