Correctly style uncolored tags in discussion hero

This commit is contained in:
Toby Zerner 2015-06-19 14:22:15 +09:30
parent 37c0b91614
commit b2d2bfa34e
2 changed files with 7 additions and 1 deletions

View File

@ -27,7 +27,8 @@ export default function() {
extend(DiscussionHero.prototype, 'view', function(view) {
var tags = sortTags(this.props.discussion.tags());
if (tags && tags.length) {
view.attrs.style = 'color: #fff; background-color: '+tags[0].color();
view.attrs.style = 'background-color: '+tags[0].color();
view.attrs.className += ' discussion-hero-colored';
}
});

View File

@ -34,6 +34,11 @@
}
}
}
.discussion-hero-colored {
&, & a {
color: #fff;
}
}
.tags-label {
.discussion-summary & {
margin-right: 10px;