Ticket #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: | |
| 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
Change History
Changed 3 years ago by MrHumanish
-
attachment
jqueryFontSizeBug.html
added
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Html file demonstrating the bug