Skip to content

Commit c130359

Browse files
authored
fix(platform): Adjust layout for wide screens in dev docs (#14777)
Adjusts css for devdocs on wide screens, also fixes the layout for dev-docs sidebar
1 parent 867c9a1 commit c130359

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/components/docPage/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export function DocPage({
126126
</aside>
127127
)}
128128
</section>
129-
<style>{`:root { --doc-content-w: 1200px; } #doc-content { max-width: var(--doc-content-w); }`}</style>
129+
<style>{`:root { --doc-content-w: 1200px; } #doc-content { max-width: var(--doc-content-w); box-sizing: border-box; }`}</style>
130130
<style>{`
131131
@media (min-width: 2057px) {
132132
:root {
@@ -137,8 +137,8 @@ export function DocPage({
137137
/* Cap content width and center (reinforced at this breakpoint) */
138138
#doc-content {
139139
max-width: var(--doc-content-w);
140-
padding-left: 5rem; /* increase from px-6 (24px) to 5rem (80px) */
141-
padding-right: 5rem;
140+
padding-left: 2rem;
141+
padding-right: 2rem;
142142
}
143143
/* Cancel default push so content can center */
144144
[data-layout-anchor="left"] + .main-content {

src/components/sidebar/developDocsSidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function DevelopDocsSidebar({
3737
return toTree(apiNodes);
3838
};
3939
return (
40-
<aside className={`${styles.sidebar} p-3`}>
40+
<aside className={`${styles.sidebar} p-3`} data-layout-anchor="left">
4141
<input type="checkbox" id={sidebarToggleId} className="hidden" />
4242
<style>{':root { --sidebar-width: 300px; }'}</style>
4343
<div className="md:flex flex-col items-stretch">

0 commit comments

Comments
 (0)