Bug Tracker

Opened 13 years ago

Closed 12 years ago

#5624 closed bug (invalid)

.css('font-size') incorrect when Mozilla Firefox applies minimum font size

Reported by: MrHumanish Owned by:
Priority: minor Milestone:
Component: css Version: 1.3.2
Keywords: css font size Cc:
Blocked by: Blocking:


The .css('font-size') should return the font-size rendered by the browser. But on Firefox (3.0.15, Ubuntu Jaunty), when the font-size of an element is below the browser's minimum font-size, the function incorrectly returns the font-size set by the CSS, whilst the rendered element is actually bigger.

Attached file shows the difference between this function's value, the CSS given to the element, and, in order to measure the actual rendered font-size, the height as calculated by .height() This example gives the element a font-size of 5px, so the browser's minimum needs to be greater. Default on Firefox is 10px I believe.

Opera gives the correct values (default minimum is 9px), haven't found min font size options for IE / Chromium.

Attachments (1)

jqueryFontSizeBug.html (621 bytes) - added by MrHumanish 13 years ago.
Html file demonstrating the bug

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by MrHumanish

Attachment: jqueryFontSizeBug.html added

Html file demonstrating the bug

comment:1 Changed 13 years ago by dmethvin

Component: unfiledattributes

comment:2 Changed 13 years ago by dmethvin

Component: attributescss

I am not convinced this is incorrect behavior.

comment:3 Changed 12 years ago by snover

Resolution: invalid
Status: newclosed

If this is a bug, it’s a bug in Firefox, not jQuery.

Note: See TracTickets for help on using tickets.