|<<>>|12 of 339 Show listMobile Mode

A good explainer of how the core concept of CSS is layout

Published by marco on

This is a nice ~13-minute explanation of how CSS is a declarative language, where you describe the metadata of your styles. The layout algorithm determines which property values affect the size and position of the element.

CSS makes sense when you realize it's a collection of algorithms by Kevin Powell (YouTube)

Generally the properties position and display properties determine which layout algorithm is used for a given element. The layouts are,

 Kevin Powell

Most properties work the same in all layouts. Some properties only have an effect in a specific layout mode, e.g., grid-template-columns is ignored if the layout is not grid. Other properties are interpreted differently or completely ignored depending on layout mode, e.g., width and margin are ignored in the inline layout.