element-plus/docs/.vitepress/vitepress/styles/sidebar.scss
2022-04-05 09:20:54 +08:00

58 lines
1.2 KiB
SCSS

@use './mixins' as *;
// @use './sidebar-link.scss';
.sidebar {
position: fixed;
top: 0;
bottom: 0;
left: 0;
z-index: var(--sidebar-z-index);
width: var(--sidebar-width-xs);
background-color: var(--bg-color);
padding: 47px 32px 0;
overflow-y: auto;
transform: translate(-100%);
transition: background-color 0.5s, opacity 0.25s,
transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
&.open {
transform: translate(0);
}
.sidebar-groups {
padding: 0 0 5rem;
.sidebar-group__title {
font-size: 1rem;
font-weight: 700;
margin-bottom: 8px;
line-height: 24px;
}
.sidebar-group + .sidebar-group {
padding-top: 24px;
}
}
@include respond-to('md') {
width: var(--sidebar-width-sm);
}
@include respond-to('md') {
width: var(--vp-sidebar-width-small);
}
@include respond-to('lg') {
top: var(--header-height);
transform: translate(0);
width: var(--vp-sidebar-width-small);
}
@include respond-to('xxl') {
padding: 47px 32px 96px calc((100% - var(--vp-screen-max-width)) / 2);
width: calc(
(100% - var(--vp-screen-max-width)) / 2 + var(--vp-sidebar-width-small)
);
}
}