-
Notifications
You must be signed in to change notification settings - Fork 111
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
Implement CSS Block layout (Display::Block
)
#474
Conversation
690a189
to
a5072f8
Compare
This still needs a bunch of testing, and a couple of minor feature additions. But it's mostly implemented and working, and I'm not anticipating major changes being required, so opening this up for review. See "Feedback wanted" section for recommendations on how to approach reviewing this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't notice any obvious stuff in the algorithm, although I didn't look at it in too much detail.
I mostly just noticed a few copy & paste errors for doc comments.
What do you think about splitting the test_fixtures
(and corresponding generated files) into multiple folders?
I think one folder per algorithm and maybe one for mixed tests would be useful to organize things a bit.
I'm not sure how hard that would be to integrate in the generation script though.
Replace mentions of flexbox with block Co-authored-by: TimJentzsch <TimJentzsch.github.com@timjen.net>
It turns out that the baseline of a block node is always it's "fallback baseline" (it's bottom edge). And in Taffy we can represent this by simply returning `Point::NONE` as the baseline.
container overflow
Display::Block
)Display::Block
)
@alice-i-cecile I'm now considering this done pending any changes requested in review. There could of course always be more tests, but this PR already contains 209 which I'm considering a pretty good considering that the block algorithm is relatively simple. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good; let's merge this now.
Objective
Display::Block
) #405Tasks
Display::Block
variant to theDisplay
enumdisplay: block
support to the test generatorhttps://www.hongkiat.com/blog/css-margin-auto/
https://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width
Feedback wanted
src/compute/block.rs
).perform_child_layout
method (inLayoutTree
trait)SizeAndBaselines
(nowSizeMarginsAndBaselines
struct)