docusaurus/packages/docusaurus-theme-classic/src/theme/DocSidebar/styles.module.css
Alexey Pyltsyn ce06e10e24
fix(v2): animate dropdown properly (#3603)
* fix(v2): animate dropdown properly

* Simplify logic
2020-10-21 16:19:16 +02:00

104 lines
1.9 KiB
CSS

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
@media (min-width: 997px) {
.sidebar {
display: flex;
flex-direction: column;
height: 100vh;
overflow-y: auto;
position: sticky;
top: 0;
padding-top: var(--ifm-navbar-height);
}
.sidebarWithHideableNavbar {
padding-top: 0;
}
.sidebarLogo {
display: flex !important;
align-items: center;
margin: 0 var(--ifm-navbar-padding-horizontal);
min-height: var(--ifm-navbar-height);
max-height: var(--ifm-navbar-height);
color: inherit !important;
text-decoration: none !important;
}
.sidebarLogo img {
margin-right: 0.5rem;
height: 2rem;
}
.menu {
flex-grow: 1;
padding: 0.5rem;
}
.menu::-webkit-scrollbar {
width: 7px;
}
.menu::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 10px;
}
.menu::-webkit-scrollbar-thumb {
background: #888;
border-radius: 10px;
}
.menu::-webkit-scrollbar-thumb:hover {
background: #555;
}
.menuLinkText {
cursor: initial;
}
.menuLinkText:hover {
background: none;
}
.menuWithAnnouncementBar {
margin-bottom: var(--docusaurus-announcement-bar-height);
}
}
.sidebarLogo {
display: none;
}
.sidebarMenuIcon {
vertical-align: middle;
}
.sidebarMenuCloseIcon {
display: inline-flex;
justify-content: center;
align-items: center;
height: 24px;
font-size: 1.5rem;
font-weight: var(--ifm-font-weight-bold);
line-height: 0.9;
width: 24px;
}
/* TODO: Move to Infima */
:global(.menu__list) :global(.menu__list) {
overflow-y: hidden;
will-change: height;
/* Same as "arrow" transition */
transition: height var(--ifm-transition-fast) linear;
}
:global(.menu__list-item--collapsed) :global(.menu__list) {
height: 0px !important;
}