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

Can not animate border-color if one border is 'none !important' #343

Closed
mebibou opened this issue Nov 4, 2014 · 3 comments
Closed

Can not animate border-color if one border is 'none !important' #343

mebibou opened this issue Nov 4, 2014 · 3 comments

Comments

@mebibou
Copy link

mebibou commented Nov 4, 2014

When one border of a div is set using border-top: none !important, velocity does not animate the other borders. You can see an live example here : http://codepen.io/mebibou/pen/LhGbE

Edit: it works on Firefox but not on Chrome

well I did a bit of digging, and it looks like the issue is coming from window.getComputedStyle() that returns a complex value. I've updated my codepen to display inside the div the value returned by window.getComputedStyle() for the borderColor.

I see that when you compute the style you get the borderTopColor for IE and firefox, maybe this needs improvments...

@ydaniv
Copy link
Contributor

ydaniv commented Nov 6, 2014

@mebibou no that's not it since your issue is on Chrome and that check returns false.

@julianshapiro I've done some debugging, looks like the returned property value is 'rgb(0, 0, 0) rgb(153, 153, 153) rgb(153, 153, 153)' and somehow Velocity doesn't extract it properly. The returned extracted value is some how just chopping off he 'rgb(' from the start and the ')' from the end.

@mebibou
Copy link
Author

mebibou commented Nov 6, 2014

@ydaniv that's why I said "you get the borderTopColor for IE and firefox", and maybe this 'check' should be improved to take into account the problem I brought up

@ydaniv
Copy link
Contributor

ydaniv commented Nov 6, 2014

@mebibou yep, sorry. Yer right.

@julianshapiro julianshapiro reopened this Nov 6, 2014
Rycochet pushed a commit that referenced this issue Aug 3, 2020
Closes #293. You can now pass a `tween` property for creating arbitrary
tween callbacks via the `progress` function. Refer to
VelocityJS.org/#progress for more information.

Created e/p/o shorthands for elements/properties/options syntactic
sugar arguments syntax. Refer to VelocityJS.org/#arguments to learn
more.

Closes #368. The stop command now has increased targeting for `queue:
false` animations, and is more robust. Refer to VelocityJS.org/#stop
for more.

Closes #396. Easing functions are now passed `opts` and `tweenDelta` so
that custom easing functions can have greater access to animation
parameters. Refer to VelocityJS.org/#easing for more.

Closes #343. Differently-colored border colors don’t throw off
`border-color` animation anymore.

Closes #321. Implements “finish” feature for prematurely stopping
current animations, but having them reach their end values and trigger
their corresponding callbacks. Refer to VelocityJS.org/#finish for more.

Closes #352. Prevents Firefox from throwing an error when animating an
SVG element that isn’t being visually rendered.

Closes #317. Array compacting now happens within ticks to ensure loops
don’t cause arrays to bloat. Thanks so much, @marvelousNinja!

Closes #324. HTML tables and tbody’s now have their proper display
values set by Velocity. Thanks so much to @dtreiter and @okrad!

Closes #371. Looping `backgroundPositionX/Y` to 100% causes a proper
incrementing loop instead of alternation.
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