Skip to main content

Bug Tracker

Side navigation

#812 closed bug (fixed)

Opened January 15, 2007 05:52PM UTC

Closed January 17, 2007 01:38PM UTC

Last modified June 19, 2007 08:48AM UTC

CSS px set

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

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.

Attachments (0)
Change History (5)

Changed January 15, 2007 06:36PM UTC by john comment:1

description: \ 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.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.

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

Changed January 15, 2007 10:22PM UTC by joern comment:2

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

Changed January 16, 2007 02:20PM UTC by joern comment:3

resolution: → fixed
status: newclosed

Fixed in SVN, revision 1096

Changed January 16, 2007 04:56PM UTC by aaron.heimli comment:4

resolution: fixed
status: closedreopened

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

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

Changed January 17, 2007 01:38PM UTC by joern comment:5

resolution: → fixed
status: reopenedclosed

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