discourse/plugins/poll/assets/stylesheets/common/poll.scss

147 lines
2.6 KiB
SCSS
Raw Normal View History

2015-05-04 16:29:45 -04:00
$border-color: rgb(219,219,219);
$text-color: #9E9E9E;
2016-07-19 01:01:54 -04:00
$option-foreground: dark-light-diff($primary, $secondary, 0%, -100%);
2015-05-04 16:29:45 -04:00
$option-background: dark-light-diff($primary, $secondary, 90%, -65%);
$option-background-selected: #dbffdb;
2015-05-04 16:29:45 -04:00
$option-shadow: dark-light-diff($option-background, $primary, 10%, -10%);
div.poll {
margin: 10px 0px;
2015-05-08 05:13:32 -04:00
border: 1px solid $border-color;
2015-07-31 06:42:19 -04:00
@include unselectable;
ul, ol {
margin: 0;
padding: 0;
list-style: none;
display: inline-block;
2015-05-04 16:29:45 -04:00
width: 100%;
}
li {
cursor: pointer;
font-size: 15px;
margin-bottom: 10px;
}
li[data-poll-option-id] {
2015-05-04 16:29:45 -04:00
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;
2015-05-04 16:29:45 -04:00
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;
}
}
2015-05-04 16:29:45 -04:00
.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 {
2015-05-04 16:29:45 -04:00
vertical-align: middle;
padding: 10px;
2016-06-09 09:33:17 -04:00
.poll-results-number-rating {
2015-05-04 16:29:45 -04:00
font-size: 2em;
}
}
.poll-buttons {
2015-05-05 14:14:38 -04:00
button {
float: none;
}
}
2016-06-07 06:55:01 -04:00
.poll-voters-list {
li {
display: inline;
}
2016-06-09 09:33:17 -04:00
margin-top: 10px;
2016-06-07 06:55:01 -04:00
}
.poll-voters-toggle-expand {
2016-06-09 09:33:17 -04:00
width: 100%;
2016-06-07 06:55:01 -04:00
text-align: center;
}
.results {
.option {
padding-bottom: 5px;
p {
margin: 0;
}
}
.percentage {
2016-06-21 20:01:23 -04:00
font-size: 20px;
float: right;
2015-05-04 16:29:45 -04:00
color: $text-color;
2016-06-21 20:01:23 -04:00
margin-left: 5px;
}
.bar-back {
2015-05-04 16:29:45 -04:00
background: $border-color;
}
.bar {
height: 10px;
2015-05-04 16:29:45 -04:00
background: $option-foreground;
}
}
&[data-poll-type="number"] {
2016-06-07 06:55:01 -04:00
li[data-poll-option-id] {
display: inline-block;
2016-06-07 06:55:01 -04:00
text-align: center;
width: 25px;
margin-right: 5px;
}
}
}