Skip to content

Commit 4455dcb

Browse files
committed
migrate dashboard icons to icon-font
Using a font instead of custom inline-svg all default dashboard styles are applied to the Cachify icons, too. Convert the current icons into a font using IcoMoon app and adjust the output accordingly. Preserve original SVG files, but do not distribute.
1 parent 643353e commit 4455dcb

11 files changed

+63
-39
lines changed

.distignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/.git
33
/.github
44
/.wordpress-org
5+
/images/src
56
/node_modules
67
/vendor
78

.stylelintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "@wordpress/stylelint-config",
33
"rules": {
4+
"font-family-no-missing-generic-family-keyword": null,
45
"selector-id-pattern": null
56
}
67
}

css/dashboard.css

+28-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
11
/* @group Dashboard */
2-
#dashboard_right_now .cachify-icon {
3-
width: 19px;
4-
height: 13px;
5-
fill: #606a73;
2+
@font-face {
3+
font-family: cachify-symbols;
4+
src: url(../images/symbols.eot);
5+
src:
6+
url(../images/symbols.eot#iefix) format("embedded-opentype"),
7+
url(../images/symbols.ttf) format("truetype"),
8+
url(../images/symbols.woff) format("woff"),
9+
url(../images/symbols.svg#cachify) format("svg");
10+
font-weight: 400;
11+
font-style: normal;
12+
font-display: block;
613
}
714

815
#dashboard_right_now li a.cachify-glance::before {
9-
content: "";
10-
padding: 0;
11-
}/* @end group */
16+
font: 400 13px/1 cachify-symbols;
17+
}
18+
19+
#dashboard_right_now li a.cachify-glance.cachify-icon-db::before {
20+
content: "\e900";
21+
}
22+
23+
#dashboard_right_now li a.cachify-glance.cachify-icon-hdd::before {
24+
content: "\e901";
25+
}
26+
27+
#dashboard_right_now li a.cachify-glance.cachify-icon-apc::before,
28+
#dashboard_right_now li a.cachify-glance.cachify-icon-memcached::before {
29+
content: "\e902";
30+
}
31+
32+
/* @end group */

images/src/symbol_db.svg

+6
Loading

images/src/symbol_hdd.svg

+6
Loading

images/src/symbol_mem.svg

+4
Loading

images/symbols.eot

2.29 KB
Binary file not shown.

0 commit comments

Comments
 (0)