This repository was archived by the owner on Jan 25, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 15
adds ability to have scrollable back to top #168
Closed
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
54742cf
adds ability to have scrollable back to top
N6REJ 78945fd
Update templates/cassiopeia/scss/blocks/_footer.scss
N6REJ dad8696
Update templates/cassiopeia/scss/blocks/_footer.scss
N6REJ 11e299e
Update templates/cassiopeia/scss/blocks/_footer.scss
N6REJ c2f76f0
Update templates/cassiopeia/scss/blocks/_footer.scss
N6REJ 52956b0
Update templates/cassiopeia/scss/blocks/_footer.scss
N6REJ 9ea9855
now supports hide below fold
N6REJ d7045f4
Merge branch 'development' into scrolltotop
N6REJ 448563e
remove unused scss
N6REJ afcb3eb
center back-top
N6REJ e9b12e0
fix phpcs
N6REJ a814bcc
code style fix
N6REJ 8784ae0
only one option... and always fixed
hans2103 79910c3
moved scss to own file and adjusted styling
hans2103 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /** | ||
| * Back to Top | ||
| * inspired by https://moderncss.dev/pure-css-smooth-scroll-back-to-top/ | ||
| */ | ||
| $scrollLength: 100vh; | ||
| $linkOffset: 5rem; | ||
|
|
||
| .back-to-top-wrapper { | ||
| position: absolute; | ||
| top: calc(#{$scrollLength} + #{$linkOffset}); | ||
| right: $cassiopeia-grid-gutter; | ||
| bottom: 0; | ||
| width: 2.25rem; | ||
| pointer-events: none; | ||
|
|
||
| @at-root [dir=rtl] & { | ||
| right: unset; | ||
| left: $cassiopeia-grid-gutter; | ||
| } | ||
| } | ||
|
|
||
| .back-to-top-link { | ||
| position: fixed; | ||
| position: sticky; | ||
| pointer-events: all; | ||
| top: calc(#{$scrollLength} - #{$linkOffset}); | ||
| padding: $cassiopeia-grid-gutter/2; | ||
| color: var(--cassiopeia-color-primary, $standard-color-primary); | ||
| background-color: var(--white, $white); | ||
| border: 1px solid transparent; | ||
| border-radius: $border-radius; | ||
| transition: border-color 200ms ease-in; | ||
|
|
||
| &:hover, | ||
| &:focus { | ||
| color: var(--cassiopeia-color-hover); | ||
| border-color: var(--cassiopeia-color-primary, $standard-color-primary); | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.