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
36 changes: 25 additions & 11 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -382,19 +382,25 @@ main > .container.padding-top--md.padding-bottom--lg,
}

/* ────────────────────────────────── Markdown tables (docs-style) ───── */
/* Infima uses a full grid + zebra + grey thead; align with modern doc prose */
.theme-doc-markdown.markdown table {
display: block;
/* Scrollable wrapper injected via MDXComponents so table keeps display:table */
.theme-doc-markdown.markdown .table-scroll-wrapper {
width: 100%;
max-width: 100%;
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
margin-top: 1.25rem;
margin-bottom: 1.25rem;
border-collapse: collapse;
border: 1px solid var(--ifm-table-border-color);
border-radius: var(--ifm-global-radius);
border-radius: 8px;
}

.theme-doc-markdown.markdown table {
display: table;
width: 100%;
max-width: 100%;
margin-top: 0;
margin-bottom: 0;
border-collapse: collapse;
font-size: 0.9375rem;
line-height: 1.55;
}
Expand Down Expand Up @@ -1025,7 +1031,9 @@ main > .container.padding-top--md.padding-bottom--lg,
font-size: 0.6875rem;
font-weight: 500;
cursor: pointer;
transition: color 0.15s ease, background 0.15s ease;
transition:
color 0.15s ease,
background 0.15s ease;
white-space: nowrap;
}

Expand Down Expand Up @@ -1077,7 +1085,10 @@ main > .container.padding-top--md.padding-bottom--lg,
font-size: 0.625rem;
font-weight: 500;
cursor: pointer;
transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
transition:
color 0.15s ease,
background 0.15s ease,
border-color 0.15s ease;
white-space: nowrap;
text-decoration: none;
line-height: 1.4;
Expand Down Expand Up @@ -1152,7 +1163,10 @@ main > .container.padding-top--md.padding-bottom--lg,
font-size: 0.625rem;
font-weight: 500;
cursor: pointer;
transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
transition:
color 0.15s ease,
background 0.15s ease,
border-color 0.15s ease;
}

.sidebar-ask-ai__copy-btn:hover {
Expand Down Expand Up @@ -1417,15 +1431,15 @@ main > .container.padding-top--md.padding-bottom--lg,

/* ────────────────────────────────── Diff-style code lines ─────────────── */
.code-block-diff-add-line {
background-color: rgba(16, 185, 129, 0.10);
background-color: rgba(16, 185, 129, 0.1);
display: block;
margin: 0 calc(-1 * var(--ifm-pre-padding));
padding: 0 var(--ifm-pre-padding);
border-left: 3px solid #10b981;
}

.code-block-diff-remove-line {
background-color: rgba(239, 68, 68, 0.10);
background-color: rgba(239, 68, 68, 0.1);
display: block;
margin: 0 calc(-1 * var(--ifm-pre-padding));
padding: 0 var(--ifm-pre-padding);
Expand Down
2 changes: 1 addition & 1 deletion src/theme/DocItem/Content/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function DocItemContent({ children }) {
return (
<div className={clsx(ThemeClassNames.docs.docMarkdown, "markdown")}>
<div className="relative">
<div className="absolute top-0 right-0">
<div className="flex items-center justify-end md:absolute top-0 right-0 mb-4">
<DocPageCopyDropdown />
</div>
<MDXContent>{children}</MDXContent>
Expand Down
10 changes: 10 additions & 0 deletions src/theme/MDXComponents.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import React from 'react';
import MDXComponents from '@theme-original/MDXComponents';
import StepFlow from '@site/src/components/StepFlow';
import ArchitectureDiagram from '@site/src/components/ArchitectureDiagram';

function TableWrapper(props) {
return (
<div className="table-scroll-wrapper">
<table {...props} />
</div>
);
}

export default {
...MDXComponents,
table: TableWrapper,
StepFlow,
ArchitectureDiagram,
};
Loading