#32866 closed defect (bug) (fixed)
dashicons CSS: one-word font families don't need quotes
Reported by: | afercia | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.2 |
Component: | Administration | Keywords: | has-patch commit |
Focuses: | ui | Cc: |
Description
several times in the admin CSS the dashicons font family is referenced between single quotes, e.g.:
font: normal 20px/1 'dashicons';
found also some uppercase versions:
font: normal 40px/45px 'Dashicons';
with single-word font families there's no need for quotes.
Attachments (3)
Change History (12)
#3
@
9 years ago
- Keywords commit added
- Milestone changed from Awaiting Review to 4.4
Refreshed patch. Would be nice to have this in early in the release cycle.
#6
in reply to:
↑ 5
@
9 years ago
Replying to SergeyBiryukov:
Should we perhaps add this to our CSS coding standards?
See related discussion here: https://wordpress.slack.com/archives/design/p1435872121000919
Maybe just add something to the existing sentence:
Use double quotes rather than single quotes, and only when needed, such as when a font name has a space.
cc @helen
#7
@
9 years ago
- Owner set to wonderboymusic
- Resolution set to fixed
- Status changed from new to closed
In 33912:
#8
in reply to:
↑ 5
;
follow-up:
↓ 9
@
9 years ago
Replying to SergeyBiryukov:
Should we perhaps add this to our CSS coding standards?
The "quote" part of this is already documented here:
- https://make.wordpress.org/core/handbook/best-practices/coding-standards/css/#values
Use double quotes rather than single quotes, and only when needed, such as when a font name has a space.
The "font name" part of this is also already documented and is now against what was just committed in r33912:
- https://make.wordpress.org/core/handbook/best-practices/coding-standards/css/#properties
All properties and values should be lowercase, except for font names and vendor-specific properties.
All Dashicon font file names are lowercase: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/fonts
dashicons.svg
reports the font id as <font id="dashicons" horiz-adv-x="2000" >
dashicons.ttf
reports the name on Mac OSX Font Book as Dashicons
The main GitHub repo https://github.com/melchoyce/dashicons uses Dashicons
for font name.
The commit message of r33912 uses Dashicons
as the font name
So the question is "Should this be reopened and all instances of the font name dashicons
be replaced with Dashicons
?" cc @helen @melchoyce
This is an advantage/disadvantage of working on the CSS lint task in #29792 and ensuring there is no ambiguity
#9
in reply to:
↑ 8
@
9 years ago
Replying to netweb:
So the question is "Should this be reopened and all instances of the font name
dashicons
be replaced withDashicons
?" cc @helen @melchoyce
I think the name that matters here is the one used in the font-family
descriptor in the @font-face
rule, it's designed to override the original font name, meaning we could use also "foofoo" :).
http://www.w3.org/TR/css3-fonts/#font-family-desc
It overrides the font family names contained in the underlying font data
Unrelated: any chance to fix the Trac CSS for the blockquote? :) ^
First pass.