Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/css/sticky/sticky-both-sides-2.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-both-sides-2.html b/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-both-sides-2.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d808de45475afcfda91a2b2619b02b55fc3d6741 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-both-sides-2.html |
| @@ -0,0 +1,84 @@ |
| +<!DOCTYPE html> |
| +<script> |
| +if (window.internals) { |
| + internals.settings.setCSSStickyPositionEnabled(true); |
| +} |
| +</script> |
| + |
| +<html> |
| +<head> |
| +<style> |
| + body { |
| + margin: 0; |
| + width: 5000px; |
| + overflow: hidden; /* hide scrollbars */ |
| + } |
| + |
| + .container { |
| + position: absolute; |
| + width: 5000px; |
| + height: 180px; |
| + top: 100px; |
| + outline: 2px solid black; |
| + } |
| + |
| + .vertical.container { |
| + top: 0px; |
| + left: 100px; |
| + width: 180px; |
| + height: 5000px; |
| + } |
| + |
| + .box { |
| + width: 300px; |
| + height: 180px; |
| + } |
| + |
| + .vertical .box { |
| + width: 180px; |
| + height: 300px; |
| + } |
| + |
| + .sticky { |
| + position: sticky; |
| + left: 50px; |
| + right: 50px; |
|
flackr
2017/04/03 20:45:17
Instead of calling these tests sticky-both-sides-#
wanchang
2017/04/04 00:57:48
Done.
|
| + background-color: green; |
| + } |
| + |
| + .vertical .sticky { |
| + left: 0; |
|
flackr
2017/04/03 20:45:17
Seems like the left shouldn't affect the vertical
wanchang
2017/04/04 00:57:48
Done.
|
| + top: 50px; |
| + bottom: 50px; |
| + background-color: blue; |
| + opacity: 0.75; |
| + } |
| + .space { |
| + width:2000px; |
| + height:100%; |
| + background-color: grey; |
| + opacity: 0.1; |
| + } |
| + .vertical .space { |
| + height:2000px; |
| + background-color: grey; |
| + opacity: 0.1; |
| + } |
| + .inline { |
| + display: inline-block; |
| + } |
| +</style> |
| +</head> |
| +<body> |
| + <div class="container"> |
| + <div class="space inline"></div> |
| + <div class="sticky box inline"></div> |
| + </div> |
| + <div class="vertical container"> |
| + <div class="vertical space"></div> |
|
flackr
2017/04/03 20:45:17
the vertical class here (and in several of the oth
wanchang
2017/04/04 00:57:48
You are right. It was not what I wanted. I changed
|
| + <div class="sticky box"></div> |
| + </div> |
| + |
| +</body> |
| +</html> |
| + |