StefanKovac/flex-layout-attribute

Explicit size weirdly always operates on width

rjgotten opened this issue · 1 comments

If size-x<n> rules use flex to size along the main flex axis, then conceptually size-<n>of<m> rules should also work on the main flex axis. Instead, they are locked to always work on width, i.e., always on the horizontal axis, even for layouts that use column direction.

Hi @rjgotten you are right about size-<n>of<m> rule using width only. It's intentional, a user can choose the sizing method, based on project needs, and this one has a classic approach as seen in any other css grid system (item size as % of its container). Item height is determined by its content (if not set explicitly).

size-x<n> rule is basically flex-grow property and always applies regardless of direction (row or column).

Hope that makes sense.