Skip to content

Commit

Permalink
Removes the star icon font (#31670)
Browse files Browse the repository at this point in the history
* removes the star font
The WooCommerce font can hold many other icons there isn't the reason to load a font for a single icon

* updates custom templates stylesheets

* adds woff2 font format to themes customized stylesheets

* fix the star font size diff

* removes WooCommerce.eot and SVG file that are no longer needed and updates the template style in order to import from font.scss

* Optimized font import
Unifies the import of fonts by extending it to the twenty-twenty-three theme

* Add changefile(s) from automation for the following project(s): woocommerce

* Add changefile(s) from automation for the following project(s): woocommerce

* Svg font minification (WooCommerce.svg)

* Add changefile(s) from automation for the following project(s): woocommerce

* "star" font phasing out
The font family 'star' was replaced in all files. However, it continues to remain physically in the repo but not in the style files

* Removes the `.eot` font file since nowdays it's completely useless

---------

Co-authored-by: github-actions <github-actions@github.com>
  • Loading branch information
erikyo and github-actions committed Mar 20, 2024
1 parent 0a3cf74 commit 49b9207
Show file tree
Hide file tree
Showing 20 changed files with 32 additions and 160 deletions.
2 changes: 1 addition & 1 deletion plugins/woocommerce-blocks/assets/css/style.scss
Expand Up @@ -109,7 +109,7 @@ body.wc-block-product-gallery-modal-open {
line-height: 1.618;
font-size: 1em;
/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
font-family: star;
font-family: WooCommerce;
font-weight: 400;
margin: 0 auto;
text-align: left;
Expand Down
Expand Up @@ -38,7 +38,7 @@
line-height: 1.618;
font-size: 1em;
/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
font-family: star;
font-family: WooCommerce;
font-weight: 400;

&::before {
Expand Down
Expand Up @@ -11,7 +11,7 @@
line-height: 1.618;
font-size: 1em;
/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
font-family: star;
font-family: WooCommerce;
font-weight: 400;
text-align: left;

Expand Down Expand Up @@ -74,7 +74,7 @@
line-height: 1.618;
font-size: 1em;
/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
font-family: star;
font-family: WooCommerce;
font-weight: 400;
-webkit-text-stroke: 2px var(--wp--preset--color--black, #000);
&::before {
Expand Down
Expand Up @@ -16,7 +16,7 @@ $line-height: 1.618;
line-height: $line-height;
font-size: 1em;
/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
font-family: star;
font-family: WooCommerce;
font-weight: 400;

&.wc-block-grid__product-rating__stars {
Expand Down Expand Up @@ -86,7 +86,7 @@ $line-height: 1.618;
line-height: $line-height;
font-size: 1em;
/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
font-family: star;
font-family: WooCommerce;
font-weight: 400;
-webkit-text-stroke: 2px var(--wp--preset--color--black, #000);
&::before {
Expand Down
Expand Up @@ -176,7 +176,7 @@
height: 1em;
line-height: 1;
width: 5.3em;
font-family: star; /* stylelint-disable-line */
font-family: WooCommerce; /* stylelint-disable-line */
font-weight: 400;
}

Expand Down
Binary file removed plugins/woocommerce/assets/fonts/WooCommerce.eot
Binary file not shown.
2 changes: 1 addition & 1 deletion plugins/woocommerce/assets/fonts/WooCommerce.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plugins/woocommerce/assets/fonts/WooCommerce.ttf
Binary file not shown.
Binary file modified plugins/woocommerce/assets/fonts/WooCommerce.woff
Binary file not shown.
Binary file not shown.
Binary file removed plugins/woocommerce/assets/fonts/star.eot
Binary file not shown.
4 changes: 4 additions & 0 deletions plugins/woocommerce/changelog/31670-remove-star-icon
@@ -0,0 +1,4 @@
Significance: minor
Type: performance

Removes star font
18 changes: 7 additions & 11 deletions plugins/woocommerce/client/legacy/css/_fonts.scss
Expand Up @@ -4,22 +4,18 @@
*/
@font-face {
font-family: 'star';
src: url('../fonts/star.eot');
src: url('../fonts/star.eot?#iefix') format('embedded-opentype'),
url('../fonts/star.woff') format('woff'),
url('../fonts/star.ttf') format('truetype'),
url('../fonts/star.svg#star') format('svg');
src: url('../fonts/WooCommerce.woff2') format('woff2'),
url('../fonts/WooCommerce.woff') format('woff'),
url('../fonts/WooCommerce.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: 'WooCommerce';
src: url('../fonts/WooCommerce.eot');
src: url('../fonts/WooCommerce.eot?#iefix') format('embedded-opentype'),
url('../fonts/WooCommerce.woff') format('woff'),
url('../fonts/WooCommerce.ttf') format('truetype'),
url('../fonts/WooCommerce.svg#WooCommerce') format('svg');
src: url('../fonts/WooCommerce.woff2') format('woff2'),
url('../fonts/WooCommerce.woff') format('woff'),
url('../fonts/WooCommerce.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
}
24 changes: 2 additions & 22 deletions plugins/woocommerce/client/legacy/css/twenty-nineteen.scss
Expand Up @@ -13,27 +13,7 @@ $highlights-color: #0073aa;
/**
* Fonts
*/
@font-face {
font-family: 'star';
src: url('../fonts/star.eot');
src: url('../fonts/star.eot?#iefix') format('embedded-opentype'),
url('../fonts/star.woff') format('woff'),
url('../fonts/star.ttf') format('truetype'),
url('../fonts/star.svg#star') format('svg');
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: 'WooCommerce';
src: url('../fonts/WooCommerce.eot');
src: url('../fonts/WooCommerce.eot?#iefix') format('embedded-opentype'),
url('../fonts/WooCommerce.woff') format('woff'),
url('../fonts/WooCommerce.ttf') format('truetype'),
url('../fonts/WooCommerce.svg#WooCommerce') format('svg');
font-weight: normal;
font-style: normal;
}
@import "fonts";

/**
* Global elements
Expand Down Expand Up @@ -226,7 +206,7 @@ ul.products {
line-height: 1;
font-size: 1em;
width: 5.4em;
font-family: 'star';
font-family: WooCommerce;

&::before {
content: '\73\73\73\73\73';
Expand Down
26 changes: 2 additions & 24 deletions plugins/woocommerce/client/legacy/css/twenty-seventeen.scss
Expand Up @@ -7,29 +7,7 @@
/**
* Fonts
*/
@font-face {
font-family: "star";
src: url("../fonts/star.eot");
src:
url("../fonts/star.eot?#iefix") format("embedded-opentype"),
url("../fonts/star.woff") format("woff"),
url("../fonts/star.ttf") format("truetype"),
url("../fonts/star.svg#star") format("svg");
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: "WooCommerce";
src: url("../fonts/WooCommerce.eot");
src:
url("../fonts/WooCommerce.eot?#iefix") format("embedded-opentype"),
url("../fonts/WooCommerce.woff") format("woff"),
url("../fonts/WooCommerce.ttf") format("truetype"),
url("../fonts/WooCommerce.svg#WooCommerce") format("svg");
font-weight: normal;
font-style: normal;
}
@import "fonts";

/**
* Mixins
Expand Down Expand Up @@ -225,7 +203,7 @@ ul.products {
line-height: 1;
font-size: 1em;
width: 5.4em;
font-family: "star";
font-family: WooCommerce;

&::before {
content: "\73\73\73\73\73";
Expand Down
26 changes: 2 additions & 24 deletions plugins/woocommerce/client/legacy/css/twenty-twenty-one.scss
Expand Up @@ -13,29 +13,7 @@ $highlights-color: #88a171;
/**
* Fonts
*/
@font-face {
font-family: star;
src: url(../fonts/star.eot);
src:
url(../fonts/star.eot?#iefix) format("embedded-opentype"),
url(../fonts/star.woff) format("woff"),
url(../fonts/star.ttf) format("truetype"),
url(../fonts/star.svg#star) format("svg");
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: WooCommerce;
src: url(../fonts/WooCommerce.eot);
src:
url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),
url(../fonts/WooCommerce.woff) format("woff"),
url(../fonts/WooCommerce.ttf) format("truetype"),
url(../fonts/WooCommerce.svg#WooCommerce) format("svg");
font-weight: 400;
font-style: normal;
}
@import "fonts";

/**
* Global elements
Expand Down Expand Up @@ -398,7 +376,7 @@ ul.products {
line-height: 1;
font-size: 1em;
width: 5.4em;
font-family: star;
font-family: WooCommerce;
margin-bottom: 0.7rem;

&::before {
Expand Down
26 changes: 2 additions & 24 deletions plugins/woocommerce/client/legacy/css/twenty-twenty-three.scss
@@ -1,29 +1,7 @@
/**
* Fonts
*/
@font-face {
font-family: star;
src: url(../fonts/star.eot);
src:
url(../fonts/star.eot?#iefix) format("embedded-opentype"),
url(../fonts/star.woff) format("woff"),
url(../fonts/star.ttf) format("truetype"),
url(../fonts/star.svg#star) format("svg");
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: WooCommerce;
src: url(../fonts/WooCommerce.eot);
src:
url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),
url(../fonts/WooCommerce.woff) format("woff"),
url(../fonts/WooCommerce.ttf) format("truetype"),
url(../fonts/WooCommerce.svg#WooCommerce) format("svg");
font-weight: 400;
font-style: normal;
}
@import "fonts";

@import "mixins";
@import "animation";
Expand Down Expand Up @@ -440,7 +418,7 @@
height: 1em;
line-height: 1;
width: 5.4rem;
font-family: star;
font-family: WooCommerce;
font-style: normal;
color: var(--wp--preset--color--contrast);
margin: 1rem auto 0.7rem auto;
Expand Down
26 changes: 2 additions & 24 deletions plugins/woocommerce/client/legacy/css/twenty-twenty-two.scss
@@ -1,29 +1,7 @@
/**
* Fonts
*/
@font-face {
font-family: star;
src: url(../fonts/star.eot);
src:
url(../fonts/star.eot?#iefix) format("embedded-opentype"),
url(../fonts/star.woff) format("woff"),
url(../fonts/star.ttf) format("truetype"),
url(../fonts/star.svg#star) format("svg");
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: WooCommerce;
src: url(../fonts/WooCommerce.eot);
src:
url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),
url(../fonts/WooCommerce.woff) format("woff"),
url(../fonts/WooCommerce.ttf) format("truetype"),
url(../fonts/WooCommerce.svg#WooCommerce) format("svg");
font-weight: 400;
font-style: normal;
}
@import "fonts";

@import "mixins";
@import "animation";
Expand Down Expand Up @@ -435,7 +413,7 @@ $tt2-gray: #f7f7f7;
height: 1em;
line-height: 1;
width: 5.4rem;
font-family: star;
font-family: WooCommerce;
color: var(--wp--preset--color--secondary);
margin: 1rem auto 0.7rem auto;

Expand Down
24 changes: 2 additions & 22 deletions plugins/woocommerce/client/legacy/css/twenty-twenty.scss
Expand Up @@ -15,27 +15,7 @@ $highlights-color: #cd2653;
/**
* Fonts
*/
@font-face {
font-family: star;
src: url(../fonts/star.eot);
src: url(../fonts/star.eot?#iefix) format("embedded-opentype"),
url(../fonts/star.woff) format("woff"),
url(../fonts/star.ttf) format("truetype"),
url(../fonts/star.svg#star) format("svg");
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: WooCommerce;
src: url(../fonts/WooCommerce.eot);
src: url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),
url(../fonts/WooCommerce.woff) format("woff"),
url(../fonts/WooCommerce.ttf) format("truetype"),
url(../fonts/WooCommerce.svg#WooCommerce) format("svg");
font-weight: 400;
font-style: normal;
}
@import "fonts";

/**
* Global elements
Expand Down Expand Up @@ -312,7 +292,7 @@ ul.products {
line-height: 1;
font-size: 1em;
width: 5.4em;
font-family: star;
font-family: WooCommerce;
margin-bottom: 0.7rem;

&::before {
Expand Down
2 changes: 1 addition & 1 deletion plugins/woocommerce/client/legacy/css/woocommerce.scss
Expand Up @@ -804,7 +804,7 @@ p.demo_store,
line-height: 1;
font-size: 1em;
width: 5.4em;
font-family: "star";
font-family: WooCommerce;

&::before {
content: "\73\73\73\73\73";
Expand Down

0 comments on commit 49b9207

Please sign in to comment.