discourse/plugins/poll/assets/stylesheets/common/poll.scss
2016-06-08 16:19:13 +08:00

144 lines
2.5 KiB
SCSS

$border-color: rgb(219,219,219);
$text-color: #9E9E9E;
$option-foreground: $primary;
$option-background: dark-light-diff($primary, $secondary, 90%, -65%);
$option-background-selected: #dbffdb;
$option-shadow: dark-light-diff($option-background, $primary, 10%, -10%);
div.poll {
border: 1px solid $border-color;
@include unselectable;
ul, ol {
margin: 0;
padding: 0;
list-style: none;
display: inline-block;
width: 100%;
}
li {
cursor: pointer;
font-size: 15px;
margin-bottom: 10px;
}
li[data-poll-option-id] {
color: $option-foreground;
background: $option-background;
box-shadow: inset 0 -6px rgba(0,0,0,.25), inset 0 0 0 100px rgba(0,0,0,0);
padding: .5em .7em .7em .5em;
border-radius: 4px;
&:hover {
box-shadow: inset 0 -6px rgba(0,0,0,.35), inset 0 0 0 100px rgba(0,0,0,.1);
}
&:active {
-webkit-transform: translate(0,2px);
transform: translate(0,2px);
box-shadow: inset 0 -4px rgba(0,0,0,.35), inset 0 0 0 100px rgba(0,0,0,.1);
}
&[data-poll-selected="selected"] {
background: $option-background-selected !important;
}
}
.button {
display: inline-block;
padding: 6px 12px;
margin-right: 5px;
text-align: center;
cursor: pointer;
color: $primary;
background: dark-light-diff($primary, $secondary, 90%, -65%);
&:hover {
background: dark-light-diff($primary, $secondary, 65%, -75%);
color: #fff;
}
}
.poll-info {
color: $text-color;
text-align: center;
vertical-align: middle;
.info-number {
font-size: 3.5em;
}
.info-text {
font-size: 1.7em;
}
}
.poll-container {
vertical-align: middle;
padding: 10px;
& > span {
font-size: 2em;
}
}
.poll-buttons {
button {
float: none;
}
}
.poll-voters-list {
li {
display: inline;
}
margin: 5px 0;
}
.poll-voters-toggle-expand {
text-align: center;
}
.results {
.option {
padding-bottom: 5px;
p {
margin: 0;
}
}
.percentage {
font-size: 25px;
float: right;
color: $text-color;
}
.bar-back {
background: $border-color;
}
.bar {
height: 10px;
background: $option-foreground;
}
}
&[data-poll-type="number"] {
li[data-poll-option-id] {
display: inline-block;
text-align: center;
width: 25px;
margin-right: 5px;
}
}
}