Skip to content

Commit 713183c

Browse files
committedDec 18, 2016
feat(modifier): implemebted star space and label visibility #22, #17
1 parent 77e9ccf commit 713183c

File tree

3 files changed

+39
-11
lines changed

3 files changed

+39
-11
lines changed
 

‎src/sc5-styleguide/elements.sc5.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,13 +374,13 @@ Styleguide 1.2.2.1
374374
*/
375375

376376
/*
377-
Container stars spread
377+
Container stars space
378378
379379
The spacing between stars.
380380
381-
none - stars center im horizontal center.
382-
.spread - stars take all available space to position.
383-
381+
none - stars position at horizontal center.
382+
.space-between - stars take all available space to position. Space is only between the stars.
383+
.space-around - stars take all available space to position. Space is only around the stars.
384384
385385
markup:
386386
<div class="star-container {$modifiers}">

‎src/sc5-styleguide/modifiers.sc5.scss

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,13 @@ Styleguide 1.1.3
257257
*/
258258

259259
/*
260-
Spread
260+
Space
261261
262-
Different spread options
262+
Different space options
263263
264-
default - No spread
265-
.spread - Stars are spread to the entire container width
264+
default - stars position at horizontal center.
265+
.space-between - stars take all available space to position. Space is only between the stars.
266+
.space-around - stars take all available space to position. Space is only around the stars.
266267
267268
markup:
268269
<div class="rating value-4 {$modifiers}">
@@ -289,7 +290,7 @@ Overriding default colors of ratings to display the color independent of the rat
289290
default - No static color
290291
.color-default - Stars are always colored default
291292
.color-positive - Stars are always colored positive
292-
.color-middle - Stars are always colored middle
293+
.color-ok - Stars are always colored middle
293294
.color-negative - Stars are always colored negative
294295
295296
markup:
@@ -624,4 +625,31 @@ Styleguide 1.1.6
624625
</div>
625626
626627
Styleguide 1.1.10
627-
*/
628+
*/
629+
630+
/*
631+
Label
632+
633+
Label hidden or not
634+
635+
default - stars position at horizontal center.
636+
.label-hidden - stars take all available space to position. Space is only between the stars.
637+
.label-visible - stars take all available space to position. Space is only around the stars.
638+
639+
markup:
640+
<div class="rating value-4 {$modifiers}">
641+
<div class="label-value">3.5</div>
642+
<div class="star-container">
643+
<div class="star" ng-repeat="i in [1,2,3,4,5]">
644+
<svg class="star-empty">
645+
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="assets/images/star-rating.icons.svg#star-empty"></use>
646+
</svg>
647+
<svg class="star-filled">
648+
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="assets/images/star-rating.icons.svg#star-filled"></use>
649+
</svg>
650+
</div>
651+
</div>
652+
</div>
653+
654+
Styleguide 1.1.11
655+
*/

‎src/scss/_variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $default-stars-label-margin: 5px;
1515

1616
/*Colors*/
1717
$color-negative-rating: #f03c56 !default;
18-
$color-middle-rating: #ffc058 !default;
18+
$color-ok-rating: #ffc058 !default;
1919
$color-positive-rating: #7ed321 !default;
2020
$color-default-rating: #999 !default;
2121

0 commit comments

Comments
 (0)
Please sign in to comment.