Skip to content

Commit 1c26656

Browse files
committed
UI: Extend grid of docs layout to 5 columns
1 parent 860550f commit 1c26656

File tree

7 files changed

+24
-12
lines changed

7 files changed

+24
-12
lines changed

.changeset/wise-rabbits-crash.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'fumadocs-ui': patch
3+
'@fumadocs/base-ui': patch
4+
---
5+
6+
Extend grid of docs layout to 5 columns

packages/base-ui/css/lib/shiki.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@
1616
:is(pre *):is(.shiki *):not(.not-fumadocs-codeblock *) {
1717
.line& {
1818
position: relative;
19-
min-height: 1lh;
2019
padding-left: var(--padding-left);
2120
padding-right: var(--padding-right);
2221
}
2322

23+
.line:empty& {
24+
height: 1lh;
25+
}
26+
2427
.has-focused .line&:not(.focused) {
2528
filter: blur(2px);
2629
transition: filter 200ms;

packages/base-ui/src/layouts/docs/client.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ export function LayoutBody({ className, style, children, ...props }: ComponentPr
5454
<div
5555
id="nd-docs-layout"
5656
className={cn(
57-
'grid transition-[grid-template-columns] overflow-x-clip min-h-(--fd-docs-height) auto-cols-auto auto-rows-auto [--fd-docs-height:100dvh] [--fd-header-height:0px] [--fd-toc-popover-height:0px] [--fd-sidebar-width:0px] [--fd-toc-width:0px]',
57+
'grid transition-[grid-template-columns] overflow-x-clip min-h-(--fd-docs-height) [--fd-docs-height:100dvh] [--fd-header-height:0px] [--fd-toc-popover-height:0px] [--fd-sidebar-width:0px] [--fd-toc-width:0px]',
5858
className,
5959
)}
6060
data-sidebar-collapsed={collapsed}
6161
style={
6262
{
63-
gridTemplate: `"sidebar header toc"
64-
"sidebar toc-popover toc"
65-
"sidebar main toc" 1fr / minmax(var(--fd-sidebar-col), 1fr) minmax(0, calc(var(--fd-layout-width,97rem) - var(--fd-sidebar-width) - var(--fd-toc-width))) minmax(min-content, 1fr)`,
63+
gridTemplate: `"sidebar sidebar header toc toc"
64+
"sidebar sidebar toc-popover toc toc"
65+
"sidebar sidebar main toc toc" 1fr / minmax(min-content, 1fr) var(--fd-sidebar-col) minmax(0, calc(var(--fd-layout-width,97rem) - var(--fd-sidebar-width) - var(--fd-toc-width))) var(--fd-toc-width) minmax(min-content, 1fr)`,
6666
'--fd-docs-row-1': 'var(--fd-banner-height, 0px)',
6767
'--fd-docs-row-2': 'calc(var(--fd-docs-row-1) + var(--fd-header-height))',
6868
'--fd-docs-row-3': 'calc(var(--fd-docs-row-2) + var(--fd-toc-popover-height))',

packages/base-ui/src/layouts/docs/page/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export function DocsPage({
138138
data-full={full}
139139
className={cn(
140140
'flex flex-col w-full max-w-[900px] mx-auto [grid-area:main] px-4 py-6 gap-4 md:px-6 md:pt-8 xl:px-8 xl:pt-14',
141-
full ? 'max-w-[1200px]' : 'xl:layout:[--fd-toc-width:268px]',
141+
full ? 'max-w-[1168px]' : 'xl:layout:[--fd-toc-width:268px]',
142142
className,
143143
)}
144144
>

packages/radix-ui/css/lib/shiki.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@
1616
:is(pre *):is(.shiki *):not(.not-fumadocs-codeblock *) {
1717
.line& {
1818
position: relative;
19-
min-height: 1lh;
2019
padding-left: var(--padding-left);
2120
padding-right: var(--padding-right);
2221
}
2322

23+
.line:empty& {
24+
height: 1lh;
25+
}
26+
2427
.has-focused .line&:not(.focused) {
2528
filter: blur(2px);
2629
transition: filter 200ms;

packages/radix-ui/src/layouts/docs/client.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ export function LayoutBody({ className, style, children, ...props }: ComponentPr
5454
<div
5555
id="nd-docs-layout"
5656
className={cn(
57-
'grid transition-[grid-template-columns] overflow-x-clip min-h-(--fd-docs-height) auto-cols-auto auto-rows-auto [--fd-docs-height:100dvh] [--fd-header-height:0px] [--fd-toc-popover-height:0px] [--fd-sidebar-width:0px] [--fd-toc-width:0px]',
57+
'grid transition-[grid-template-columns] overflow-x-clip min-h-(--fd-docs-height) [--fd-docs-height:100dvh] [--fd-header-height:0px] [--fd-toc-popover-height:0px] [--fd-sidebar-width:0px] [--fd-toc-width:0px]',
5858
className,
5959
)}
6060
data-sidebar-collapsed={collapsed}
6161
style={
6262
{
63-
gridTemplate: `"sidebar header toc"
64-
"sidebar toc-popover toc"
65-
"sidebar main toc" 1fr / minmax(var(--fd-sidebar-col), 1fr) minmax(0, calc(var(--fd-layout-width,97rem) - var(--fd-sidebar-width) - var(--fd-toc-width))) minmax(min-content, 1fr)`,
63+
gridTemplate: `"sidebar sidebar header toc toc"
64+
"sidebar sidebar toc-popover toc toc"
65+
"sidebar sidebar main toc toc" 1fr / minmax(min-content, 1fr) var(--fd-sidebar-col) minmax(0, calc(var(--fd-layout-width,97rem) - var(--fd-sidebar-width) - var(--fd-toc-width))) var(--fd-toc-width) minmax(min-content, 1fr)`,
6666
'--fd-docs-row-1': 'var(--fd-banner-height, 0px)',
6767
'--fd-docs-row-2': 'calc(var(--fd-docs-row-1) + var(--fd-header-height))',
6868
'--fd-docs-row-3': 'calc(var(--fd-docs-row-2) + var(--fd-toc-popover-height))',

packages/radix-ui/src/layouts/docs/page/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export function DocsPage({
138138
data-full={full}
139139
className={cn(
140140
'flex flex-col w-full max-w-[900px] mx-auto [grid-area:main] px-4 py-6 gap-4 md:px-6 md:pt-8 xl:px-8 xl:pt-14',
141-
full ? 'max-w-[1200px]' : 'xl:layout:[--fd-toc-width:268px]',
141+
full ? 'max-w-[1168px]' : 'xl:layout:[--fd-toc-width:268px]',
142142
className,
143143
)}
144144
>

0 commit comments

Comments
 (0)