mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +01:00
layout: Stop double-counting position: relative
offsets for stacking
contexts. Fixes the location of the gear menu on the Google SERPs.
This commit is contained in:
parent
14c6d5db41
commit
2276d642fd
4 changed files with 41 additions and 2 deletions
|
@ -298,6 +298,7 @@ flaky_cpu == linebreak_simple_a.html linebreak_simple_b.html
|
|||
== position_relative_inline_block_a.html position_relative_inline_block_ref.html
|
||||
== position_relative_painting_order_a.html position_relative_painting_order_ref.html
|
||||
== position_relative_stacking_context_a.html position_relative_stacking_context_ref.html
|
||||
== position_relative_stacking_context_contents_a.html position_relative_stacking_context_contents_ref.html
|
||||
== position_relative_top_percentage_a.html position_relative_top_percentage_b.html
|
||||
== position_relative_vertical_percentage_overflow_a.html position_relative_vertical_percentage_overflow_ref.html
|
||||
== pre_ignorable_whitespace_a.html pre_ignorable_whitespace_ref.html
|
||||
|
|
21
tests/ref/position_relative_stacking_context_contents_a.html
Normal file
21
tests/ref/position_relative_stacking_context_contents_a.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
}
|
||||
aside {
|
||||
display: block;
|
||||
position: relative;
|
||||
left: 12px;
|
||||
z-index: 3; /* force creation of stacking context */
|
||||
background: red;
|
||||
}
|
||||
div {
|
||||
float: left;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: blue;
|
||||
}
|
||||
</style>
|
||||
<aside><div></div></aside>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
}
|
||||
aside {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
top: 0;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: blue;
|
||||
}
|
||||
</style>
|
||||
<aside></aside>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue