DEV Community

Discussion on: The CSS Box Model

Collapse
 
alvaromontoro profile image
Alvaro Montoro

While I agree that the wording may not be the best (I will work on it), in the article, I talk about boxes, areas, and edges, which is the terminology used in the latest draft from the w3c (from March 6, 2020):

[...] The four sides of the content edge together define the box’s content box. [...] The four sides of the padding edge together define the box’s padding box, which contains both the content and padding areas. [...] The four sides of the border edge together define the box’s border box, which contains the box’s content, padding, and border areas. [...]

Collapse
 
alohci profile image
Nicholas Stimpson • Edited

You do. It's a good article. But the terminology is confusing - at least it confused me for a long time - until one day someone pointed out that the spec says that containing blocks are not boxes, even though the CSS 2.x spec says that "block" is an abbreviation for "block box", and I had to revise my mental model of what a box was. Of course, this confusing naming is not limited to the content, padding, border and margin "box"es. Line boxes and Page boxes are also not boxes in the CSS sense.

Thread Thread
 
alvaromontoro profile image
Alvaro Montoro

I reviewed the post and updated a little bit the wording, still kept some of the "boxes", but tried to emphasize on the "areas."