From: g.chanaud Date: Tue, 26 Apr 2016 20:01:03 +0000 (+0200) Subject: [Doc] Sticky : Add documentation about stick-to-bottom. Visual test fixed + stick... X-Git-Tag: v6.2.2-rc1~23^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13607499e14ff9bedd0ba4ae1109a166cb3fc00b;p=thirdparty%2Ffoundation%2Ffoundation-sites.git [Doc] Sticky : Add documentation about stick-to-bottom. Visual test fixed + stick-to-bottom test --- diff --git a/docs/pages/sticky.md b/docs/pages/sticky.md index fae0b001e..6cfd04562 100644 --- a/docs/pages/sticky.md +++ b/docs/pages/sticky.md @@ -56,7 +56,7 @@ You can also use two anchors, if you please. Using `data-top-anchor="idOfSomethi ```html
-
+
@@ -65,7 +65,11 @@ You can also use two anchors, if you please. Using `data-top-anchor="idOfSomethi
-
+
+

+ The image to the right will be sticky when it hits the top of this paragraph element. + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

@@ -73,6 +77,52 @@ You can also use two anchors, if you please. Using `data-top-anchor="idOfSomethi Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ The image to the right will lose stickiness when it hits the bottom of this paragraph element. +
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

+
+
+
+ +
+
+
+
+ +## Stick to bottom + +You can also stick to bottom. +Using `data-stick-to="bottom"`. +Here is an example using two anchors (like above) with a stick to bottom. +```html +
+
+ +
+
+``` + + +
+
+
+

+ The image to the right will be sticky when it hits the top of this paragraph element. + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

+

+ The image to the right will lose stickiness when it hits the top of this paragraph element. +
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

@@ -80,7 +130,7 @@ You can also use two anchors, if you please. Using `data-top-anchor="idOfSomethi

-
+
diff --git a/test/visual/sticky/anchors-with-callouts.html b/test/visual/sticky/anchors-with-callouts.html index a9532ab18..979c630cc 100644 --- a/test/visual/sticky/anchors-with-callouts.html +++ b/test/visual/sticky/anchors-with-callouts.html @@ -10,9 +10,9 @@ background-color: darkgrey; } - .sticky-container { - background-color: #f00; - transition: height .5s ease; + .container { + background-color: rgba(255,0,0,0.7); + } .foo { @@ -72,8 +72,8 @@

#foo4

-
Test 4
-

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

+
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
@@ -87,9 +87,9 @@

#foo7

-
-
Test 5
-

I should stick to the top of #foo6 and the bottom of #foo7, but I don't go to the top of #foo6 because I'm a child of #foo7. Is this normal?

+
+
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
@@ -100,15 +100,28 @@

#foo9

-
+

#foo10

+
+
+
Test 5
+

I should stick to the top of #foo10 and the bottom of #foo11. I should be stick to the window bottom.

+ Go to Sticky Docs +
+
+
+
+

#foo11

+
+
+

#foo12

-
Test 3
+
Test 6

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
@@ -122,4 +135,4 @@ $(document).foundation(); - \ No newline at end of file +