CSS Layouts: A Critical Analysis
This article offers a critical analysis of CSS layout mechanisms. The author argues that CSS conflates rich text styling and the layout system, leading to inconsistent inheritance—text styles inherit, but layout properties don't. Nested inline-block and inline-flex models exemplify this conflict: internally they're block or flex, externally they're inline. The author proposes that an ideal layout system would decompose behavior into independent facets, offering a more flexible and intuitive API than the current subtractive one with extra containment barrier hints. Finally, the article touches upon the limitations of relative em scaling and improvements in pixel handling.
Read more