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

Width initial value is always identified as 0 #860

Closed
andreas-trad opened this issue Apr 5, 2018 · 2 comments
Closed

Width initial value is always identified as 0 #860

andreas-trad opened this issue Apr 5, 2018 · 2 comments
Assignees

Comments

@andreas-trad
Copy link

andreas-trad commented Apr 5, 2018

Your system information

  • VelocityJS version: 2.0.2
  • Browser: Chrome OS Version 64.0.3282.190 (Official Build) (64-bit)
  • Operating System: Chrome OS Version 64.0.3282.190 (Official Build) (64-bit)

Checklist

  • Is this an issue with code?: [Yes/No] yes
  • Is this an issue with documentation?: [Yes/No] no
  • Have you reproduced this in other browsers?: [Yes/No] no
  • Have you checked for updates?: [Yes/No] yes
  • Have you checked for similar open issues?: [Yes/No] yes

Please remember that this is an issue tracker, support requests should be posted on StackOverflow - see CONTRIBUTING.md

Please describe your issue in as much detail as possible:

Describe what you expected should happen and what did happen.

Steps for reproducing this issue (code):

  1. create an html page and anywhere in the body add an element with id "test-width"
  2. initialise element's width through (either inline or through <style> block or through external css file) to any value (e.g. 450px, 100%)
  3. Run Velocity(document.querySelectorAll('#width-test'), "style", "width"); You get "0"
  4. Run an animation that animates width of the "#width-test" element to 800px. Inspect that the animation always starts width from 0 pixels, no matter what the real inital value of it was

JSFiddle example showing issue in action (code):

https://jsfiddle.net/w90o37pb/3/

@andreas-trad
Copy link
Author

check dimensions.ts, line 17. "content-box" is not equal to "border-box" and thus it returns 0.

@andreas-trad
Copy link
Author

Also, take in account that if I set
box-sizing: border-box;
I get a minus(!) width

Duskfall added a commit that referenced this issue Apr 10, 2018
Width initial value is always identified as 0
@Duskfall Duskfall self-assigned this Apr 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants