Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#11952 closed bug (wontfix)

[safari] Font properties not parsed/returned correctly by css function

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:



<div>Font: <span id="font"></span></div>
<div>Font Size: <span id="fontSize"></span></div>


var text = '<div style="font: 10px Verdana; color: Black"></div>'


On Safari 5.1.7 Mac and Mobile Safari iOS (all versions) css('font-size') returns a value of (empty string)

It appears to work correctly on:

  • Chrome 19 Mac and Win
  • Firefox 13 Mac and Win
  • IE 9


Change History (2)

comment:1 Changed 9 years ago by mikesherov

Resolution: wontfix
Status: newclosed

"font" is shorthand. The jQuery API does not gaurantee retrieval of shorthand properties. This just happens to work on some browsers, but is not something we intend to support.

comment:2 Changed 9 years ago by [email protected]

Just a quick request for clarification: I understand the documentation says that "retrieval" of shorthand properties is not guaranteed. I would interpret this to mean that a call like "$(elem).css('font')" is not guaranteed.

By your resolution, do you also mean that if the source HTML contains shorthand properties, then the contents of that property are not guaranteed to be available? If so, then it would be helpful if this were explicitly spelled out in the documentation.

Note: See TracTickets for help on using tickets.