mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #11330 - mitchhentges:1516-reference-test, r=KiChjang
Use floats to represent intended fixed position 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 --faster` does not report any errors - [X] These changes fix #1516 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11330) <!-- Reviewable:end -->
This commit is contained in:
commit
55b0bb027c
3 changed files with 23 additions and 30 deletions
|
@ -1,3 +0,0 @@
|
||||||
[position_fixed_a.html]
|
|
||||||
type: reftest
|
|
||||||
disabled: https://github.com/servo/servo/issues/9106
|
|
|
@ -5,6 +5,11 @@
|
||||||
.container {
|
.container {
|
||||||
display: block;
|
display: block;
|
||||||
background: blue;
|
background: blue;
|
||||||
|
|
||||||
|
/* Use font available on all hosts, instead of system font,
|
||||||
|
because test reference depends on dynamic sizing, and different
|
||||||
|
fonts change the required margins. */
|
||||||
|
font-family: 'Ahem';
|
||||||
}
|
}
|
||||||
.fixed_block {
|
.fixed_block {
|
||||||
background: green;
|
background: green;
|
||||||
|
@ -26,19 +31,13 @@
|
||||||
top: 100px;
|
top: 100px;
|
||||||
bottom: 30px;
|
bottom: 30px;
|
||||||
}
|
}
|
||||||
.stretched_fixed_block {
|
|
||||||
position: fixed;
|
|
||||||
background: black;
|
|
||||||
top: 100px;
|
|
||||||
bottom: 30px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="fixed_block"> fixed block </div>
|
<div class="fixed_block"> a </div>
|
||||||
<div class="positioned_fixed_block"> positioned fixed block </div>
|
<div class="sized_fixed_block"> b </div>
|
||||||
<div class="sized_fixed_block"> sized fixed block </div>
|
<div class="positioned_fixed_block"> c </div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -4,40 +4,37 @@
|
||||||
.container {
|
.container {
|
||||||
display: block;
|
display: block;
|
||||||
background: blue;
|
background: blue;
|
||||||
|
|
||||||
|
font-family: 'Ahem';
|
||||||
}
|
}
|
||||||
.fixed_block {
|
.fixed_block {
|
||||||
background: green;
|
background: green;
|
||||||
position: fixed;
|
float: left;
|
||||||
|
|
||||||
|
/* Servo seems to ignore default margins when position: fixed */
|
||||||
|
margin-top: -8px;
|
||||||
}
|
}
|
||||||
.positioned_fixed_block {
|
.positioned_fixed_block {
|
||||||
background: yellow;
|
background: yellow;
|
||||||
position: fixed;
|
float: left;
|
||||||
top: 50%;
|
margin-top: 292px;
|
||||||
right: 25px;
|
margin-left: 704px;
|
||||||
}
|
}
|
||||||
.sized_fixed_block {
|
.sized_fixed_block {
|
||||||
background: red;
|
background: red;
|
||||||
position: fixed;
|
|
||||||
height: 50px;
|
height: 50px;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
left: 5px;
|
float: left;
|
||||||
right: 10px;
|
margin-top: 92px;
|
||||||
top: 100px;
|
margin-left: -19px;
|
||||||
bottom: 30px;
|
|
||||||
}
|
|
||||||
.stretched_fixed_block {
|
|
||||||
position: fixed;
|
|
||||||
background: black;
|
|
||||||
top: 100px;
|
|
||||||
bottom: 30px;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="fixed_block"> fixed block </div>
|
<div class="fixed_block"> a </div>
|
||||||
<div class="positioned_fixed_block"> positioned fixed block </div>
|
<div class="sized_fixed_block"> b </div>
|
||||||
<div class="sized_fixed_block"> sized fixed block </div>
|
<div class="positioned_fixed_block"> c </div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue