Browse Source

Add new rating variables for text shadow, shadow color. Tweak styles for 2.0

dimmer-flex
jlukic 9 years ago
parent
commit
03c8033d67
3 changed files with 53 additions and 31 deletions
  1. 1
      RELEASE-NOTES.md
  2. 11
      src/definitions/modules/rating.less
  3. 72
      src/themes/default/modules/rating.variables

1
RELEASE-NOTES.md

@ -260,6 +260,7 @@
- **Message** - Slightly increases `box-shadow` - **Message** - Slightly increases `box-shadow`
- **Popup** - Popups now default to `exclusive: false` and will not hide other popups when opening - **Popup** - Popups now default to `exclusive: false` and will not hide other popups when opening
- **Popup** - Popup no longer produces a console error when a position cannot be found on the page. - **Popup** - Popup no longer produces a console error when a position cannot be found on the page.
- **Rating** - Rating styles have been adjusted to use subtle transitions and tweaked color values.
- **Segment** - **Clearfix** has been removed from `ui segment` - **Segment** - **Clearfix** has been removed from `ui segment`
- **Sidebar** - Sidebar now defaults to `useLegacy: false` to avoid the overhead of feature detection for most users - **Sidebar** - Sidebar now defaults to `useLegacy: false` to avoid the overhead of feature detection for most users
- **Search** - Slightly adjusted search result theme for clarity - **Search** - Slightly adjusted search result theme for clarity

11
src/definitions/modules/rating.less

