Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#812 closed bug (fixed)

CSS px set

Reported by: john Owned by:
Priority: major Milestone: 1.1
Component: core Version: 1.1
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by john)

in jquery.js there is:

Handle passing in a number to a CSS property if ( value.constructor == Number && type == "curCSS" )

return value + "px";

that +"px" ruins a lot of things and has big impact for users (a lot to change in existing codes)

This ruins opacity in FF $(el).css('opacity', 0.5); will not work I would not send this email if i would find something to fix this in compat plugin.

Change History (5)

comment:1 Changed 13 years ago by john

Description: modified (diff)

Only fontWeight, zIndex, and opacity take non-px numbers.

comment:2 Changed 13 years ago by joern

It makes sense to check for the name of the value to set and append px only for those were needed/allowed.

comment:3 Changed 13 years ago by joern

Resolution: fixed
Status: newclosed

Fixed in SVN, revision 1096

comment:4 Changed 13 years ago by aaron.heimli

Resolution: fixed
Status: closedreopened

One gotcha here: line-height can accept almost anything:

http://www.w3schools.com/css/pr_dim_line-height.asp

comment:5 Changed 13 years ago by joern

Resolution: fixed
Status: reopenedclosed

D'oh. Now we are at 5 "fixed" properties...

Note: See TracTickets for help on using tickets.