-
Notifications
You must be signed in to change notification settings - Fork 26.3k
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
Animation won't run using JSX inline styles #785
Comments
What version of next.js do you use ? It looks |
@nkzawa Just upgraded to 2.0.0-beta.17 Note that LoadingIndicator.js export default ({ active }) =>
<div className={`loadingIndicator ${active ? 'active' : ''}`}>
{
[
'#80DEEA',
'#26C6DA',
'#00ACC1',
'#00838F',
'#006064'
].map((color, i) =>
<div
style={{ backgroundColor: color, animationDelay: `-${1 - i / 20}s` }}
key={`stripe${i}`}
className='stripe'
/>
)
}
<style jsx>{`
.loadingIndicator,
.stripe {
left: 0;
bottom: 0;
width: 100%;
position: absolute;
}
.loadingIndicator {
color: #333;
height: .2rem;
opacity: 0;
transition: opacity 1s 1s ease;
}
.stripe {
height: 100%;
animation: loading 1s ease infinite forwards;
}
.loadingIndicator.active {
opacity: 1;
transition-delay: 0s;
}
.loadingIndicator.active .stripe {
animation: loading 1s ease infinite forwards;
}
@keyframes loading {
0% {
transform: scaleX(0);
opacity: 1;
}
80% {
transform: scaleX(100%);
}
100% {
opacity: 0;
}
}
`}</style>
</div> |
@mallendeo thanks for your feedback. I created the issue vercel/styled-jsx#77. |
@nkzawa Thanks! |
This will be fixed in the next beta release. |
The animation won't run since a css selector/property can't start with a number.
The text was updated successfully, but these errors were encountered: