Created attachment 269562 [details] testcase See testcase, when clicking on the button, it shrinks. Although the end result looks more correct to me, the button should not change size when clicking on it.
Created attachment 318181 [details] testcase with a floated block with first-letter Another testcase, on a div this time. Button sets then removes a padding.
Also odd, is that in the (fixed) attachment after triggering recalc, there is still some white space to the right inside the div.
Possible workaround: https://addons.mozilla.org/firefox/addon/bug385615/
Created attachment 562320 [details] Some more test-cases with different font-sizes and floating first-letters Attached some more test-cases. What I can see: with larger font-size the bigger extra width would be, the more letters after the first, again the bigger the extra width would be. Adding float to first-letter invert this behavior, but the extra would depend only on the font-size of the first letter. And if the font-size of the first-letter is lesser than the inline-block's, then the width of this inline-block “shrinks”.
Want to cross link two in the wild bug reports to this issue. http://stackoverflow.com/questions/13160161/firefox-whitespace-oddity-bug-on-a-element/ http://stackoverflow.com/questions/7548255/is-there-a-css-workaround-for-firefox-bug-inline-block-first-letter-with-cha
Any chance of getting it fixed soon? This bug has been open for 6 years and the styling errors caused by this bug are very visible and workarounds are so ugly... This bug is a huge PITA.
Still present in FF 38. Not only "font-size" but also "text-transform" triggers the bug. I'm not sure why but in my case "uppercase" makes a way bigger bug-padding than "capitalize", although the result should be (and is in standard-compliant browsers) the same.
This applies to any aspect of the style of ::first-letter that may affect measurement (not only font-size). E.g. it can be reproduced with text-transform, font-family, font-stretch, font-weight, letter-spacing, etc. Updating the summary to make it more general.
Note that bug 362880 comment 2 has some thoughts on how to fix this.