Skip to content

Commit

Permalink
Améliore l'affichage des +1/-1 (fix zestedesavoir#2303)
Browse files Browse the repository at this point in the history
  • Loading branch information
Situphen committed Feb 12, 2015
1 parent c490264 commit e242da7
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 60 deletions.
101 changes: 44 additions & 57 deletions assets/scss/components/_topic-message.scss
Original file line number Diff line number Diff line change
Expand Up @@ -291,28 +291,56 @@

&.upvote,
&.downvote {
&:after {
left: 10px;
}
&.voted:after {
opacity: 1;
}

&:hover,
&:focus {
&:not(.more-voted) {
border-bottom-color: transparent !important;
}
}
&:hover {
&.voted:after {
opacity: .5;
}
}

&:not(.has-vote) {
text-indent: -9999px;
width: 0;
}

&.more-voted {
font-weight: bold;
}
}
&.disabled {
&,
&:hover,
&:focus {
border-bottom-color: transparent;
&.upvote {
color: $color-success;

&:after {
opacity: .25 !important;
}
&.more-voted {
border-bottom-color: $color-success;
}
}
&.downvote {
color: $color-danger;

&.more-voted {
border-bottom-color: $color-danger;
}
}
}
span.upvote,
span.downvote {
&:not(.has-vote) {
border-bottom: none;
opacity: .5;
span {
&.upvote,
&.downvote {
&:not(.has-vote) {
border-bottom: none;
opacity: .5;
}
}
}

Expand All @@ -321,59 +349,18 @@
text-overflow: ellipsis;
white-space: nowrap;

&:hover:not(.disabled),
&:focus:not(.disabled) {
&:hover,
&:focus {
color: #555;
border-bottom-color: $color-success;
}
&.active:not(.disabled) {
&.active {
color: #48a200;

&:after {
opacity: 1;
}
}
}
.upvote,
.downvote {
&:after {
left: 10px;
}
}
.upvote {
color: $color-success;

&:hover:not(.disabled),
&:focus:not(.disabled),
&.more-voted {
border-bottom-color: $color-success;
}
&:not(.has-vote){
text-indent: -9999px;
width: 0;
}
}
.downvote {
color: $color-danger;

&:hover:not(.disabled),
&:focus:not(.disabled),
&.more-voted {
border-bottom-color: $color-danger;
}
}
.voted:after {
opacity: 1;
}
.more-voted {
font-weight: bold;
}
button.more-voted {
&:hover,
&:focus {
border-bottom-color: transparent !important;
}
}
}
}

Expand Down
4 changes: 1 addition & 3 deletions templates/misc/message.part.html
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,7 @@
</span>
</span>
{% endif %}
{% if upvote_link %}
</div>
{% endif %}
</div>
{% endif %}
</div>
{% endif %}
Expand Down

0 comments on commit e242da7

Please sign in to comment.