Problem/Motivation
Back to top button is showing up on more and more sites but each one is built different and doesn't include animation half the time.
Back to top buttons should be consistent across sites and functionality and animation should be consistent.
- design has requested for this to always have an animation. Style is open to whatever for default. Focus is on consistent movement
- CSS only animation examples: https://now.tufts.edu/#top
- Uses scroll-behavior: smooth;
- JS: https://populationcdev.wpengine.com/
Please decide on a final direction (CSS vs JS) and finalize a transition speed based on the examples above.
Issue fork prototype-3312431
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jldust commentedComment #3
jldust commentedI'm thinking this could be an option that users should be able to toggle within the admin UI to enable/disable a back to top button. It would also be nice if we had it located in either the footer or at the end of the main body.
Comment #4
jldust commentedComment #6
jldust commentedBy default Prototype utilizes the CSS format that uses
scroll-behavior: smoothwith its back to top button. I've added a form option for the theme that users can enable/disable the back to top button in the UI.Comment #7
pixelwhip commentedComment #8
jldust commentedComment #10
jldust commentedThis has been merged and will be included in the next tagged release.
Comment #11
jldust commentedComment #12
jldust commentedComment #13
jldust commented