-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use distinct styles for note lists and label lists #1209
base: master
Are you sure you want to change the base?
Conversation
As a default for all description lists, the original "label" style is more readable. This is slightly different from the original `label` dl though: * slightly increased left margin for `dd` (to 1em) * removed right margin on `dd` * removed `dt` bottom margin and `dd` top margin, to reduce the gap between the term and its description (to only the standard line-height gap).
Unlike the original note list styles, this version sets the line-height for all `dt` elements to be the same as the `p` elements contained inside the `dd`, so that the second line has the same indentation as all subsequent lines.
Without the closing tags, the dt elements contain whitespace after the text. This normally isn't a big deal, but it messes some things up, e.g: using `::after` and `content: ", "` in the stylesheets.
For what it's worth, here are a few times the styles for these have been updated:
Anyway, this does not mean we need to style them differently by default. If we add the closing If this PR is accepted, I'm willing to create a PR for similar styling for |
FWIW, I've experimented with four different styles. The "label" style restored by #1208:
The "note" style in this PR:
Before making these PRs, I was considering a more table-like style for "notes" (e.g. as used by
Another reasonable approach would be to mimic how rdoc allows the comments to be formatted, indenting each
|
In addition to the changes in #1208, this brings back the
float: left
style, for note lists only. This fixes #1199.Additionally, this PR:
dt
line-height
to matchmain p
. Otherwise, thedt
has a largerline-height
than thep
tag inside thedd
, which causes the second line to have the same indentation as the first but different from the third. IMO, the second line and every line after it should share the same indentation.</dt>
tags, in order to avoid any whitespace at the end of thedt
text node.dt
text).Note that #1208 removes
margin-bottom
fromdt
, which is also necessary for the second indentation to match subsequent lines.