@ -52,6 +52,7 @@
cursor: @iconCursor; cursor: @iconCursor;
width: @iconWidth; width: @iconWidth;
height: @iconHeight; height: @iconHeight;
transition: @iconTransition;
} }
@ -94,13 +95,14 @@
height: @starIconHeight; height: @starIconHeight;
background: @starInactiveBackground; background: @starInactiveBackground;
color: @starInactiveColor; color: @starInactiveColor;
text-shadow: @starInactiveTextShadow;
} }
/* Active Star */ /* Active Star */
.ui.star.rating .active.icon { .ui.star.rating .active.icon {
background: @starActiveBackground !important; background: @starActiveBackground !important;
color: @starActiveColor !important; color: @starActiveColor !important;
text-shadow: @starActiveShadow;
text-shadow: @starActiveTextShadow !important;
} }
/* Selected Star */ /* Selected Star */
@ -108,6 +110,7 @@
.ui.star.rating .icon.selected.active { .ui.star.rating .icon.selected.active {
background: @starSelectedBackground !important; background: @starSelectedBackground !important;
color: @starSelectedColor !important; color: @starSelectedColor !important;
text-shadow: @starSelectedTextShadow !important;
} }
@ -120,13 +123,14 @@
height: @heartIconHeight; height: @heartIconHeight;
background: @heartInactiveBackground; background: @heartInactiveBackground;
color: @heartInactiveColor; color: @heartInactiveColor;
text-shadow: @heartInactiveTextShadow !important;
} }
/* Active Heart */ /* Active Heart */
.ui.heart.rating .active.icon { .ui.heart.rating .active.icon {
background: @heartActiveBackground !important; background: @heartActiveBackground !important;
color: @heartActiveColor !important; color: @heartActiveColor !important;
text-shadow: @heartActiveShadow;
text-shadow: @heartActiveTextShadow !important;
} }
/* Selected Heart */ /* Selected Heart */
@ -134,6 +138,7 @@
.ui.heart.rating .icon.selected.active { .ui.heart.rating .icon.selected.active {
background: @heartSelectedBackground !important; background: @heartSelectedBackground !important;
color: @heartSelectedColor !important; color: @heartSelectedColor !important;
text-shadow: @heartSelectedTextShadow !important;
} }
@ -157,7 +162,7 @@
/* Selected Rating */ /* Selected Rating */
.ui.rating.selected .active.icon { .ui.rating.selected .active.icon {
opacity: @interactiveIconOpacity;
opacity: @interactiveActiveIconOpacity;
} }
.ui.rating.selected .icon.selected, .ui.rating.selected .icon.selected,
.ui.rating .icon.selected { .ui.rating .icon.selected {

72
src/themes/default/modules/rating.variables

@ -4,12 +4,17 @@
@margin: 0em @relativeMini; @margin: 0em @relativeMini;
@whiteSpace: nowrap; @whiteSpace: nowrap;
@verticalAlign: middle; @verticalAlign: middle;
@iconCursor: pointer; @iconCursor: pointer;
@iconWidth: 1.25em; @iconWidth: 1.25em;
@iconHeight: auto; @iconHeight: auto;
@iconTransition:
opacity @defaultDuration @defaultEasing,
background @defaultDuration @defaultEasing,
text-shadow @defaultDuration @defaultEasing,
color @defaultDuration @defaultEasing
;
/*------------------- /*-------------------
@ -29,59 +34,70 @@
/* Star */ /* Star */
@starIconWidth: @iconWidth; @starIconWidth: @iconWidth;
@starIconHeight: @iconHeight; @starIconHeight: @iconHeight;
@starShadowWidth: 1px;
@starInactiveBackground: @inactiveBackground; @starInactiveBackground: @inactiveBackground;
@starInactiveColor: @inactiveColor; @starInactiveColor: @inactiveColor;
@starSelectedBackground: @selectedBackground;
@starSelectedColor: #FFB70A;
@starInactiveTextShadow: none;
@starActiveBackground: @activeBackground; @starActiveBackground: @activeBackground;
@starActiveColor: #FFE623; @starActiveColor: #FFE623;
@starActiveShadow:
0px -1px 0px #CFA300,
-1px 0px 0px #CFA300,
0px 1px 0px #CFA300,
1px 0px 0px #CFA300
@starActiveShadowColor: #DDC507;
@starActiveTextShadow:
0px -@starShadowWidth 0px @starActiveShadowColor,
-@starShadowWidth 0px 0px @starActiveShadowColor,
0px @starShadowWidth 0px @starActiveShadowColor,
@starShadowWidth 0px 0px @starActiveShadowColor
;
@starSelectedBackground: @selectedBackground;
@starSelectedColor: #FFCC00;
@starSelectedShadowColor: #E6A200;
@starSelectedTextShadow:
0px -@starShadowWidth 0px @starSelectedShadowColor,
-@starShadowWidth 0px 0px @starSelectedShadowColor,
0px @starShadowWidth 0px @starSelectedShadowColor,
@starShadowWidth 0px 0px @starSelectedShadowColor
; ;
/* Heart */ /* Heart */
@heartIconWidth: 1.4em; @heartIconWidth: 1.4em;
@heartIconHeight: @iconHeight; @heartIconHeight: @iconHeight;
@heartShadowWidth: 1px;
@heartInactiveBackground: @inactiveBackground; @heartInactiveBackground: @inactiveBackground;
@heartInactiveColor: @inactiveColor; @heartInactiveColor: @inactiveColor;
@heartSelectedBackground: @selectedBackground;
@heartSelectedColor: #FF2733;
@heartInactiveTextShadow: none;
@heartActiveBackground: @activeBackground; @heartActiveBackground: @activeBackground;
@heartActiveColor: #FF2733;
@heartActiveShadow:
0px -1px 0px #9E0000,
-1px 0px 0px #9E0000,
0px 1px 0px #9E0000,
1px 0px 0px #9E0000
@heartActiveColor: #FF6D75;
@heartActiveShadowColor: #CD0707;
@heartActiveTextShadow:
0px -@heartShadowWidth 0px @heartActiveShadowColor,
-@heartShadowWidth 0px 0px @heartActiveShadowColor,
0px @heartShadowWidth 0px @heartActiveShadowColor,
@heartShadowWidth 0px 0px @heartActiveShadowColor
; ;
@heartSelectedBackground: @selectedBackground;
@heartSelectedColor: #FF3000;
@heartSelectedShadowColor: #AA0101;
@heartSelectedTextShadow:
0px -@heartShadowWidth 0px @heartSelectedShadowColor,
-@heartShadowWidth 0px 0px @heartSelectedShadowColor,
0px @heartShadowWidth 0px @heartSelectedShadowColor,
@heartShadowWidth 0px 0px @heartSelectedShadowColor
;
/*------------------- /*-------------------
States States
--------------------*/ --------------------*/
@interactiveIconOpacity: 0.5;
@interactiveActiveIconOpacity: 1;
@interactiveSelectedIconOpacity: 1; @interactiveSelectedIconOpacity: 1;
/*------------------- /*-------------------
Variations Variations
--------------------*/ --------------------*/
@mini: 0.7rem;
@tiny: 0.8rem;
@small: 0.875rem;
@medium: 1rem;
@large: 1.1rem;
@big: 1.25rem;
@huge: 1.5rem;
@massive: 2rem;
@massive: 2rem;
Loading…
Cancel
Save