Bug 168258 - "font-family: initial" works differently for form elements compared to regular ones
Summary: "font-family: initial" works differently for form elements compared to regula...
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Macintosh macOS 10.12
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 170900
  Show dependency treegraph
 
Reported: 2017-02-13 15:00 PST by Vladimir Starkov
Modified: 2017-05-04 07:27 PDT (History)
5 users (show)

See Also:


Attachments
expected (10.62 KB, image/png)
2017-02-13 15:01 PST, Vladimir Starkov
no flags Details
actual (11.12 KB, image/png)
2017-02-13 15:02 PST, Vladimir Starkov
no flags Details
Example to reproduce the issue (321 bytes, text/html)
2017-04-18 05:08 PDT, Manuel Rego Casasnovas
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Starkov 2017-02-13 15:00:25 PST
DEMO http://dabblet.com/gist/6fc61a20d75183bcd346f34fa96630f2


Steps to reproduce:

HTML:
<a class="btn">Button</a>
<button class="btn">Button</a>


CSS:
/* all initial works differently for links and buttons */
.btn {
	all: initial;
	background: red;
}


Actual results:

Button and Link look differently from each other (font-family, bottom and top borders dont match)



Expected results:

Should look the same
Comment 1 Vladimir Starkov 2017-02-13 15:01:51 PST
Created attachment 301397 [details]
expected
Comment 2 Vladimir Starkov 2017-02-13 15:02:24 PST
Created attachment 301398 [details]
actual
Comment 3 Radar WebKit Bug Importer 2017-02-15 09:11:54 PST
<rdar://problem/30535288>
Comment 4 Manuel Rego Casasnovas 2017-04-18 05:08:15 PDT
Created attachment 307374 [details]
Example to reproduce the issue


This happens with all the "form elements" like inputs and that kind of things.

It's enough with using "font-family: initial" to reproduce the issue.

In the attached example on my Linux machine I got:
  div: -webkit-standard
  input: Cantarell

On a macpro:
  div: -webkit-standard
  input: -apple-system

While in Chrome and Firefox both elements have the same value.
Comment 5 Myles C. Maxfield 2017-04-25 14:21:02 PDT
Buttons have their initial font family set to the system font. This isn't a bug.
Comment 6 Myles C. Maxfield 2017-04-25 14:22:38 PDT
I guess there's a compat problem if the other browsers do it.
Comment 7 Manuel Rego Casasnovas 2017-05-04 07:27:20 PDT
(In reply to Myles C. Maxfield from comment #6)
> I guess there's a compat problem if the other browsers do it.

Should we follow up with the CSS WG or not?
I can report an issue on GitHub if you think it's the way to go.