Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: third_party/WebKit/LayoutTests/fast/css/sticky/sticky-margins-expected.html

Issue 1308273010: Adapt and reland old position sticky implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make sticky vertical ref tests expectations not dependent on font size. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/css/sticky/sticky-margins-expected.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-margins-expected.html b/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-margins-expected.html
new file mode 100644
index 0000000000000000000000000000000000000000..c5b876a918d2b9ed7ec46e8030881fd851dd959e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-margins-expected.html
@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+<style>
+ body {
+ margin: 0;
+ }
+
+ .group {
+ display: inline-block;
+ position: relative;
+ width: 180px;
+ height: 500px;
+ }
+
+ .container {
+ position: relative;
+ width: 150px;
+ height: 400px;
+ border: 2px solid black;
+ padding: 5px;
+ }
+
+ .box {
+ width: 120px;
+ height: 120px;
+ }
+
+ .sticky {
+ position: relative;
+ background-color: green;
+ }
+
+ .indicator {
+ position: absolute;
+ top: 0;
+ left: 37px;
+ background-color: red;
+ }
+</style>
+</head>
+<body>
+ <!-- auto margins -->
+ <div class="group" style="top: -300px">
+ <div class="indicator box" style="top: 110px;"></div>
+ <div class="container">
+ <div class="sticky box" style="margin: auto; top: 280px"></div>
+ </div>
+ </div>
+
+ <!-- px margins -->
+ <div class="group" style="top: -300px">
+ <div class="indicator box" style="top: 37px;"></div>
+ <div class="container">
+ <div class="sticky box" style="margin: 20px; top: 240px"></div>
+ </div>
+ </div>
+
+ <!-- % margins -->
+ <div class="group" style="top: -300px">
+ <div class="indicator box" style="top: 37px;"></div>
+ <div class="container">
+ <div class="sticky box" style="margin: 20%; top: 220px"></div>
+ </div>
+ </div>
+
+ <!-- % margins -->
+ <div class="group" style="top: -300px">
+ <div class="indicator box" style="top: 37px;"></div>
+ <div class="container" style="width: 200px;">
+ <div class="sticky box" style="margin: 20%; top: 200px"></div>
+ </div>
+ </div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698