Bug 50413 - Strange 2px margin on <button>
Summary: Strange 2px margin on <button>
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P3 Normal
Assignee: Nobody
URL: http://www.webdevout.net/test?0T
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-02 15:15 PST by Jacob Thomason
Modified: 2022-06-06 04:15 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Thomason 2010-12-02 15:15:14 PST
I am not certain if the included url will remain at that address long enough, so, if not, it can be seen at...

http://dev.rentpost.com/managers (the form <button> at the bottom of the page; contact form)

You will notice that I've overridden the margin on that element to force proper layout, but that shouldn't be necessary as margin was never defined and additionally, gecko doesn't render this mysterious margin.
Comment 1 Joseph Pecoraro 2010-12-02 15:29:56 PST
Looks like 2px is the default margin for a button, data:text/html,<button>
However, where does this come from? Its tough to tell from the Web Inspector
as it doesn't look like it comes from any of the user agent stylesheets.
Comment 2 Robert Hogan 2013-11-18 22:04:27 PST
2px is an 'intrinsic margin' supplied for form elements that have no width specified. This is WebKit-specific behaviour.
Comment 3 Jools 2017-11-01 03:10:25 PDT
Is there any difference between a user agent style sheet value and an "intrinsic" value, other than it not appearing in inspectors? Why does the latter value type exist, other than to waste people's time? 

If this bug report didn't exist, how is anyone supposed to know that this is not a bug? If your inspector states that a user agent value of "0em" was computed as "2px", why would anyone come to any conclusion other than "webkit is bad at math"?