Bug 146864

Summary: Web Inspector: font: -apple-system has not supported warning, even though it is allowed
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED INVALID    
Severity: Normal CC: graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Screenshot none

Description Timothy Hatcher 2015-07-10 18:16:55 PDT
Created attachment 256633 [details]
Screenshot

"font: -apple-system" should be valid, but it gives a warning.
Comment 1 Radar WebKit Bug Importer 2015-07-10 18:17:33 PDT
<rdar://problem/21778321>
Comment 2 Devin Rousso 2015-07-10 18:34:28 PDT
As far as I understand from http://www.w3.org/TR/css3-fonts/#font-prop, the font property is the shorthand version of font-style, font-weight, font-size, and font-family (as well as some others).  As such, it is not valid unless values for those properties (and some different combinations that only have some of them) all exist in that order.  From my testing, "font-family: -apple-system;" is valid as expected and gives no issues.  So, I see one of two options here:

1. Make "-apple-system" and other fonts into keywords in CSSKeywordCompletions.
2. Keep the current functionality as is.

I am not sure what goes into "-apple-system" (such as if it has a font size, weight, and style built into the keyword declaration), but it doesn't seem like a keyword to me so I think that option 2 is correct.
Comment 3 Timothy Hatcher 2015-07-10 18:46:01 PDT
Never mind, "font: 12px -apple-system" is what is needed. -apple-system does not include a size.