Merge pull request #1190 from slumbering/fix/docs-iframe

[Docs] fix iframe width + bump docusaurus to the latest version
This commit is contained in:
Sam Alba
2021-12-09 13:33:51 -08:00
committed by GitHub
8 changed files with 2337 additions and 3154 deletions

View File

@@ -241,8 +241,8 @@ h1[class^="h1Heading"] {
}
/* navbar */
.navbar__brand {
height: 3rem;
.navbar__brand .navbar__logo {
height: 5rem;
@include desktop {
height: var(--ifm-navbar-height);
}
@@ -268,12 +268,6 @@ h1[class^="h1Heading"] {
padding: 1rem;
}
.navbar__logo {
@include tablet {
height: auto;
}
}
.react-toggle {
margin: 0 0.75rem;
}
@@ -339,7 +333,7 @@ a[class^="sidebarLogo"] {
main[class^="docMainContainer"] {
background: #ffffff;
padding: 2rem 2rem 2rem 4rem;
padding: 2rem 2rem 2rem 5rem;
@include tablet {
padding: 2rem;
@@ -349,11 +343,6 @@ main[class^="docMainContainer"] {
background: var(--ifm-color-primary-dark);
color: var(--ifm-color-primary-light);
}
.docItemContainer_node_modules-\@docusaurus-theme-classic-lib-next-theme-DocItem-styles-module {
max-width: 940px !important;
margin: auto;
}
}
/* table-of-contents */
@@ -427,6 +416,9 @@ button[class^="copyButton"] {
&:focus svg path + path {
fill: var(--ifm-color-primary-dark);
}
&::before {
display: none;
}
}
/* menu */
@@ -484,6 +476,7 @@ button[class^="copyButton"] {
font-style: normal;
font-weight: 700;
line-height: 1;
position: relative;
}
& + .menu__list & {

View File

@@ -4,8 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable jsx-a11y/anchor-has-content, jsx-a11y/anchor-is-valid */
import React from 'react';
import clsx from 'clsx';
import {translate} from '@docusaurus/Translate';
@@ -38,18 +36,16 @@ const createAnchorHeading = (Tag) =>
}
return (
<Tag {...props}>
<a
aria-hidden="true"
tabIndex={-1}
className={clsx('anchor', `anchor__${Tag}`, {
[styles.anchorWithHideOnScrollNavbar]: hideOnScroll,
[styles.anchorWithStickyNavbar]: !hideOnScroll,
})}
id={id}
/>
<Tag
{...props}
className={clsx('anchor', {
[styles.anchorWithHideOnScrollNavbar]: hideOnScroll,
[styles.anchorWithStickyNavbar]: !hideOnScroll,
})}
id={id}>
{props.children}
<a
aria-hidden="true"
className="hash-link"
href={`#${id}`}
title={translate({
@@ -57,7 +53,7 @@ const createAnchorHeading = (Tag) =>
message: 'Direct link to heading',
description: 'Title for link to heading',
})}>
<AnchorIcon />
<AnchorIcon />
</a>
</Tag>
);

View File

@@ -5,18 +5,16 @@
* LICENSE file in the root directory of this source tree.
*/
.anchor {
display: block;
position: relative;
top: -0.5rem;
}
.hash-link {
opacity: 0;
padding-left: 0.5rem;
transition: opacity var(--ifm-transition-fast);
}
.hash-link:before {
content: '#';
}
.hash-link:focus,
*:hover > .hash-link {
opacity: 1;

View File

@@ -12,7 +12,6 @@ See https://twitter.com/JoshWComeau/status/1332015868725891076
*/
.anchorWithStickyNavbar {
scroll-margin-top: calc(var(--ifm-navbar-height) + 0.5rem);
/* top: calc(var(--ifm-navbar-height) * -1 - 0.5rem); */
}
.anchorWithHideOnScrollNavbar {