jlmakes / jlmakes/scrollreveal
CSS transition: all breaks reveal animations for elements visible on page load
- Dominant language
- JavaScript
- Stars
- 22.5k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
### Issue Report
If elements that are **visible within the viewport when the page loads** have a `transition: all` property defined in CSS, the reveal effect does not happen. Instead, those elements instantly become visible at their ending state, without an animation.
In the attached demos, you can see the right column of buttons (with `transition: all`) instantly become revealed, while the left column (with `transition: all` replaced with the more specific `transition: background-color`) have the expected reveal animation.
Curiously, this issue only seems to affect elements visible on page load. If you scroll down, all of the buttons have the expected reveal animation 👍.
### Demos
- JS Bin: https://jsbin.com/deloroyike/edit?html,css,js,output
- CodePen (same code): https://codepen.io/markmercier/pen/zYdrbgR
### Environment
* Operating System: Mac OSX v10.15.7
* Browser Version: Chrome, Safari, Firefox, Edge (latest)
* ScrollReveal Version: 4.0.9
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked JS Bin or CodePen demos and reproduce the behavior in ScrollReveal 4.0.9 across the listed browsers. Compare elements visible on page load using transition: all with those using transition: background-color; done means the initial reveal animation works consistently without changing the expected behavior for elements revealed after scrolling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100