Skip to content

Commit 203d266

Browse files
NetdocsCopilot
andcommitted
Increase side padding on code blocks
Code text sat too close to the panel border. Bump horizontal padding from 1.2em to 1.5em on highlighted blocks, add the same padding to bare pre>code blocks (previously only bordered), and align the fence title bar to 1.5em so the filename lines up with the code text. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6ba0e80 commit 203d266

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/Netdocs.Theme.Material/assets/netdocs.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,14 @@ body {
197197
/* Give code content a little more horizontal breathing room so text is never
198198
flush against the panel border. */
199199
.md-typeset .highlight > pre > code {
200-
padding: 0.75em 1.2em;
200+
padding: 0.8em 1.5em;
201201
}
202202

203203
/* Bare <pre><code> blocks (not wrapped in a .highlight container) still need a
204204
panel border, but a wrapped block must NOT get a second, inset border on the
205205
inner <code> — that produced the "double border" seen on the reference page. */
206206
.md-typeset pre > code {
207+
padding: 0.8em 1.5em;
207208
border: 0.05rem solid var(--md-default-fg-color--lightest);
208209
border-radius: 0.2rem;
209210
box-shadow: var(--nd-code-shadow);
@@ -235,7 +236,7 @@ body {
235236
margin: 0;
236237
font-size: 0.85em;
237238
font-weight: 700;
238-
padding: 0.5em 1em;
239+
padding: 0.5em 1.5em;
239240
border-top-left-radius: 0.2rem;
240241
border-top-right-radius: 0.2rem;
241242
background: color-mix(in srgb, var(--md-code-bg-color) 100%, var(--md-default-fg-color) 6%);

0 commit comments

Comments
 (0)