Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAbsolutely positioned block box are collaping margin with its previous sibling #12676
Comments
|
This blocks #12610 in some sense because all the |
|
I've already identify the problem, but my naive patch caused some regression. Need to Double check with the spec to fix the regression. |
|
The problem is this comment in
The hypothetical box has to consider the previous flow's bottom margin if it has no |
|
The regressed test case was caused by #12824 , which is not really related to this, so I'll merge this first. |
This was referenced Aug 15, 2016
bors-servo
added a commit
that referenced
this issue
Aug 15, 2016
Fix absolute-flow's auto positioning <!-- Please describe your changes on the following line: --> If an absolute positioned flow has no top, bottom, left, right property, its hypothetical box position should be the margin-end of its previous sibling, not the border-end. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #12676 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12873) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Aug 15, 2016
Fix absolute-flow's auto positioning <!-- Please describe your changes on the following line: --> If an absolute positioned flow has no top, bottom, left, right property, its hypothetical box position should be the margin-end of its previous sibling, not the border-end. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #12676 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12873) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Aug 15, 2016
Fix absolute-flow's auto positioning <!-- Please describe your changes on the following line: --> If an absolute positioned flow has no top, bottom, left, right property, its hypothetical box position should be the margin-end of its previous sibling, not the border-end. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #12676 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12873) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Aug 15, 2016
Fix absolute-flow's auto positioning <!-- Please describe your changes on the following line: --> If an absolute positioned flow has no top, bottom, left, right property, its hypothetical box position should be the margin-end of its previous sibling, not the border-end. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #12676 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12873) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

According to the spec, a block element with
position:absoluteand NOtop,bottom,left,rightdefined should NOT collapse with any margin.But the following test case shows that that red box is collapsing with the
#margin-box's bottom margin.Screenshot: (left=servo, right=gecko)
