Skip to content
This repository was archived by the owner on Nov 29, 2022. It is now read-only.

Commit e430b6a

Browse files
v10.3.0 - Add variable for svg star icons (#400)
* v10.2.0 - Add variables for star icons. * v10.2.0 - Remove test property. * v10.3.0 - PR comment.
1 parent c20554c commit e430b6a

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ Future Todo List
88
- Make typography and utility classes silent extenders (so that they can be extended by components without importing all utility classes).
99
- Update to use latest v2 PIE design tokens
1010

11+
v10.3.0
12+
------------------------------
13+
*September 26, 2022*
14+
15+
### Added
16+
- Variables `$star-icon-path--filled` & `$star-icon-path--empty`.
17+
18+
### Changed
19+
- `ratings` optional component to read from variables file for consuming applications to set custom paths for svg star icons.
20+
1121

1222
v10.2.0
1323
------------------------------

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@justeat/fozzie",
33
"title": "Fozzie – Just Eat UI Web Framework",
44
"description": "UI Web Framework for the Just Eat Global Platform",
5-
"version": "10.2.0",
5+
"version": "10.3.0",
66
"main": "dist/js/index.js",
77
"files": [
88
"dist/js",

src/scss/components/optional/_ratings.scss

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@use '../../tools/mixins/type';
22
@use '../../tools/mixins/ratings';
3+
@use '../../settings/variables' as v;
34

45
@mixin rating() {
56
/**
@@ -22,7 +23,7 @@
2223
$star-size--large : 42px;
2324

2425
.c-rating {
25-
@extend %c-icon--star--empty !optional;
26+
background-image: inline(#{v.$star-icon-path--empty});
2627
background-repeat: repeat-x;
2728
display: inline-block;
2829
height: $star-size--default;
@@ -125,7 +126,7 @@
125126
}
126127

127128
.c-rating--fill {
128-
@extend %c-icon--star--fill !optional;
129+
background-image: inline(#{v.$star-icon-path--filled});
129130
vertical-align: top;
130131
background-repeat: repeat-x;
131132
display: inline-block;
@@ -149,7 +150,7 @@
149150
&:checked {
150151
& + label,
151152
& ~ input + label {
152-
@extend %c-icon--star--fill !optional;
153+
background-image: inline(#{v.$star-icon-path--filled});
153154
}
154155
}
155156
}
@@ -165,12 +166,12 @@
165166
.c-icon--star {
166167
display: block;
167168
cursor: pointer;
168-
@extend %c-icon--star--empty !optional;
169+
background-image: inline(#{v.$star-icon-path--empty});
169170
@extend %u-hideText;
170171

171172
&:hover,
172173
&:hover ~ label {
173-
@extend %c-icon--star--fill !optional;
174+
background-image: inline(#{v.$star-icon-path--filled});
174175
}
175176
}
176177

src/scss/settings/_variables.scss

+2
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ $img-path-url : '/assets/img' !default; // Usage: background: url('
128128
$icon-path : '#{$img-path}/icons' !default;
129129
$font-path : 'dist/fonts' !default;
130130

131+
$star-icon-path--filled : '#{$icon-path}/stars/star--filled.svg' !default;
132+
$star-icon-path--empty : '#{$icon-path}/stars/star--empty.svg' !default;
131133

132134
// App-specific variables
133135
// ==========================================================================

0 commit comments

Comments
 (0)