Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

More default CSS animation styles customization options #46

Open
q3e opened this issue Oct 23, 2017 · 1 comment
Open

More default CSS animation styles customization options #46

q3e opened this issue Oct 23, 2017 · 1 comment

Comments

@q3e
Copy link

q3e commented Oct 23, 2017

What do you think of adding multiple CSS transition or animation styles, like stripes?

I cannot seem to add such custom styles using classNames or inline styles easily without having to go and make changes to the following code.

const style = {
      opacity: '1',
      transform: `scaleX(${this.state.percent / 100})`,
      transformOrigin: 'left',
      transition: `transform ${animationTime}ms linear`,
      width: '100%',
      willChange: 'transform, opacity',
    }

    // Use default styling if there's no CSS class applied
    if (!this.props.className) {
      style.height = '3px'
      style.backgroundColor = 'red'
      style.position = 'absolute'
    }
@mironov
Copy link
Owner

mironov commented Oct 29, 2017

@bnovf I changed the animation style in v2.9.0 to make it smoother: cfb3501

If you want to use some complex backgrounds like stripes, you have to revert to the previous approach but it's not that smooth as the scaleX animation. For the most cases the current animation style behaves better, so I'd rather keep it.

I'm open for a discussion how the animation can be implemented to serve all cases.

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

No branches or pull requests

2 participants