Skip to content

Commit

Permalink
Fix display of labels in a [horizontal] list
Browse files Browse the repository at this point in the history
The introduction of the entry for `compdb-targets` in the `[horizontal]`
labeled list in doc/manual.asciidoc revealed some display issues in the
left column:

First, the web browser would insert a line break in the middle of the
label `compdb-targets`, so that it looked like this:

       compdb-
       targets

We fix this by applying the `white-space: nowrap` attribute to the left
column.

After this is fixed, we see practically no space between the end of the
longest label and the beginning of the text in the second column; we fix
this with the `padding-right` attribute.

Finally, we align all labels to the right side of the column so that
there is a consistent amount of horizontal space between the end of each
label and the beginning of the text in the second column.
  • Loading branch information
JamesWidman committed Oct 13, 2024
1 parent 4e4ec4c commit b785947
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions doc/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,16 @@ div.chapter {
p {
margin-top: 0;
}

/* The following applies to the left column of a [horizontal] labeled list: */
table.horizontal > tbody > tr > td:nth-child(1) {

/* prevent the insertion of a line-break in the middle of a label: */
white-space: nowrap;

/* insert a little horizontal padding between the two columns: */
padding-right: 1.5em;

/* right-justify labels: */
text-align: end;
}

0 comments on commit b785947

Please sign in to comment.