-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gatsby: Why my animations not working in the the production env (build), but it works great in the DEV env #52
Comments
Hi, I've got no idea, sorry. Does anything happen at all in your production environment? Are you using animations from animate.css? Can you check chrome dev tools or something similar in your production environment to see if the animation classes and CSS props are being applied to your elements? |
Hi, It hides all my components that using animations( animation-duration: 0.5s; Yes I'm using animate.css |
All I can think of is that the library might not be included in the bundled code. Can't think of another reason why it would work in dev and not prod |
How can I fix that? is there another plugin for GatsbyJS? |
I've never used GatsbyJS before, but I've just fired up a quick sample project and I can see the animations when using both Where do you host the site? Can I see it? Are you able to share the code? |
Hello, Here is my code: Layout.js `import React from "react" class Layout extends React.Component { {this.props.children} )} /> ) } } Layout.propTypes = { export default Layout ` index.js
I'm using styled-component |
when i'm adding .animated {opacity: 1!important;} it triggers event on scroll and it adds class names(zoomIn......) |
I thinks its a gatsby issue because when I'm building with a prefix it doesn't work (run this gatsby build --prefix-paths and in gatsby-config.js add this pathPrefix: "/next") |
Gatsby has some issues converting css. To know what is wrong you need so check the converted code in the static folder.
The above code is converted as follows:
Animation does not work because it is not possible to mix from-to syntax with percentage syntax. One way to prevent the problem is to use only the percentage syntax:
This solution worked in version 2.23.22 of Gatsby. |
Ghad damn it. I got this error too with element?.animate(
[
{
transform: `translate(0%, 20px)`,
},
{
transform: 'translate(0, 0)',
},
],
{ duration: secondsTotalDuration * 1000, iterations: Infinity },
); on Gatsby 2.27.4. Doing #52 (comment) fixed it for me |
|
No description provided.
The text was updated successfully, but these errors were encountered: