Skip to content

Commit

Permalink
fix: make outline have a well width (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
sumy7 authored Mar 3, 2024
1 parent f07b64f commit b13bcc4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/shy-eagles-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rspress/theme-default": patch
---

fix(theme-default): make outline have a well width again
17 changes: 6 additions & 11 deletions packages/theme-default/src/layout/DocLayout/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@
:global(.rspress-doc-footer) {
padding: 0 48px;
box-sizing: border-box;
width: 100%;
width: calc(100vw - var(--rp-sidebar-width) - var(--rp-aside-width));
max-width: calc(960px + 48px * 2);
margin: auto;
}
}
}
Expand All @@ -120,17 +122,10 @@
.content {
:global(.rspress-doc),
:global(.rspress-doc-footer) {
box-sizing: content-box;
box-sizing: border-box;
width: calc(100vw - var(--rp-sidebar-width) - var(--rp-aside-width));
padding: 0
max(
48px,
calc(
(100vw - var(--rp-sidebar-width) - var(--rp-aside-width) - 960px) /
2
)
);
max-width: 960px;
padding: 0 48px;
max-width: calc(960px + 48px * 2);
margin: auto;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/theme-default/src/layout/DocLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function DocLayout(props: DocLayoutProps) {
<div
className={`${styles.content} rspress-doc-container flex flex-shrink-0 mx-auto`}
>
<div className="w-full">
<div className="w-full overflow-hidden flex-1">
{isOverviewPage ? (
<Overview content={docContent} />
) : (
Expand Down
2 changes: 1 addition & 1 deletion packages/theme-default/src/styles/vars.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:root {
--rp-nav-height: 72px;
--rp-sidebar-width: 320px;
--rp-aside-width: 368px;
--rp-aside-width: 268px;
}

:root {
Expand Down

0 comments on commit b13bcc4

Please sign in to comment.