Skip to content

Commit

Permalink
#96 :rage1::rage3::rage4::goberserk:🔫 I hate CSS - player Stats custom checkboxes implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmcfad committed Jun 19, 2015
1 parent 038b025 commit 48226f6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
Binary file added client/public/assets/img/checkbox-check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/public/assets/img/checkbox-uncheck.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions client/public/views/partials/playerStats.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,8 @@ <h2>All Player Stats</h2>
<td class="rank">{{player.rank}}</td>
<td class="compare-check">
<div class="checkbox-container">
<label for="checkbox-{{$index}}" class="checkbox-label">
<input value="{{player.id}}" name="checkbox-{{$index}}" id="checkbox-{{$index}}"type="checkbox" ng-model="player.selected" ng-click="addPlayerToCompare(player.id)"/>
</label>
<input value="{{player.id}}" name="checkbox-{{$index}}" id="checkbox-{{$index}}"type="checkbox" ng-model="player.selected" ng-click="addPlayerToCompare(player.id)"/>
<label for="checkbox-{{$index}}" class="checkbox-label"></label>
</div>
</td>
</tr>
Expand Down
21 changes: 16 additions & 5 deletions client/stylus/playerStats.styl
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,26 @@
vertical-align middle

.checkbox-container
position relative
label
display block
width 100%
height 100%
position relative
input
position absolute
bottom 50%
right 40%
cursor pointer
input[type="checkbox"]
position absolute
opacity 0
top 0
left 0
input[type="checkbox"] + label
background url("/assets/img/checkbox-uncheck.png") no-repeat
background-position-x 66px
background-position-y 18px

input[type="checkbox"]:checked + label
background url("/assets/img/checkbox-check.png") no-repeat
background-position-x 66px
background-position-y 18px

.profile-img-name
img
Expand Down

0 comments on commit 48226f6

Please sign in to comment.