Skip to content
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

Handling CSS keyframes/animations #45

Open
conradz opened this issue Nov 11, 2014 · 2 comments
Open

Handling CSS keyframes/animations #45

conradz opened this issue Nov 11, 2014 · 2 comments

Comments

@conradz
Copy link

conradz commented Nov 11, 2014

Is there any way to handle the CSS animations @keyframes? The keyframes name is another case where CSS makes use of global names, which would be nice to get rid of.

Maybe we could add a RCSS.registerKeyframes method which would generate the keyframes name similar to how registerClass works currently. Example:

var anim = RCSS.registerKeyframes({
  '0%': { top: 0 },
  '100%': { top: '100px'; }
});

var cssClass = RCSS.registerClass({
  animationName: anim,
  animationDuration: '1s'
});

React.renderComponent(
  <div className={cssClass}>Test</div>,
  document.body);

We could also maybe infer the percent character so we could use { 0: { top: 0 }, 100: { top: '100px' } }.

@totty90
Copy link

totty90 commented Nov 27, 2014

+1

@bitplanets
Copy link

+1 would be really useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants