vhAstro-Theme/src/styles/components/MobileSidebar.less
2025-02-18 09:48:55 +08:00

106 lines
2.1 KiB
Plaintext

.vh-mobilesidebar {
position: fixed;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
box-sizing: border-box;
background-color: rgba(0, 0, 0, 0.26);
overflow: hidden;
transition: opacity 0.16s ease-in-out, z-index 0.16s ease-in-out;
opacity: 0;
pointer-events: none;
z-index: 10;
&.active {
opacity: 1;
pointer-events: auto;
&>.main {
transform: translateX(0);
&>.vh-mobilesidebar-list {
&>a {
transform: translateX(0);
}
}
}
}
&>.main {
box-sizing: border-box;
padding: 1rem;
display: flex;
align-items: center;
flex-direction: column;
gap: 1rem;
width: 100%;
max-width: 17.6rem;
height: 100%;
background-color: #fff;
transform: translateX(-1rem);
transition: transform 0.16s ease-in;
overflow: hidden;
&>.vh-mobilesidebar-list {
box-sizing: border-box;
padding: 1rem 0.618rem;
display: flex;
flex-direction: column;
gap: 0.26rem;
width: 100%;
height: max-content;
border-radius: 0.75rem;
background: #F8F9FA;
overflow: hidden;
&.user-panel {
&>h3 {
text-align: center;
}
}
&>a {
box-sizing: border-box;
padding: 0 0.5rem;
display: flex;
align-items: center;
gap: 0.618rem;
width: 100%;
height: 2.25rem;
font-size: 1rem;
color: #66758c;
font-weight: 600;
border-radius: 0.375rem;
transform: translateX(-1rem);
overflow: hidden;
transition: all 0.36s ease-in-out;
&:nth-of-type(1) {
transition: all 0.26s ease-in-out;
}
&:nth-of-type(2) {
transition: all 0.3s ease-in-out;
}
&:hover,
&.active {
color: #fff;
background: #3366FF;
&>object {
filter: brightness(0) invert(100%);
}
}
&>object {
width: 0.875rem;
height: 0.875rem;
transition: filter 0.16s ease-in-out;
}
}
}
}
}