[wp-trac] [WordPress Trac] #36753: Use system fonts for a faster, more native-feeling admin
WordPress Trac
noreply at wordpress.org
Thu May 5 18:57:38 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: has-patch needs-screenshots | Focuses: ui
-----------------------------------------+------------------
Comment (by 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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36753#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list