Files
kalsport.pl/modules/welcome/scss/_tooltip.scss
2024-11-05 12:22:50 +01:00

150 lines
3.3 KiB
SCSS

.onboarding-tooltip {
@mixin addTriangle($size, $color) {
left: 100%;
top: 50%;
border: $size solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
border-left-color: $color;
margin-top: -$size;
}
@mixin addTriangleDown($size, $color) {
@include addTriangle($size, $color);
left: 50%;
top: 100%;
margin-top: 0;
transform: rotate(90deg);
}
@mixin addPreston($url, $width, $height, $offset) {
content: " ";
position: absolute;
top: 0.625rem;
width: $width;
height: $height;
background: url($url) no-repeat;
background-size: $width $height;
left: $offset;
z-index: 1;
}
font-family: Open Sans,sans-serif; // Forced because of old theme
font-size: 0.875rem; // Forced because of old theme
position: absolute;
box-sizing: border-box;
opacity: 1;
padding: 0.625rem 0.625rem 3.25rem 2.375rem;
width: 18.125rem;
min-height: 9.375rem;
z-index: $minimum-z-index + 2;
background: $background-color;
border-radius: $tooltip-radius;
border: $tooltip-border $primary-color;
&.-left {
margin-left: -0.75rem;
> .content {
&:before {
@include addPreston('../images/preston-right.png', 5.5rem, 9.5625rem, -3.8125rem);
}
}
&:after {
@include addTriangle(0.75rem, $background-color);
}
&:before {
@include addTriangle(0.75rem, $primary-color);
}
}
&.-right {
margin-left: 4.3125rerm;
> .content {
&:before {
@include addPreston('../images/preston-left.png', 6.5rem, 9.5625rem, -4.375rem);
}
}
}
&.-top {
margin-top: -2.6875rem;
margin-left: 2.8125rem;
> .content {
&:before {
@include addPreston('../images/preston-right.png', 6.5rem, 9.5625rem, -4.375rem);
}
}
&:after {
@include addTriangleDown(0.75rem, $dark-color);
}
&:before {
@include addTriangleDown(0.8125rem, $primary-color);
}
}
> .btn-primary {
text-transform: uppercase;
position: absolute;
bottom: 0.3125rem;
right: 0.3125rem;
padding: /* 0.1875rem */ 0 0.5rem;
background: $primary-color; // Forced because of old theme
color: white; // Forced because of old theme
font-size: 0.75rem; // Forced because of old theme
border-radius: 0.1875rem; // Forced because of old theme
border: none; // Forced because of old theme
vertical-align: middle; // Forced because of old theme
height: 1.5625rem; // Forced because of old theme
line-height: 1.5625rem; // Forced because of old theme
}
}
.onboarding-tooltipsteps {
position: absolute;
height: 2.5rem;
line-height: 2.5rem;
vertical-align: middle;
bottom: 0;
left: 0;
right: 0;
background: $dark-color;
padding-left: 3.125rem;
> .total {
color: $primary-color;
font-size: 0.625rem;
}
> .bulls {
text-align: center;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
> .bulls > .bull {
height: 0.375rem;
width: 0.375rem;
border-radius: 0.375rem;
background: $background-secondary-color;
display: inline-block;
margin: 0 1px 1px 1px;
}
> .bulls > .bull.-current {
background: $primary-color;
}
> .bulls > .bull.-done {
background: $dark-light-color;
}
}