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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/sticky/sticky-both-sides-bottom-right-constrained.html

Issue 2788053002: Fix sticky bottom is not applied with both sticky position (Closed)
Patch Set: Test cases modified. Created 3 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-both-sides-bottom-right-constrained.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-both-sides-bottom-right-constrained.html b/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-both-sides-bottom-right-constrained.html
new file mode 100644
index 0000000000000000000000000000000000000000..957060cd5fff7fb74389aa47b4c58cb92eb755e5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-both-sides-bottom-right-constrained.html
@@ -0,0 +1,86 @@
+<!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 {
flackr 2017/04/04 02:31:58 Use dashes for class names: https://www.chromium.o
wanchang 2017/04/04 08:19:11 Done.
+ position: absolute;
+ top: 0px;
+ left: 100px;
+ width: 180px;
+ height: 5000px;
+ outline: 2px solid black;
+ }
+
+ .box {
+ width: 300px;
+ height: 180px;
+ }
+
+ .vertical_box {
+ width: 180px;
+ height: 300px;
+ }
flackr 2017/04/04 02:31:58 The only elements with the .box class are sticky,
wanchang 2017/04/04 08:19:11 Done.
+
+ .sticky {
+ position: sticky;
+ left: 50px;
+ right: 50px;
+ background-color: green;
+ }
+
+ .vertical_sticky {
+ position: sticky;
+ 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;
flackr 2017/04/04 02:31:58 If I may make a suggestion, rather than repeating
wanchang 2017/04/04 08:19:11 Done.
+ }
+ .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>
+ <div class="vertical_sticky vertical_box"></div>
+ </div>
+
+</body>
+</html>
+

Powered by Google App Engine
This is Rietveld 408576698