Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions packages/dev/docs/src/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,19 +310,21 @@ export function Layout({scripts, styles, pages, currentPage, publicUrl, children

return (
<Page scripts={scripts} styles={styles} publicUrl={publicUrl} currentPage={currentPage}>
<header className={docStyles.pageHeader} id="header" />
<Nav currentPageName={currentPage.name} pages={pages} />
<main>
<article className={classNames(typographyStyles['spectrum-Typography'], {[docStyles.inCategory]: !!currentPage.category})}>
<MDXProvider components={mdxComponents}>
<ImageContext.Provider value={publicUrl}>
<LinkProvider>{children}</LinkProvider>
</ImageContext.Provider>
</MDXProvider>
</article>
{toc.length ? <ToC toc={toc} /> : null}
<Footer />
</main>
<div style={{isolation: 'isolate'}}>
<header className={docStyles.pageHeader} id="header" />
<Nav currentPageName={currentPage.name} pages={pages} />
<main>
<article className={classNames(typographyStyles['spectrum-Typography'], {[docStyles.inCategory]: !!currentPage.category})}>
<MDXProvider components={mdxComponents}>
<ImageContext.Provider value={publicUrl}>
<LinkProvider>{children}</LinkProvider>
</ImageContext.Provider>
</MDXProvider>
</article>
{toc.length ? <ToC toc={toc} /> : null}
<Footer />
</main>
</div>
</Page>
);
}
2 changes: 1 addition & 1 deletion packages/dev/docs/src/ThemeSwitcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function ThemeSwitcher() {

return (
<div title={label}>
<ActionButton
<ActionButton
aria-label={label}
onPress={onPress}>
{colorScheme === 'dark' ? <Light /> : <Moon />}
Expand Down
27 changes: 16 additions & 11 deletions packages/dev/docs/src/docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ html, body {
}

.provider {
min-height: 100vh;
min-height: 100%;
--page-background: var(--spectrum-global-color-gray-50);
background: var(--page-background) !important;
color-scheme: light dark;
Expand Down Expand Up @@ -501,20 +501,24 @@ h2.sectionHeader {
.pageHeader {
position: fixed;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to change this to not be position: fixed for mobile views? Right now the top of fullscreen/fullscreen takeover modals is still getting cut off in smaller viewports:
image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, thanks, didn't know about this issues

top: 0;
left: 0;
display: flex;
display: inline-flex;
align-items: center;
justify-content: space-between;
padding: 0 8px;
box-sizing: border-box;
height: var(--spectrum-global-dimension-size-600);
width: 100%;
[dir='ltr'] & {
right: 0;
}
[dir='rtl'] & {
left: 0;
}
}

/* hamburger menu should be hidden so that it doesn't receive focus before the sidenav */
.hamburgerButton {
visibility: hidden;
}
.hamburgerButton {
display:none;
}

.responsiveVideo {
position: relative;
Expand Down Expand Up @@ -635,8 +639,8 @@ h2.sectionHeader {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
width: 100%;
height: 100%;
content: '';
z-index: 99;
background: var(--spectrum-alias-background-color-modal-overlay);
Expand All @@ -660,10 +664,11 @@ h2.sectionHeader {
border-bottom: 1px solid var(--spectrum-global-color-gray-200);
background: var(--page-background);
z-index: 50;
display: flex;
width: 100%;
}

.hamburgerButton {
visibility: visible;
display: inline-flex;
}

/* Expand the component description to full width */
Expand Down
1 change: 1 addition & 0 deletions packages/dev/docs/src/toc.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
top: 80px;
right: 8px;
overflow-y: auto;
max-height: calc(100vh - 80px);
}

.tocContainer {
Expand Down