mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
fix(docs): too much whitespace around <pre> blocks #24151
Problem: In the generated docs HTML there is too much whitespace before/after `<pre>` blocks. - In the old layout (fixed-width), all text in `.old-help-para` is formatted as `white-space:pre`. - In the new layout, when `<pre>` is at the end of a `<div>`, the margins of both are redundant, causing too much space. Solution: - In the old layout, always remove `<pre>` margin. - In the new layout, disable `<pre>` margin if it is the last child.
This commit is contained in:
parent
5ceb2238d3
commit
957d05d16b
@ -2015,7 +2015,7 @@ Buffer Functions *api-buffer*
|
|||||||
|
|
||||||
For more information on buffers, see |buffers|.
|
For more information on buffers, see |buffers|.
|
||||||
|
|
||||||
Unloaded Buffers:~
|
Unloaded Buffers: ~
|
||||||
|
|
||||||
Buffers may be unloaded by the |:bunload| command or the buffer's
|
Buffers may be unloaded by the |:bunload| command or the buffer's
|
||||||
|'bufhidden'| option. When a buffer is unloaded its file contents are
|
|'bufhidden'| option. When a buffer is unloaded its file contents are
|
||||||
|
@ -944,6 +944,7 @@ local function gen_css(fname)
|
|||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.old-help-para {
|
.old-help-para {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
@ -953,6 +954,12 @@ local function gen_css(fname)
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
|
font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
|
||||||
}
|
}
|
||||||
|
.old-help-para pre {
|
||||||
|
/* All text in .old-help-para is formatted as "white-space:pre" so text following <pre> is
|
||||||
|
already visually separated by the linebreak. */
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
a.help-tag, a.help-tag:focus, a.help-tag:hover {
|
a.help-tag, a.help-tag:focus, a.help-tag:hover {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@ -1006,6 +1013,9 @@ local function gen_css(fname)
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
pre:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
pre:hover,
|
pre:hover,
|
||||||
.help-heading:hover {
|
.help-heading:hover {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
|
Loading…
Reference in New Issue
Block a user