Skip to content

Commit

Permalink
Adds border color to ui rating
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Aug 29, 2014
1 parent 5b4116c commit 2b38956
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
17 changes: 16 additions & 1 deletion src/definitions/modules/rating.less
Expand Up @@ -57,6 +57,7 @@
vertical-align: top;
}


/*******************************
Types
*******************************/
Expand All @@ -67,12 +68,14 @@

/* Inactive */
.ui.star.rating .icon {
width: @starIconHitbox;
color: @starInactiveColor;
}

/* Active Star */
.ui.star.rating .active.icon {
color: @starActiveColor !important;
text-shadow: @starActiveShadow;
}

/* Hovered Star */
Expand All @@ -81,18 +84,30 @@
color: @starHoverColor !important;
}

.ui.star.rating.partial {
position: relative;
z-index: 1;
}
.ui.star.rating.partial:before {
position: absolute;
z-index: -1;
}



/*-------------------
Heart
--------------------*/

.ui.star.rating .icon {
.ui.heart.rating .icon {
width: @heartIconHitbox;
color: @heartInactiveColor;
}

/* Active Heart */
.ui.heart.rating .active.icon {
color: @heartActiveColor !important;
text-shadow: @heartActiveShadow;
}

/* Hovered Heart */
Expand Down
8 changes: 8 additions & 0 deletions src/themes/packages/default/modules/rating.overrides
Expand Up @@ -43,6 +43,14 @@
content: '\f005';
}

/* Partial */
.ui.star.rating .partial.icon:before {
content: '\f006';
}
.ui.star.rating .partial.icon {
content: '\f005';
}

/*-------------------
Heart
--------------------*/
Expand Down
17 changes: 16 additions & 1 deletion src/themes/packages/default/modules/rating.variables
Expand Up @@ -16,14 +16,29 @@
--------------------*/

/* Star */
@starIconHitbox: @iconHitbox;
@starInactiveColor: @inactiveColor;
@starHoverColor: #FFB70A;
@starActiveColor: #FFCB08;
@starActiveColor: #FFE623;
@starActiveShadow:
0px -1px 0px #CFA300,
-1px 0px 0px #CFA300,
0px 1px 0px #CFA300,
1px 0px 0px #CFA300
;

/* Heart */
@heartIconHitbox: 1.2em;
@heartInactiveColor: @inactiveColor;
@heartHoverColor: #FF2733;
@heartActiveColor: #EF404A;
@heartActiveShadow:
0px -1px 0px #EF404A,
-1px 0px 0px #EF404A,
0px 1px 0px #EF404A,
1px 0px 0px #EF404A
;


/*-------------------
States
Expand Down

0 comments on commit 2b38956

Please sign in to comment.