icon font for stars. #2672

This commit is contained in:
James Koster 2013-04-05 12:51:34 +01:00
parent 23eb142c79
commit e6c66f72c9
7 changed files with 41 additions and 41 deletions

File diff suppressed because one or more lines are too long

View File

@ -6,6 +6,19 @@
@tertiarytext: @primarytext; /* Text on tertiary colour bg */
@quaternary: desaturate( darken( @tertiary, 45%), 40% ); /* Price slider bg */
/* =Custom Font
-------------------------------------------------------------- */
@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;
}
/* =Global styles/layout
-------------------------------------------------------------- */
.woocommerce-message, .woocommerce-error, .woocommerce-info {
@ -832,6 +845,7 @@ p.demo_store {
}
/* Star rating */
.star-rating {
float: right;
overflow: hidden;
@ -840,16 +854,14 @@ p.demo_store {
line-height: 1em;
font-size: 1em;
width: 5.4em;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
font-family: 'star';
&:before {
content: "\2606\2606\2606\2606\2606";
content: "\73\73\73\73\73";
color: darken( @secondary, 10 );
float: left;
top: 0;
left: 0;
position: absolute;
letter-spacing: 0.1em;
letter-spacing:0\9; // IE8 & below hack ;-(
}
span {
overflow: hidden;
@ -860,12 +872,10 @@ p.demo_store {
padding-top: 1.5em;
}
span:before {
content: "\2605\2605\2605\2605\2605";
content: "\53\53\53\53\53";
top: 0;
position: absolute;
left: 0;
letter-spacing: 0.1em;
letter-spacing:0\9; // IE8 & below hack ;-(
}
}
@ -916,15 +926,13 @@ p.demo_store {
line-height: 1em;
font-size: 1em;
width: 5.4em;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
font-family: "star";
&:before {
content: "\2606\2606\2606\2606\2606";
content: "\73\73\73\73\73";
float: left;
top: 0;
left: 0;
position: absolute;
letter-spacing: 0.1em;
letter-spacing:0\9; // IE8 & below hack ;-(
color: darken( @secondary, 10 );
}
@ -938,12 +946,10 @@ p.demo_store {
padding-top: 1em;
overflow: hidden;
&:before {
content: "\2605\2605\2605\2605\2605";
content: "\53\53\53\53\53";
top: 0;
position: absolute;
left: 0;
letter-spacing: 0.1em;
letter-spacing:0\9; // IE8 & below hack ;-(
visibility: hidden;
}
}
@ -1777,30 +1783,4 @@ p.demo_store {
background-size: 12px 9px;
}
}
}
// Firefox hack :( (for some reason Firefox doesn't like applying font-size to pseudo-elements containing unicode chars in the content property)
@-moz-document url-prefix() {
.woocommerce .star-rating, .woocommerce-page .star-rating {
width:3.4em;
font-size:1.5em;
}
.woocommerce p.stars, .woocommerce-page p.stars {
width:3.5em;
font-size:1.5em;
a.star-1 {
width:.7em;
}
a.star-2 {
width:1.4em;
}
a.star-3 {
width:2.1em;
}
a.star-4 {
width:2.8em;
}
a.star-5 {
width:3.5em;
}
}
}

BIN
assets/fonts/star.eot Normal file

Binary file not shown.

19
assets/fonts/star.svg Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
This is a custom SVG font generated by IcoMoon.
<iconset grid="16"></iconset>
</metadata>
<defs>
<font id="icomoon" horiz-adv-x="512" >
<font-face units-per-em="512" ascent="480" descent="-32" />
<missing-glyph horiz-adv-x="512" />
<glyph unicode="&#x53;" d="M 269.474,480.00L 352.509,311.757L 538.171,284.777L 403.822,153.824L 435.54-31.095L 269.474,56.21L 103.408-31.095L 135.119,153.824L 0.771,284.777L 186.438,311.757 z" horiz-adv-x="538.9473684210526" />
<glyph unicode="&#x73;" d="M 269.474,406.94l 54.04-109.487l 7.524-15.247l 16.821-2.447l 120.827-17.559L 381.251,176.982l-12.18-11.868l 2.873-16.756l 20.647-120.336
L 284.521,84.833L 269.474,92.745l-15.047-7.912L 146.351,28.017l 20.642,120.336l 2.873,16.756l-12.175,11.868L 70.263,262.201l 120.827,17.559
l 16.826,2.447l 7.524,15.247L 269.474,406.94 M 269.474,480.00L 186.438,311.757l-185.667-26.98l 134.349-130.953l-31.717-184.918L 269.474,56.21l 166.066-87.304
l-31.722,184.918l 134.354,130.953l-185.662,26.98L 269.474,480.00L 269.474,480.00z" horiz-adv-x="538.9473684210526" />
<glyph unicode="&#x20;" horiz-adv-x="256" />
<glyph class="hidden" unicode="&#xf000;" d="M0,480L 512 -32L0 -32 z" horiz-adv-x="0" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/fonts/star.ttf Normal file

Binary file not shown.

BIN
assets/fonts/star.woff Normal file

Binary file not shown.

View File

@ -188,6 +188,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Tweak - UX - Only display validation result on required fields
* Tweak - Product column widths in admin
* Tweak - .shipping_address clears to avoid flash of ugliness in some themes when revealing shipping address
* Tweak - created an icon font for the star ratings to improve consistency
* Localisation - NZ States
= 2.0.5 - 26/03/2013 =