Skip to main content

Bug Tracker

Side navigation

#9237 closed bug (fixed)

Opened May 11, 2011 01:23PM UTC

Closed May 13, 2011 04:12PM UTC

Last modified March 08, 2012 04:03PM UTC

.css() doesn't work with relative values on hyphenated properties

Reported by: avaly2 Owned by:
Priority: blocker Milestone: 1.6.2
Component: css Version: 1.6
Keywords: Cc:
Blocked by: Blocking:

The .css() in 1.6 accepts relative values, but they only work on certain properties (width, height, probably any property without hyphen), and fails to work on hyphenated properties written in any of the 2 ways: padding-left, paddingLeft, padding-top, paddingTop, etc.

See test case:

Attachments (0)
Change History (6)

Changed May 11, 2011 08:26PM UTC by avaly2 comment:1

I went ahead and looked into this bug. It seems it was applying the new value without any unit, which works fine for width/height, but not for paddingLeft, paddingTop, etc.

Pull request including updated unit tests:

Changed May 11, 2011 08:56PM UTC by timmywil comment:2

component: unfiledcss
milestone: 1.next1.6.2
priority: undecidedblocker
status: newopen

Changed May 12, 2011 07:59PM UTC by comment:3

It seems that relative values don't work on the 'left' property either.

See this StackOverflow question:

Changed May 13, 2011 07:47AM UTC by avaly2 comment:4

The left property works fine with the fix included in my pull request above.

Changed May 13, 2011 04:12PM UTC by avaly comment:5

resolution: → fixed
status: openclosed

Landing pull request 375. Added test case to support #9237 Fixes #9237.

More Details:

Changeset: cbbd7d28e1088e76a9c89bfb30ba9af8f1fce759

Changed July 01, 2011 09:52PM UTC by anonymous comment:6

$.animate() suffers from the same problems.