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

Commit

Permalink
v10.3.0 - Add variable for svg star icons (#400)
Browse files Browse the repository at this point in the history
* v10.2.0 - Add variables for star icons.

* v10.2.0 - Remove test property.

* v10.3.0 - PR comment.
  • Loading branch information
kevinrodrigues authored Sep 27, 2022
1 parent c20554c commit e430b6a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ Future Todo List
- Make typography and utility classes silent extenders (so that they can be extended by components without importing all utility classes).
- Update to use latest v2 PIE design tokens

v10.3.0
------------------------------
*September 26, 2022*

### Added
- Variables `$star-icon-path--filled` & `$star-icon-path--empty`.

### Changed
- `ratings` optional component to read from variables file for consuming applications to set custom paths for svg star icons.


v10.2.0
------------------------------
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@justeat/fozzie",
"title": "Fozzie – Just Eat UI Web Framework",
"description": "UI Web Framework for the Just Eat Global Platform",
"version": "10.2.0",
"version": "10.3.0",
"main": "dist/js/index.js",
"files": [
"dist/js",
Expand Down
11 changes: 6 additions & 5 deletions src/scss/components/optional/_ratings.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@use '../../tools/mixins/type';
@use '../../tools/mixins/ratings';
@use '../../settings/variables' as v;

@mixin rating() {
/**
Expand All @@ -22,7 +23,7 @@
$star-size--large : 42px;

.c-rating {
@extend %c-icon--star--empty !optional;
background-image: inline(#{v.$star-icon-path--empty});
background-repeat: repeat-x;
display: inline-block;
height: $star-size--default;
Expand Down Expand Up @@ -125,7 +126,7 @@
}

.c-rating--fill {
@extend %c-icon--star--fill !optional;
background-image: inline(#{v.$star-icon-path--filled});
vertical-align: top;
background-repeat: repeat-x;
display: inline-block;
Expand All @@ -149,7 +150,7 @@
&:checked {
& + label,
& ~ input + label {
@extend %c-icon--star--fill !optional;
background-image: inline(#{v.$star-icon-path--filled});
}
}
}
Expand All @@ -165,12 +166,12 @@
.c-icon--star {
display: block;
cursor: pointer;
@extend %c-icon--star--empty !optional;
background-image: inline(#{v.$star-icon-path--empty});
@extend %u-hideText;

&:hover,
&:hover ~ label {
@extend %c-icon--star--fill !optional;
background-image: inline(#{v.$star-icon-path--filled});
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/scss/settings/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ $img-path-url : '/assets/img' !default; // Usage: background: url('
$icon-path : '#{$img-path}/icons' !default;
$font-path : 'dist/fonts' !default;

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

// App-specific variables
// ==========================================================================
Expand Down

0 comments on commit e430b6a

Please sign in to comment.