From 69959b875ed9687e30194dbda2e61e6838cd1141 Mon Sep 17 00:00:00 2001 From: "g.chanaud" Date: Sat, 30 Apr 2016 19:24:42 +0200 Subject: [PATCH] Adding more tests --- test/visual/sticky/anchors-with-callouts.html | 83 ++++++++++++++++--- 1 file changed, 71 insertions(+), 12 deletions(-) diff --git a/test/visual/sticky/anchors-with-callouts.html b/test/visual/sticky/anchors-with-callouts.html index afb53ad2f..de221c90c 100644 --- a/test/visual/sticky/anchors-with-callouts.html +++ b/test/visual/sticky/anchors-with-callouts.html @@ -12,7 +12,7 @@ .container { background-color: rgba(255,0,0,0.7); - + } .foo { @@ -20,16 +20,25 @@ color: white; } + .megafoo { + height:50rem; + color: white; + } + + .bar { + color: white; + } + .foo h1 { display: inline-block; float: right; } - .foo:nth-child(odd) { + .foo:nth-child(odd), .bar:nth-child(odd), .megafoo:nth-child(odd) { background-color: lightgreen; } - .foo:nth-child(even) { + .foo:nth-child(even), .bar:nth-child(even), .megafoo:nth-child(even) { background-color: lightblue; } @@ -37,7 +46,7 @@ - +
@@ -45,11 +54,11 @@
Test 1

I should stick to the top and bottom of #foo1. I'm not a child of any #foo's.

- Go to Sticky Docs + Go to Sticky Docs
- +

#foo1

@@ -60,7 +69,7 @@
Test 2

I should stick to the top and bottom of #foo2.
I'm also a child of #foo2

- Go to Sticky Docs + Go to Sticky Docs
@@ -74,7 +83,7 @@
Test 3

I should stick to the top of #foo4 and the top of #foo6.
I'm a child of #foo4

- Go to Sticky Docs + Go to Sticky Docs
@@ -90,7 +99,7 @@
Test 4

I should stick to the top of #foo6 and the bottom of #foo8. I'm a child of #foo7.

- Go to Sticky Docs + Go to Sticky Docs
@@ -106,24 +115,74 @@
Test 5

I should stick to the top of #foo10 and the bottom of #foo11. I should be stick to the window bottom with a bottom margin of 1em (default bottom margin).

- Go to Sticky Docs + Go to Sticky Docs

#foo11

+
+

#bar1

+
+
+
Test 6
+

I should stick to the top of #bar2 and the bottom of #bar3.

+

Bar containers does not have fixed height, but i should be anchored correctly.

+ Go to Sticky Docs +
+
+

Lorem Ipsum

+
+
+

#bar2

+

Lorem

+
+
+

#bar3

+

Lorem

+

Ipsum

+

Dolor

+
+
+

#bar4

+

Lorem

+

Ipsum

+
+
+

#foo13

+

I'm big to force scroolbar

+

#foo12

+
+
+
Test 7
+

I should stick to the top of #foo12. I should be stick until window end because only data-top-anchor is set.

+ Go to Sticky Docs +
+
+
+
+

#foo13

+
+
+

#foo14

+
+

#foo15

+

I'm big to force scroolbar

+
+ +
-
Test 6
+
Test 8

I should stick to the top and bottom of #foo3.
I'm not the child of any of you #foo's.
When I'm not stuck I jump to the top because I'm not a child of the top anchor, is this my normal behavior?

- Go to Sticky Docs + Go to Sticky Docs
-- 2.47.2