Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#7860 closed bug (wontfix)

selector.css(name) returns inconsistently across browsers

Reported by: jason.lyle88@… Owned by:
Priority: high Milestone: 1.5
Component: css Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

Description

When a percentage value is used in CSS, the value returned depends on the browser. With webkit browsers, the percentage value is returned. With other browsers, the pixel value is returned. To see this in action, you can run the following in any webkit based browser, and then any other browser.

I am unsure of what the correct behavior should be, but my best guess would be consistently returning a pixel value. Usually computations depend on a value, not a percentage.

http://jsfiddle.net/XPdpS/

Change History (3)

comment:1 Changed 8 years ago by Rick Waldron

Component: unfiledcss
Milestone: 1.61.5
Priority: undecidedhigh
Status: newopen

Confirmed. http://jsfiddle.net/rwaldron/c6RQT/

jQuery 0 GIT, 1.4.4, 1.4.3, 1.4.2, 1.3.2, 1.2.6 WebKit: 50% FireFox: 288.5px

comment:2 Changed 8 years ago by Rick Waldron

Resolution: wontfix
Status: openclosed

I think the best resolution is to create a cssHook if you need to access min-/max- property values. These css properties won't change unless you change them within your logic. Additionally, they are not available in IE6

comment:3 Changed 8 years ago by Rick Waldron

http://www.w3.org/TR/css3-box/#the-lsquo0 thanks Dave Methvin for providing this

Note: See TracTickets for help on using tickets.