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
10 changes: 5 additions & 5 deletions src/components/CodeBlock.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@
font-family: var(--mono-font) !important;
font-size: var(--code-font-size);
line-height: var(--code-line-height);
overflow-x: hidden;
overflow-x: auto;
white-space: pre-wrap;
word-break: break-word;
overflow-wrap: anywhere;
word-break: normal;
overflow-wrap: break-word;
color: var(--code-text-color);
border: none;
box-shadow: none;
Expand All @@ -136,8 +136,8 @@
.codeBlockContent pre,
.codeBlockContent code {
white-space: pre-wrap !important;
word-break: break-word;
overflow-wrap: anywhere;
word-break: normal;
overflow-wrap: break-word;
}

.codeBlockContent code {
Expand Down
10 changes: 5 additions & 5 deletions src/components/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -369,17 +369,17 @@ const CodeBlock: React.FC<CodeBlockProps> = React.memo(
fontSize: 'var(--code-font-size)',
lineHeight: 'var(--code-line-height)',
whiteSpace: 'pre-wrap',
wordBreak: 'break-word',
overflowWrap: 'anywhere',
overflowX: 'hidden',
wordBreak: 'normal',
overflowWrap: 'break-word',
overflowX: 'auto',
}}
codeTagProps={{
style: {
fontFamily: 'var(--mono-font)',
fontSize: 'inherit',
whiteSpace: 'pre-wrap',
wordBreak: 'break-word',
overflowWrap: 'anywhere',
wordBreak: 'normal',
overflowWrap: 'break-word',
},
}}
>
Expand Down
3 changes: 2 additions & 1 deletion src/components/HostedFilePreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ export default function HostedFilePreview({ assetUrl, assetLabel }: HostedFilePr
<div className="doc-hosted-preview">
<CodeBlock
snippets={[{ language: 'markdown', code: content, label: assetLabel }]}
showLineNumbers={true}
showLineNumbers={false}
className="doc-hosted-preview__code"
/>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export default function Navigation({
>
<DocsLogoMark />
<span
className="text-lg tracking-wider uppercase font-black"
className="text-xl tracking-wider uppercase font-black md:text-2xl"
style={{ fontFamily: 'var(--mono-font)' }}
>
{siteName}
Expand Down
17 changes: 12 additions & 5 deletions src/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -721,10 +721,10 @@ a:focus-visible {
/* Inline code styles for markdown */
pre {
max-width: 100%;
overflow-x: hidden;
overflow-x: auto;
white-space: pre-wrap;
word-break: break-word;
overflow-wrap: anywhere;
word-break: normal;
overflow-wrap: break-word;
padding: var(--space-4);
border-radius: var(--radius-lg);
border: 1px solid rgba(var(--primary-color-rgb), 0.15);
Expand Down Expand Up @@ -993,6 +993,13 @@ code {
margin: var(--space-4) 0;
}

.doc-hosted-preview__code pre,
.doc-hosted-preview__code code {
white-space: pre-wrap !important;
word-break: normal !important;
overflow-wrap: break-word !important;
}

.doc-hosted-preview--loading,
.doc-hosted-preview--error {
border: 1px solid var(--border-unified);
Expand Down Expand Up @@ -1938,8 +1945,8 @@ header a:hover,
.doc-content th,
.doc-content td {
padding: var(--space-2) var(--space-3);
word-break: break-word;
overflow-wrap: anywhere;
word-break: normal;
overflow-wrap: break-word;
vertical-align: top;
}
}
Expand Down
Loading