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 upZ-index should be ignored for non-positioned stacking contexts #8023
Conversation
|
@pcwalton r? |
|
@bors-servo: r+ |
|
|
Z-index should be ignored for non-positioned stacking contexts When a stacking-context is not positioned, its z-index should be ignored. This is per CSS 2 9.9.1. The only exception to this is when the z-index is applied to an element with display: flex | inline-flex. inline-flex does not appear to be implemented at this time so we only do this for flex. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8023) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
|
I accidentally uploaded an old version of the PR. I have canceled the previous bors test run and have uploaded the complete version. @pcwalton, would you mind taking a quick look at this again? Very sorry for the confusion. |
|
@bors-servo r- Stop adding new tests to test-ref. |
|
I feel like adding test coverage to existing old-style reftests is a grey area, since the changes will be ported along with the rest of the test. |
|
@Ms2ger Sorry. I wasn't sure exactly what to do in this in-between time. I'm happy to use the WPT infrastructure if that is better. Do you have any guidance for how I can add tests for this issue? |
|
Oh, misread the diff. I guess this is fine for now. |
|
@samlh There is an unrelated bug with the placement of absolute blocks which may be causing this. I'll take a look. |
|
@samlh This difference isn't due to the positioning bug. I'm tracking down the issue now. Thanks for letting me know. |
|
|
|
@samlh The issue here seems to be that Blink and WebKit don't consider elements with transforms to be "positioned" for the purposes of the CSS 2.1 z-index specification, but Gecko does. |
When a stacking-context is not positioned, its z-index should be ignored. This is per CSS 2 9.9.1. The only exception to this is when the z-index is applied to an element with display: flex | inline-flex. inline-flex does not appear to be implemented at this time so we only do this for flex.
|
I think that, in the end, the Blink/WebKit behavior is incorrect. I notice that they seem to include blocks with transformations into the list of positioned content for stacking purposes, but ignore the z-index value. Given that, I'm going to follow the Firefox behavior here. I've updated the patch to not ignore z-index for blocks with transformations and also to integrate the test with the newly wpt-ized version. |
|
@bors-servo: r+ |
|
|
Z-index should be ignored for non-positioned stacking contexts When a stacking-context is not positioned, its z-index should be ignored. This is per CSS 2 9.9.1. The only exception to this is when the z-index is applied to an element with display: flex | inline-flex. inline-flex does not appear to be implemented at this time so we only do this for flex. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8023) <!-- Reviewable:end -->
|
|
mrobinson commentedOct 14, 2015
When a stacking-context is not positioned, its z-index should be
ignored. This is per CSS 2 9.9.1. The only exception to this is when
the z-index is applied to an element with display: flex | inline-flex.
inline-flex does not appear to be implemented at this time so we only
do this for flex.