Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-layout-api] Come up with a better name for "Box"? #254

Closed
bfgeek opened this issue Jul 6, 2016 · 2 comments
Closed

[css-layout-api] Come up with a better name for "Box"? #254

bfgeek opened this issue Jul 6, 2016 · 2 comments

Comments

@bfgeek
Copy link
Contributor

bfgeek commented Jul 6, 2016

Box in context of the layout API is just being used as input to the layout algorithm.

They are "something that has an associated computed style". In this context they have no layout information themselves. (Fragments have that in this context).

This may be confusing to folks from CSS specs / authors who think of a box having layout information.

¯_(ツ)_/¯

@frivoal
Copy link
Contributor

frivoal commented Jul 8, 2016

The CSS terminology used to be a lot more vague, and throw the words box or element around without much consideration, but I think that in the more modern and deliberate usage, the distinction between Box and Fragment does match the way these words are used in the spec. (even though in contexts where we don't care about fragmentation, I am pretty sure we still occasionally use box when we mean box fragment.)

@tabatkins
Copy link
Member

Yeah, a box knows what its display type is and has fully resolved computed styles, but it doesn't have layout information - it generates fragments which do have size/position. Boxes are abstract style/content containers, is all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants