Open
Bug 385615
Opened 16 years ago
Updated 4 months ago
{inc} style of :first-letter used to erroneously calculate (intrinsic) width of element
Categories
(Core :: Layout, defect)
Tracking
()
NEW
Webcompat Priority | P2 |
People
(Reporter: martijn.martijn, Unassigned)
References
(Depends on 2 open bugs)
Details
(Keywords: regression, testcase)
Attachments
(3 files, 1 obsolete file)
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.
Updated•15 years ago
|
OS: Windows XP → All
Another testcase, on a div this time. Button sets then removes a padding.
removed invalid styling "none" and added a setTimeout since otherwise it didn't apply the styling.
Attachment #318181 -
Attachment is obsolete: true
Also odd, is that in the (fixed) attachment after triggering recalc, there is still some white space to the right inside the div.
Summary: Shrinking button, use of ::first-letter height: 600% → font-size of :first-letter used to erroneously calculate width of element
Updated•15 years ago
|
Summary: font-size of :first-letter used to erroneously calculate width of element → {inc} font-size of :first-letter used to erroneously calculate width of element
Updated•15 years ago
|
Summary: {inc} font-size of :first-letter used to erroneously calculate width of element → {inc} font-size of :first-letter used to erroneously calculate (intrinsic) width of element
Comment 8•12 years ago
|
||
Possible workaround: https://addons.mozilla.org/firefox/addon/bug385615/
Comment 11•12 years ago
|
||
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”.
Comment 13•11 years ago
|
||
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
Comment 15•10 years ago
|
||
Crosslinking another Stack overflow question: http://stackoverflow.com/questions/14130653/firefox-calculating-blocks-larger/14131771#14131771 A block-level link shrinks (recalculates its width) to the correct size when focused. All (left, right, middle) clicks trigger the fix. Tabbing onto the link triggers the fix if not prevented by Javascript. Some hover effects also fix the bug. Manifests as an unwanted gap between floating elements.
Updated•10 years ago
|
Attachment #562320 -
Attachment mime type: text/plain → text/html
Comment 18•10 years ago
|
||
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.
Comment 20•8 years ago
|
||
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.
Comment 23•7 years ago
|
||
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.
Summary: {inc} font-size of :first-letter used to erroneously calculate (intrinsic) width of element → {inc} style of :first-letter used to erroneously calculate (intrinsic) width of element
Comment 28•6 years ago
|
||
Note that bug 362880 comment 2 has some thoughts on how to fix this.
Updated•5 years ago
|
Updated•4 years ago
|
Webcompat Priority: --- → ?
Comment hidden (off-topic) |
![]() |
||
Updated•2 years ago
|
Webcompat Priority: ? → P2
Updated•6 months ago
|
Severity: normal → S3
Comment 37•6 months ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 24 duplicates and 14 votes.
:dholbert, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Flags: needinfo?(dholbert)
Comment 38•6 months ago
|
||
The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.
Flags: needinfo?(dholbert)
You need to log in
before you can comment on or make changes to this bug.
Description
•