[wp-trac] [WordPress Trac] #36753: Use system fonts for a faster, more native-feeling admin

WordPress Trac noreply at wordpress.org
Thu Jun 16 10:21:25 UTC 2016


#36753: Use system fonts for a faster, more native-feeling admin
--------------------------------------------------------+------------------
 Reporter:  helen                                       |       Owner:
     Type:  task (blessed)                              |      Status:  new
 Priority:  normal                                      |   Milestone:  4.6
Component:  Administration                              |     Version:
 Severity:  normal                                      |  Resolution:
 Keywords:  needs-screenshots good-first-bug has-patch  |     Focuses:  ui
--------------------------------------------------------+------------------

Comment (by netweb):

 Replying to [comment:14 Otto42]:
 > Replying to [comment:13 helen]:
 > > Replying to [comment:8 netweb]:
 > > > in [attachment:36753.4.diff] I removed the quotes around font names
 that are not required per the CSS standards.
 > >
 > > I am oddly torn about these quotes. I think what I like about them is
 that they separate named fonts from system aliases. But, of course, being
 inconsistent with standards and internally is not good. Any thoughts on
 that?
 >
 > I think it's a matter of dealer's choice, really.
 >
 > https://www.w3.org/TR/css-fonts-3/#font-family-prop
 >
 > > Font family names other than generic families must either be given
 quoted as strings, or unquoted as a sequence of one or more identifiers.
 This means most punctuation characters and digits at the start of each
 token must be escaped in unquoted font family names.
 >
 > > To avoid mistakes in escaping, it is recommended to quote font family
 names that contain white space, digits, or punctuation characters other
 than hyphens:
 >
 > > Font family names that happen to be the same as a keyword value ...
 must be quoted to prevent confusion with the keywords with the same names.
 >
 > So, quoting them is not necessary, but it does prevent any type of
 ambiguity. As long as you ensure that you do not accidentally quote these
 fallback keywords: inherit, serif, sans-serif, monospace, fantasy,
 cursive, initial, and default.
 >
 > The general standard I've seen elsewhere on the web is to only quote
 font names that have non-alpha characters in them, such as whitespace or
 hyphens. I think this usually is to prevent accidental quoting of the
 fallback keywords, since if quoted, those plain don't work, and since
 they're always default fallbacks, they may not be as rigorously tested on
 many platforms.

 @helen I'm +1 on the above, and also per below where `cssmin` is "re-
 quoting" those fonts that adhere to the conditions above:

 Replying to [comment:30 ocean90]:
 > Worth to mention that `cssmin` is changing it to `font-family:-apple-
 system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-
 Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;`.

 Updating all instances of the font stack to adhere our CSS coding
 standards documentation seems the way to go:

 * `font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
 Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;`

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36753#comment:45>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list