WordPress.org

Make WordPress Core

Opened 7 months ago

Last modified 7 months ago

#42819 new enhancement

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

Reported by: Matthias Reuter Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.1
Component: General Keywords: has-patch
Focuses: performance Cc:

Description

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"),
		url(/wp-includes/fonts/dashicons.eot);
	font-weight: normal;
	font-style: normal;
}

Attachments (1)

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

Download all attachments as: .zip

Change History (3)

#1 @Matthias Reuter
7 months 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"),
		url(../fonts/dashicons.eot);
	font-weight: normal;
	font-style: normal;
}

@Shital Patel
7 months ago

I have added Patch for dashicons css

#2 @Shital Patel
7 months ago

  • Keywords has-patch added
Note: See TracTickets for help on using tickets.