2020-02-04 14:28:43 +01:00
|
|
|
// ---------------------------------------------------------
|
|
|
|
// -- VOTE CHOICE COMPONENT
|
|
|
|
// ---------------------------------------------------------
|
|
|
|
|
|
|
|
// -- IMPORTS
|
|
|
|
// ----------------------------
|
|
|
|
|
2021-04-29 10:41:47 +02:00
|
|
|
@import '../../../../../src/styles/variables';
|
2020-02-04 14:28:43 +01:00
|
|
|
|
|
|
|
// -- VARIABLES
|
|
|
|
// ----------------------------
|
|
|
|
|
|
|
|
$box-padding: 2rem;
|
2020-04-14 11:28:33 +02:00
|
|
|
$box-border-width: 0.6rem;
|
2020-02-04 14:28:43 +01:00
|
|
|
$btn-size: 5rem;
|
|
|
|
$btn-margin-x: 1rem;
|
|
|
|
$btn-margin-y: 1.5rem;
|
|
|
|
$btn-wrap-size: calc(2 * #{$btn-size} + 4 * #{$btn-margin-x});
|
|
|
|
$img-maxheight: 12rem;
|
|
|
|
$breakpoint-responsive: 640px; // à définir
|
|
|
|
|
|
|
|
// -- GLOBAL
|
|
|
|
// ----------------------------
|
|
|
|
|
|
|
|
.choicebox {
|
2020-04-21 10:50:26 +02:00
|
|
|
position: relative;
|
|
|
|
min-height: 10rem;
|
|
|
|
display: block;
|
|
|
|
padding: $box-padding $box-padding $box-padding calc(#{$box-padding} - #{$box-border-width});
|
|
|
|
border-left: $box-border-width solid transparent;
|
|
|
|
background-color: $white;
|
|
|
|
box-shadow: 0 0 0.6rem 0 rgba($black, 0.2);
|
|
|
|
|
|
|
|
&--active {
|
|
|
|
padding-left: $box-padding;
|
|
|
|
border-left-color: $primary_color;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.selection-yes {
|
|
|
|
font-weight: 700;
|
|
|
|
background: #e9bdeb;
|
|
|
|
}
|
2020-02-04 14:28:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.choicebox__subject {
|
2020-04-21 10:50:26 +02:00
|
|
|
margin-bottom: 3rem;
|
|
|
|
padding-right: $btn-wrap-size;
|
|
|
|
@media (min-width: $breakpoint-responsive) {
|
|
|
|
margin-bottom: 0;
|
|
|
|
padding-right: 0;
|
|
|
|
}
|
2020-02-04 14:28:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// -- DATE
|
|
|
|
// ----------------------------
|
|
|
|
|
|
|
|
.choicebox__date {
|
2020-04-21 10:50:26 +02:00
|
|
|
font-size: 1.8rem;
|
|
|
|
margin-bottom: 0.5rem;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-transform: capitalize;
|
|
|
|
|
|
|
|
@media (min-width: $breakpoint-responsive) {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
2020-02-04 14:28:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.choicebox__day {
|
2020-04-21 10:50:26 +02:00
|
|
|
font-size: 2.4rem;
|
|
|
|
font-weight: bold;
|
2020-02-04 14:28:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// -- IMG
|
|
|
|
// ----------------------------
|
|
|
|
|
|
|
|
.choicebox__img {
|
2020-04-21 10:50:26 +02:00
|
|
|
max-width: 100%;
|
|
|
|
max-height: $img-maxheight;
|
2020-02-04 14:28:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// -- TXT
|
|
|
|
// ----------------------------
|
|
|
|
|
|
|
|
.choicebox__txt {
|
2020-04-21 10:50:26 +02:00
|
|
|
margin: 0;
|
|
|
|
font-size: 1.8rem;
|
|
|
|
min-width: 10em;
|
2020-02-04 14:28:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// -- VOTE BTNS
|
|
|
|
// ----------------------------
|
|
|
|
|
|
|
|
.choicebox__actions {
|
2020-04-21 10:50:26 +02:00
|
|
|
position: absolute;
|
|
|
|
z-index: 1;
|
|
|
|
|
|
|
|
max-width: $btn-wrap-size;
|
|
|
|
top: 50%;
|
|
|
|
right: $box-padding;
|
|
|
|
|
|
|
|
@media (min-width: $breakpoint-responsive) {
|
|
|
|
position: static;
|
|
|
|
max-width: none;
|
|
|
|
transform: none;
|
|
|
|
margin: 0 1.5rem;
|
|
|
|
}
|
2020-02-04 14:28:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.choicebox__btn {
|
2020-04-21 10:50:26 +02:00
|
|
|
width: $btn-size;
|
|
|
|
height: $btn-size;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
margin: $btn-margin-y $btn-margin-x;
|
|
|
|
border: 0.3rem solid #ccc9c9;
|
|
|
|
background-color: transparent;
|
|
|
|
border-radius: 50%;
|
|
|
|
cursor: pointer;
|
|
|
|
float: left;
|
|
|
|
|
|
|
|
&--maybe {
|
|
|
|
position: relative;
|
|
|
|
top: calc((#{$btn-size} + 2 * #{$btn-margin-y}) / 2);
|
|
|
|
@media (min-width: $breakpoint-responsive) {
|
|
|
|
top: auto;
|
|
|
|
left: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&:focus,
|
|
|
|
&:active {
|
|
|
|
border-color: #bf83c2;
|
|
|
|
color: #bf83c2;
|
|
|
|
background: #000;
|
|
|
|
}
|
|
|
|
&--active {
|
|
|
|
border-color: #bf83c2;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (min-width: $breakpoint-responsive) {
|
|
|
|
margin-top: 0;
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
2020-02-04 14:28:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// -- VOTE COUNT
|
|
|
|
// ----------------------------
|
|
|
|
|
|
|
|
.choicebox__count {
|
2020-04-21 10:50:26 +02:00
|
|
|
position: relative;
|
|
|
|
padding-right: $btn-wrap-size;
|
|
|
|
@media (min-width: $breakpoint-responsive) {
|
|
|
|
text-align: right;
|
|
|
|
padding-right: 0;
|
|
|
|
}
|
2020-02-04 14:28:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.choicebox__votes {
|
2020-04-21 10:50:26 +02:00
|
|
|
border: 0;
|
|
|
|
padding: 0;
|
|
|
|
line-height: normal;
|
|
|
|
background-color: transparent;
|
|
|
|
@media (min-width: $breakpoint-responsive) {
|
|
|
|
padding: 1.5rem;
|
|
|
|
}
|
2020-02-04 14:28:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.choicebox__vote {
|
2020-04-21 10:50:26 +02:00
|
|
|
display: inline-block;
|
|
|
|
vertical-align: middle;
|
2020-02-04 14:28:43 +01:00
|
|
|
|
2020-04-21 10:50:26 +02:00
|
|
|
& + .choicebox__vote {
|
|
|
|
margin-left: 1.5rem;
|
|
|
|
}
|
2020-02-04 14:28:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.choicebox__countxt {
|
2020-04-21 10:50:26 +02:00
|
|
|
display: none;
|
|
|
|
margin-top: 0.5rem;
|
|
|
|
|
|
|
|
.choicebox--active & {
|
|
|
|
display: block;
|
|
|
|
@media (min-width: $breakpoint-responsive) {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
2020-02-04 14:28:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// -- TOOLTIP
|
|
|
|
// ----------------------------
|
|
|
|
|
|
|
|
.choicebox__tooltip {
|
2020-04-21 10:50:26 +02:00
|
|
|
display: none;
|
|
|
|
@media (min-width: $breakpoint-responsive) {
|
|
|
|
position: absolute;
|
|
|
|
min-width: 18rem;
|
|
|
|
font-weight: normal;
|
|
|
|
top: 5rem;
|
|
|
|
left: 50%;
|
|
|
|
z-index: 1;
|
|
|
|
padding: 2rem;
|
|
|
|
border: 0.1rem solid rgba($black, 0.1);
|
|
|
|
background-color: $white;
|
|
|
|
text-align: left;
|
|
|
|
transform: translateX(-50%);
|
|
|
|
&::after,
|
|
|
|
&::before {
|
|
|
|
position: absolute;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
bottom: 100%;
|
|
|
|
left: 50%;
|
|
|
|
content: ' ';
|
|
|
|
pointer-events: none;
|
|
|
|
border: solid transparent;
|
|
|
|
}
|
|
|
|
&::after {
|
|
|
|
margin-left: -1.5rem;
|
|
|
|
border-width: 1.5rem;
|
|
|
|
border-color: rgba($white, 0);
|
|
|
|
border-bottom-color: #fff;
|
|
|
|
}
|
|
|
|
&::before {
|
|
|
|
margin-left: -1.6rem;
|
|
|
|
border-width: 1.6rem;
|
|
|
|
border-color: rgba($black, 0);
|
|
|
|
border-bottom-color: rgba($black, 0.1);
|
|
|
|
}
|
|
|
|
ul {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
}
|
2020-02-04 14:28:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.choicebox__tooltiplist {
|
2020-04-21 10:50:26 +02:00
|
|
|
& + .choicebox__tooltiplist {
|
|
|
|
padding-left: 3rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
ul {
|
|
|
|
max-height: 11rem;
|
|
|
|
overflow: auto;
|
|
|
|
}
|
2020-02-04 14:28:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.choicebox__tooltipttl {
|
2020-04-21 10:50:26 +02:00
|
|
|
@media (min-width: $breakpoint-responsive) {
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
font-size: 1.6rem;
|
|
|
|
font-weight: bold;
|
|
|
|
white-space: nowrap;
|
|
|
|
img {
|
|
|
|
margin-right: 0.5rem;
|
|
|
|
vertical-align: sub;
|
|
|
|
}
|
|
|
|
& ~ .choicebox__tooltipttl {
|
|
|
|
margin-top: 3rem;
|
|
|
|
}
|
|
|
|
}
|
2020-02-04 14:28:43 +01:00
|
|
|
}
|