3 ms·
IMO, Flexbox is one of those skills that would solve more than half of my frontend problems if I were good at it.
by krat0sprakhar 11y ago
IMO, Flexbox is one of those skills that would solve more than half of my frontend problems if I were good at it.
- paulojreis 11y agoNot quite, I think. I've been using it, it's cool and all, solves some common CSS issues, but it comes with its own set of problems. For starters, it's a whole new set of browser incompatibilities that you have to learn [1], some of them render flexbox almost useless [2]. Additionally, IMHO, it's model is leaky; leaky in the sense that the it relies on DOM structure - a `display: flex` element will do it's thing by affecting the direct child elements. This means that a) if your component is wrapped by another component, you'll have a hard time predicting how it will be laid out/isolating the behavior; and b) if, by some reason (e.g. using Angular directives) a wrapper is added between the `display: flex` and the flex item elements, the layout will be lost. [1] https://github.com/philipwalton/flexbugs https://github.com/philipwalton/flexbugs [2] https://code.google.com/p/chromium/issues/detail?id=346275 https://code.google.com/p/chromium/issues/detail?id=346275