Skip to main content

Bug Tracker

Side navigation

#12711 closed bug (notabug)

Opened October 12, 2012 06:57AM UTC

Closed October 12, 2012 12:54PM UTC

$.css work with bug in FF 16

Reported by: anonymous Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:
Description

try get $(elem).css("some_css_prop").

All browsers return null if prop doesn't set.

But FF 16 return "none" if prop doesn't set.

There are some troubles with it in plugins.

example: var t = $(elem).css("transition") || new Transition();

!!"none" === true

Attachments (0)
Change History (1)

Changed October 12, 2012 12:54PM UTC by mikesherov comment:1

resolution: → notabug
status: newclosed

Thanks for contributing! Unfortunately, that's just not true. Browsers will return "resolved values" for known properties from a getComputedStyle call: http://dev.w3.org/csswg/cssom/#resolved-values . If the property doesn't exist, that value will be an empty string which gets transformed to null. It may have been coincidence that it *appeared* as if jQuery was returning null for properties that aren't set.

"None" has different meaning in different contexts. For example, display:none isn't the same as display:"" and is not something we'll normalize.

For these reasons, I'm closing this ticket as "notabug".