-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ScrollCollapse): fixed issue where affix would not be calculated …
…in nested element with position
- Loading branch information
1 parent
e956457
commit 7507dd4
Showing
4 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
<h1>Scroll down ↓</h1> | ||
|
||
<nav class="nav" snScrollCollapse> | ||
My nav | ||
<span class="down">Going down</span> | ||
<span class="up">Going up</span> | ||
</nav> | ||
|
||
<div class="spacer"></div> | ||
<div class="bar" snScrollCollapse> | ||
Sticky when scrolled passed | ||
|
||
<!-- nested element --> | ||
<div class="bar-container"> | ||
<div class="bar" snScrollCollapse> | ||
Sticky when scrolled passed | ||
</div> | ||
</div> | ||
|
||
<div class="spacer"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,3 +56,7 @@ | |
.spacer { | ||
height: 150vh; | ||
} | ||
|
||
.bar-container { | ||
position: relative; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,8 @@ h1 { | |
font-family: Arial, Helvetica, sans-serif; | ||
font-size: 250%; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
padding: 0; | ||
} |