deemixer/src/styles/scss/_sidebar.scss
2020-06-19 20:57:05 +02:00

139 lines
2.3 KiB
SCSS

$sidebar-timing: 125ms;
$sidebar-delay: 75ms;
#sidebar {
display: flex;
flex-direction: column;
width: $sidebar-width;
height: 100%;
position: absolute;
top: 0;
left: 0;
background-color: var(--panels-background);
color: var(--panels-text);
transition: width $sidebar-timing ease-in-out $sidebar-delay;
z-index: 999;
&:hover {
width: 200px;
}
.main_tablinks {
transition: all 500ms;
&.active {
background-color: var(--accent-color);
}
&:not(#theme_selector) {
display: flex;
align-items: center;
height: 55px;
cursor: pointer;
&:hover {
background-color: var(--sidebar-link-bg);
.side_icon {
color: var(--accent-color);
}
}
}
}
.main_tablinks_text {
margin-left: 20px;
opacity: 0;
overflow: hidden;
white-space: nowrap;
transition: all 50ms ease-in-out 200ms;
}
.side_icon {
font-size: 30px;
padding: 9px;
transition: all 500ms;
&--theme {
cursor: default;
}
@include removeSelectionBackground;
}
&:hover {
.main_tablinks {
&:hover {
background: var(--sidebar-link-bg-20);
filter: grayscale(0) opacity(1);
}
&.active {
background: var(--sidebar-link-bg);
filter: grayscale(1);
// Fix for purple theme in which grayscale shows incoherent color
html[data-theme='purple'] & {
background: var(--sidebar-link-bg);
filter: grayscale(0);
}
&:hover {
background: var(--sidebar-link-bg-20);
filter: grayscale(0);
}
}
}
.main_tablinks_text {
opacity: 1;
}
#theme_togglers {
opacity: 1;
}
}
/* Theme selector */
#theme_selector {
margin-top: 20px;
display: flex;
height: 50px;
}
#theme_togglers {
position: relative;
display: flex;
justify-content: space-evenly;
align-items: center;
width: 100%;
opacity: 0;
transition: all $sidebar-timing ease-in-out $sidebar-delay;
}
.theme_toggler {
width: 25px;
height: 25px;
border-radius: 1000px;
border: 1px solid var(--separator);
cursor: pointer;
transition: border 200ms ease-in-out;
&--active {
border-width: 3px;
}
&[data-theme-variant='light'] {
background: white;
}
&[data-theme-variant='dark'] {
background: hsl(0, 0%, 8%);
}
&[data-theme-variant='purple'] {
background: hsl(261, 85%, 37%);
}
}
}