• Shaarli
  • Tag cloud
  • Picture wall
  • Daily
  • RSS
  • Login
4252 shaares
Filters

How to take control of Flexbox

QRCode
  • Flex children are just that: display: block or display: inline don't have any affect once display: flex is defined on the parent.

  • Flexbox is controlled inside --> out: The size of the children affect the size of the parent. Grid is outside --> in: the size of the parent is specified and the children fit inside.

  • Defaults: flexbox by default uses the 'best' size for the children. It doesn't expand them, but it will shrink them if necessary.
    flex-shrink: 1;
    flex-grow: 0;

  • If you have multiple rows and columns, and you want them consistent, grid is the better choice

  • width is the same as flex-basis IF you are using columns

https://www.youtube.com/watch?v=Ns12ALe8aqI
April 1, 2024 at 2:37:36 PM EDT *
flexbox css youtube
FILLER
Shaarli · The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community · Documentation
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community