I'm usually using a flex reset. Usually you need flex more times than block, so at the end it's easier to set block/inline where needed. Not to mention that using flex actually can have better render performance in some cases.
It has a major drawback. Using reset the classic way like div, article, section, etc {...} It'll conflict with 3rd party libs. I'm doing this in a React environment where no HTML elements are used in JSX, instead there's a unified component for all that's markup and style, so I can simply set a default for these components. I believe if the web would be introduced today or it'd allow braking changes, flex would be the default.
Works well for me, it helps me avoid many side-effects and cross-browser compatibility issues. Using the other way I ended up applying flex to 80% of my elements, which is really annoying.
I'm usually using a flex reset. Usually you need flex more times than block, so at the end it's easier to set block/inline where needed. Not to mention that using flex actually can have better render performance in some cases.
Interesting idea 🔥
It has a major drawback. Using reset the classic way like
div, article, section, etc {...}
It'll conflict with 3rd party libs. I'm doing this in a React environment where no HTML elements are used in JSX, instead there's a unified component for all that's markup and style, so I can simply set a default for these components. I believe if the web would be introduced today or it'd allow braking changes, flex would be the default.setting flex everywhere by default is worse than what I described in this post ...
Works well for me, it helps me avoid many side-effects and cross-browser compatibility issues. Using the other way I ended up applying flex to 80% of my elements, which is really annoying.
Works well for me --> until now ;)
No, worked well for the last 3 years for all my projects. Familiar with React Native's View component? It's basically the same methodology.