-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from actionanand/features/2-reactive-form
extra css for readin purpose
- Loading branch information
Showing
3 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/app/control-value-accessor/rating/rating.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.stars { | ||
cursor: pointer; | ||
} | ||
|
||
/* When a user hovers over the .stars container, this rule changes the fill color of all polygon elements inside .star elements to yellow (#ffd055) */ | ||
/* It means all stars will be yellow when user hovers */ | ||
.stars:hover .star polygon { | ||
fill: #ffd055 !important; | ||
} | ||
|
||
.stars.disabled:hover { | ||
cursor: not-allowed; | ||
} | ||
|
||
.stars.disabled:hover .star polygon { | ||
fill: #d8d8d8 !important; | ||
} | ||
|
||
.stars .star { | ||
float: left; | ||
margin: 0px 5px; | ||
} | ||
|
||
.stars .star polygon { | ||
fill: #d8d8d8; | ||
} | ||
|
||
/* ~ .star: This is the general sibling combinator. It selects all .star elements that are siblings of the hovered .star and come after it in the DOM. */ | ||
/* When a user hovers over a .star element within the .stars container, this rule changes the fill color of all subsequent sibling .star elements' polygon elements to light gray (#d8d8d8). */ | ||
/* Consider a star rating component with 5 stars. When you hover over the second star, The last 3 stars (third, fourth, and fifth) will change to light gray. */ | ||
|
||
.stars .star:hover ~ .star polygon { | ||
fill: #d8d8d8 !important; | ||
} | ||
|
||
.stars .star.selected polygon { | ||
fill: #ffd055 !important; | ||
} |
37 changes: 37 additions & 0 deletions
37
src/app/control-value-accessor/rating/rating.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.stars { | ||
cursor: pointer; | ||
|
||
&:hover { | ||
.star polygon { | ||
fill: #ffd055 !important; | ||
} | ||
} | ||
&.disabled:hover { | ||
cursor: not-allowed; | ||
.star { | ||
polygon { | ||
fill: #d8d8d8 !important; | ||
} | ||
} | ||
} | ||
|
||
.star { | ||
float: left; | ||
margin: 0px 5px; | ||
|
||
polygon { | ||
fill: #d8d8d8; | ||
} | ||
|
||
&:hover ~ .star { | ||
polygon { | ||
fill: #d8d8d8 !important; | ||
} | ||
} | ||
&.selected { | ||
polygon { | ||
fill: #ffd055 !important; | ||
} | ||
} | ||
} | ||
} |