Make WordPress Core

Opened 6 years ago

Closed 4 years ago

#42819 closed enhancement (maybelater)

dashicons css: load woff file instead of inline embed base64 code in dashicons.css

Reported by: matthias-reuter's profile Matthias Reuter Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.8
Component: Administration Keywords: has-patch
Focuses: performance Cc:


Currently, the woff code is embed into the /wp-includes/css/dashicons.css aswell as /wp-includes/css/dashicons.min.css as base64 code.

Due to performance purposes, the code should be changed to:

@font-face {
	font-family: dashicons;
		src: url(/wp-includes/fonts/dashicons.woff),
		url(/wp-includes/fonts/dashicons.ttf) format("truetype"),
		url(/wp-includes/fonts/dashicons.svg#dashicons) format("svg"),
	font-weight: normal;
	font-style: normal;

Attachments (1)

42819.patch (35.0 KB) - added by Shital Patel 6 years ago.
I have added Patch for dashicons css

Download all attachments as: .zip

Change History (6)

#1 @Matthias Reuter
6 years ago

To keep the relative paths in the dashicons.css, here's a better version of the improvement

@font-face {
	font-family: dashicons;
    src: url(/wp-includes/fonts/dashicons.woff),
		url(../fonts/dashicons.ttf) format("truetype"),
		url(../fonts/dashicons.svg#dashicons) format("svg"),
	font-weight: normal;
	font-style: normal;

@Shital Patel
6 years ago

I have added Patch for dashicons css

#2 @Shital Patel
6 years ago

  • Keywords has-patch added

#3 @Shital Patel
5 years ago

  • Keywords needs-testing added

#4 @desrosj
4 years ago

  • Component changed from General to Administration
  • Keywords needs-testing removed
  • Milestone Awaiting Review deleted
  • Version changed from 4.9.1 to 3.8

Hi @matthias-reuter,

Thanks for opening this!

Any changes to the Dashicons font need to be made on the Dashicons GitHub repository. Please open an issue or PR with details about this request.

Currently, there is only one font format included in the CSS with base64, WOFF. I was not involved directly with this decision, but I am almost positive it's because the build process used for Dashicons only supports creating a .woff2 file, not .woff. But, embedded WOFF is still supported.

Additionally, WOFF is an outdated format. It has been replaced by WOFF2. Only IE cannot use WOFF2, so this is maintained for backwards compatibility since IE11 is still supported in Core.

#5 @desrosj
4 years ago

  • Resolution set to maybelater
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.