mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-21 20:17:50 +02:00
chore(v2): upgrade Infima to v0.2.0-alpha.15 (#3712)
* Move custom scrollbar styles to separate class * chore(v2): upgrade Infima to v0.2.0-alpha.15
This commit is contained in:
parent
f006c6e4ec
commit
46dba2f3c6
8 changed files with 22 additions and 68 deletions
|
@ -32,7 +32,7 @@
|
|||
"@types/react-toggle": "^4.0.2",
|
||||
"clsx": "^1.1.1",
|
||||
"copy-text-to-clipboard": "^2.2.0",
|
||||
"infima": "0.2.0-alpha.14",
|
||||
"infima": "0.2.0-alpha.15",
|
||||
"lodash": "^4.17.19",
|
||||
"parse-numeric-range": "^0.0.2",
|
||||
"prism-react-renderer": "^1.1.0",
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import clsx from 'clsx';
|
||||
import Link from '@docusaurus/Link';
|
||||
import type {Props} from '@theme/BlogSidebar';
|
||||
import styles from './styles.module.css';
|
||||
|
@ -15,7 +16,7 @@ export default function BlogSidebar({sidebar}: Props) {
|
|||
return null;
|
||||
}
|
||||
return (
|
||||
<div className={styles.sidebar}>
|
||||
<div className={clsx(styles.sidebar, 'thin-scrollbar')}>
|
||||
<h3 className={styles.sidebarItemTitle}>{sidebar.title}</h3>
|
||||
<ul className={styles.sidebarItemList}>
|
||||
{sidebar.items.map((item) => {
|
||||
|
|
|
@ -13,31 +13,13 @@
|
|||
top: calc(var(--ifm-navbar-height) + 2rem);
|
||||
}
|
||||
|
||||
.sidebar::-webkit-scrollbar {
|
||||
width: 7px;
|
||||
}
|
||||
|
||||
.sidebar::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.sidebar::-webkit-scrollbar-thumb {
|
||||
background: #888;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.sidebar::-webkit-scrollbar-thumb:hover {
|
||||
background: #555;
|
||||
}
|
||||
|
||||
.sidebarItemTitle {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.sidebarItemList {
|
||||
overflow-y: auto;
|
||||
font-size: .9rem;
|
||||
font-size: 0.9rem;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -230,11 +230,17 @@ function DocSidebar({
|
|||
</Link>
|
||||
)}
|
||||
<div
|
||||
className={clsx('menu', 'menu--responsive', styles.menu, {
|
||||
'menu--show': showResponsiveSidebar,
|
||||
[styles.menuWithAnnouncementBar]:
|
||||
!isAnnouncementBarClosed && scrollY === 0,
|
||||
})}>
|
||||
className={clsx(
|
||||
'menu',
|
||||
'menu--responsive',
|
||||
'thin-scrollbar',
|
||||
styles.menu,
|
||||
{
|
||||
'menu--show': showResponsiveSidebar,
|
||||
[styles.menuWithAnnouncementBar]:
|
||||
!isAnnouncementBarClosed && scrollY === 0,
|
||||
},
|
||||
)}>
|
||||
<button
|
||||
aria-label={showResponsiveSidebar ? 'Close Menu' : 'Open Menu'}
|
||||
aria-haspopup="true"
|
||||
|
|
|
@ -52,24 +52,6 @@
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,9 @@ function Headings({headings, isChild}: TOCProps & {isChild?: boolean}) {
|
|||
return (
|
||||
<ul
|
||||
className={
|
||||
isChild ? '' : 'table-of-contents table-of-contents__left-border'
|
||||
isChild
|
||||
? ''
|
||||
: 'table-of-contents table-of-contents__left-border thin-scrollbar'
|
||||
}>
|
||||
{headings.map((heading) => (
|
||||
<li key={heading.id}>
|
||||
|
|
|
@ -13,24 +13,6 @@
|
|||
top: calc(var(--ifm-navbar-height) + 2rem);
|
||||
}
|
||||
|
||||
.tableOfContents::-webkit-scrollbar {
|
||||
width: 7px;
|
||||
}
|
||||
|
||||
.tableOfContents::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.tableOfContents::-webkit-scrollbar-thumb {
|
||||
background: #888;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.tableOfContents::-webkit-scrollbar-thumb:hover {
|
||||
background: #555;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 996px) {
|
||||
.tableOfContents {
|
||||
display: none;
|
||||
|
@ -40,4 +22,3 @@
|
|||
padding: 0 0.3rem;
|
||||
}
|
||||
}
|
||||
|
|
@ -11642,10 +11642,10 @@ infer-owner@^1.0.3, infer-owner@^1.0.4:
|
|||
resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467"
|
||||
integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==
|
||||
|
||||
infima@0.2.0-alpha.14:
|
||||
version "0.2.0-alpha.14"
|
||||
resolved "https://registry.yarnpkg.com/infima/-/infima-0.2.0-alpha.14.tgz#e7c79a12feedfb41626b89c77357a58a872c6d15"
|
||||
integrity sha512-RMyVw0HAKAMoG78cRW2/sbD79MgCX19VfpTnchG1JaqYkIb+IQHo5P7/ZvJ1U/DPiLkY3bkkhJHqfzCz4ftTJQ==
|
||||
infima@0.2.0-alpha.15:
|
||||
version "0.2.0-alpha.15"
|
||||
resolved "https://registry.yarnpkg.com/infima/-/infima-0.2.0-alpha.15.tgz#034c91c3cfcededf57df97644793b7e21ec695d9"
|
||||
integrity sha512-RQjMa//BOuKN3kRoQeNWKhlriaxTiqNFCUCbRP3lw65qTpETDIdRCwDNLxrHHCls0rbgCvOc5LD1UG7JITRemg==
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue