NEW 118413
Percentage-based font-size is ignored below 56%
https://bugs.webkit.org/show_bug.cgi?id=118413
Summary Percentage-based font-size is ignored below 56%
Razvan Caliman
Reported 2013-07-05 06:09:35 PDT
Created attachment 206143 [details] reproducing test case In the attached test case, the third box should be visibly smaller than the first and second boxes. All boxes have the same em-based dimensions. Only the font-size varies. Percentage-based font-size is ignored below 56%. Computed styles for `font-size: 25%` and `font-size: 56%` are the same. Reproduces in Chrome & Safari. Works correctly in Firefox 22.0.
Attachments
reproducing test case (1.07 KB, text/html)
2013-07-05 06:09 PDT, Razvan Caliman
no flags
Mihnea Ovidenie
Comment 1 2013-07-05 10:03:19 PDT
There is a comment on StyleResolver::getComputedSizeFromSpecifiedSize that i think it applies in your case: " // We support two types of minimum font size. The first is a hard override that applies to // all fonts. This is "minSize." The second type of minimum font size is a "smart minimum" // that is applied only when the Web page can't know what size it really asked for, e.g., // when it uses logical sizes like "small" or expresses the font-size as a percentage of // the user's default font setting. // With the smart minimum, we never want to get smaller than the minimum font size to keep fonts readable. // However we always allow the page to set an explicit pixel size that is smaller, // since sites will mis-render otherwise (e.g., http://www.gamespot.com with a 9px minimum). " In WebPreferencesStore.h, the smart minimum value is defined: macro(MinimumLogicalFontSize, minimumLogicalFontSize, UInt32, uint32_t, 9) So, in your case, you cannot go below 9px for the font size and i do not think this is customizable. 56% just happens to reach the 9 limit for the default font size of 16 (9/16 = 0.56).
Brent Fulgham
Comment 2 2022-07-13 14:54:52 PDT
This continues to be a bug in Safari 15.
Radar WebKit Bug Importer
Comment 3 2022-07-13 14:55:13 PDT
Note You need to log in before you can comment on or make changes to this bug.