164 lines
3.2 KiB
SCSS
164 lines
3.2 KiB
SCSS
// ---------------------------------------------------------
|
|
// -- VOTE CHOICE COMPONENT
|
|
// ---------------------------------------------------------
|
|
|
|
// -- IMPORTS
|
|
// ----------------------------
|
|
|
|
@import "../../assets/scss/variables";
|
|
|
|
|
|
|
|
// -- VARIABLES
|
|
// ----------------------------
|
|
|
|
$box-padding: 2rem;
|
|
$box-border-width: .6rem;
|
|
$btn-size: 5rem;
|
|
$btn-margin-x: 1rem;
|
|
$btn-margin-y: 1.5rem;
|
|
$btn-wrap-size: calc(2 * #{$btn-size} + 4 * #{$btn-margin-x});
|
|
$breakpoint-responsive: 640px; // à définir
|
|
|
|
|
|
|
|
// -- GLOBAL
|
|
// ----------------------------
|
|
|
|
.choicebox {
|
|
position: relative;
|
|
min-width: 32rem;
|
|
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 .3rem .6rem 0 rgba($black, .2);
|
|
&--active {
|
|
padding-left: $box-padding;
|
|
border-left-color: $primary_color;
|
|
}
|
|
|
|
@media (min-width: $breakpoint-responsive) {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// -- DATE
|
|
// ----------------------------
|
|
|
|
.choicebox__time {
|
|
margin-bottom: 3rem;
|
|
padding-right: $btn-wrap-size;
|
|
font-size: 1.8rem;
|
|
|
|
@media (min-width: $breakpoint-responsive) {
|
|
margin-bottom: 0;
|
|
padding-right: 0;
|
|
}
|
|
}
|
|
|
|
.choicebox__date {
|
|
margin-bottom: .5rem;
|
|
white-space: nowrap;
|
|
text-transform: capitalize;
|
|
|
|
@media (min-width: $breakpoint-responsive) {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
|
|
.choicebox__day {
|
|
font-size: 2.4rem;
|
|
font-weight: bold;
|
|
}
|
|
|
|
|
|
|
|
// -- VOTE BTNS
|
|
// ----------------------------
|
|
|
|
.choicebox__actions {
|
|
position: absolute;
|
|
display: flex;
|
|
max-width: $btn-wrap-size;
|
|
top: 50%;
|
|
right: $box-padding;
|
|
flex-flow: row-reverse wrap;
|
|
transform: translateY(-50%);
|
|
|
|
@media (min-width: $breakpoint-responsive) {
|
|
position: static;
|
|
max-width: none;
|
|
flex-flow: row nowrap;
|
|
transform: none;
|
|
}
|
|
}
|
|
|
|
.choicebox__btn {
|
|
display: flex;
|
|
width: $btn-size;
|
|
height: $btn-size;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin: $btn-margin-y $btn-margin-x;
|
|
border: .1rem solid $primary_color;
|
|
border-radius: 50%;
|
|
|
|
@media (min-width: $breakpoint-responsive) {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
&:focus,
|
|
&:hover,
|
|
&:active {
|
|
border-color: #ccc9c9;
|
|
background-color: #f7f7f7;
|
|
}
|
|
|
|
&--maybe {
|
|
position: relative;
|
|
top: calc( (#{$btn-size} + 2 * #{$btn-margin-y}) / 2 );
|
|
@media (min-width: $breakpoint-responsive) {
|
|
top: auto;
|
|
left: auto;
|
|
}
|
|
}
|
|
|
|
&--active {
|
|
border-width: .3rem;
|
|
border-color: #bf83c2;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// -- VOTE COUNT
|
|
// ----------------------------
|
|
|
|
.choicebox__count {
|
|
padding-right: $btn-wrap-size;
|
|
|
|
@media (min-width: $breakpoint-responsive) {
|
|
padding-right: 0;
|
|
}
|
|
}
|
|
|
|
.choicebox__vote {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
margin-right: 3rem;
|
|
}
|
|
|
|
.choicebox__countxt {
|
|
display: none;
|
|
margin-top: .5rem;
|
|
color: $primary_color;
|
|
.choicebox--active & {
|
|
display: block;
|
|
}
|
|
} |