Skip to content
This repository has been archived by the owner on Feb 19, 2018. It is now read-only.

Commit

Permalink
Layout and style fixes
Browse files Browse the repository at this point in the history
- Added some poor man's responsiveness
- Better display of vote choices
  • Loading branch information
Michael Schuller committed Jul 18, 2017
1 parent 53b874c commit 363a46a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/QuestionDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class ChoiceInfo extends Component {
{this.state.text}
</span>
<span className="choice-votes">
{this.state.currentVotes}
{this.state.currentVotes} vote{this.state.currentVotes == 1 ? "" : "s"}
</span>
<span className="choice-percent">
{Math.round(this.state.currentVotes / this.state.totalVotes * 100)}%
Expand Down
6 changes: 6 additions & 0 deletions src/QuestionDetail.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,22 @@
display: inline-block;
width: 30%;
min-width: 200px;
font-weight: bold;
}
.choice-votes,
.choice-percent {
display: inline-block;
width: 10%;
min-width: 100px;
color: #AAA;
}

&.selected {
background-color: #AAF;
.choice-votes,
.choice-percent {
color: white;
}
}

}
Expand Down
14 changes: 12 additions & 2 deletions src/QuestionsList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@

.QuestionInfo {

width: 350px;
min-width: 250px;
max-width: 40%;
width: 100%;
float: left;

padding: 15px;
margin: 0 15px 15px 0;
float: left;
border: 1px solid #AAA;
border-radius: 5px;

Expand All @@ -30,4 +33,11 @@
}
}

// clearfix
&:after {
content: "";
display: block;
clear: both,
}

}

0 comments on commit 363a46a

Please sign in to comment.