Bug Tracker

Modify

Ticket #5624 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

.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:
Blocking: Blocked by:

Description

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

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

Change History

Changed 3 years ago by MrHumanish

Html file demonstrating the bug

comment:1 Changed 3 years ago by dmethvin

  • Component changed from unfiled to attributes

comment:2 Changed 3 years ago by dmethvin

  • Component changed from attributes to css

I am not convinced this is incorrect behavior.

comment:3 Changed 3 years ago by snover

  • Status changed from new to closed
  • Resolution set to invalid

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.