64 lines
1.5 KiB
SCSS
64 lines
1.5 KiB
SCSS
@use '../../partials/dir';
|
|
|
|
.sidebar-avatar {
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
|
|
& .notification-badge {
|
|
position: absolute;
|
|
@include dir.prop(left, unset, 0);
|
|
@include dir.prop(right, 0, unset);
|
|
top: 0;
|
|
box-shadow: 0 0 0 2px var(--bg-surface-low);
|
|
@include dir.prop(transform, translate(20%, -20%), translate(-20%, -20%));
|
|
|
|
margin: 0 !important;
|
|
}
|
|
& .avatar-container,
|
|
& .notification-badge {
|
|
transition: transform 200ms var(--fluid-push);
|
|
}
|
|
&:hover .avatar-container {
|
|
@include dir.prop(transform, translateX(4px), translateX(-4px));
|
|
}
|
|
&:hover .notification-badge {
|
|
--ltr: translate(calc(20% + 4px), -20%);
|
|
--rtl: translate(calc(-20% - 4px), -20%);
|
|
@include dir.prop(transform, var(--ltr), var(--rtl));
|
|
}
|
|
&:focus {
|
|
outline: none;
|
|
}
|
|
&:active .avatar-container {
|
|
box-shadow: var(--bs-surface-outline);
|
|
}
|
|
|
|
&:hover::before,
|
|
&:focus::before,
|
|
&--active::before {
|
|
content: "";
|
|
display: block;
|
|
position: absolute;
|
|
@include dir.prop(left, -11px, unset);
|
|
@include dir.prop(right, unset, -11px);
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
|
|
width: 3px;
|
|
height: 12px;
|
|
background-color: var(--tc-surface-high);
|
|
@include dir.prop(border-radius, 0 4px 4px 0, 4px 0 0 4px);
|
|
transition: height 200ms linear;
|
|
}
|
|
&--active:hover::before,
|
|
&--active:focus::before,
|
|
&--active::before {
|
|
height: 28px;
|
|
}
|
|
&--active .avatar-container {
|
|
background-color: var(--bg-surface);
|
|
}
|
|
} |