-
Notifications
You must be signed in to change notification settings - Fork 39
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
HTML styles for compact lists are not compact #964
Comments
This sets top and bottom margin to all the elements with a `dl` element with `spacing="compact"`. Fixes ietf-tools#964
@mcr, @martinthomson: The proposed change in #1190 produces following example output. Source:
|
I tried a similar trick myself, but there are a few complications.
Your That is why I recommended only looking at first-child and last-child. Take the following, which is a form that appears in several documents: <dl class="compact">
<dt>Lorem Ipsum</dt>
<dd>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</dd>
<dt>Bogan Ipsum</dt>
<dd>
<p>He hasn't got a chuck a yewy no worries as busy as a bounce? Ciggie butt brain sheila how she'll be right boozer. Come a cockie when she'll be right jackaroo. He hasn't got a boil-over mate as cross as a fly wire. She'll be right cactus mate to you little ripper dunny? As stands out like flake with as busy as a fair go.</p>
<p>Lets throw a ford and gutful of grog. As busy as a bottlo flamin it'll be decent nik? We're going jillaroo piece of piss she'll be right fairy floss. Get on the cans mozzie heaps this is a joke blow in the bag. Flat out like a blowie to flat out like a tucker-bag? Come a stubby flamin come a bin chicken. As cunning as a two up also hit the frog and toad wuss. Come a hoon and grab us a flick.</p>
</dd>
</dl> Aside from |
Describe the issue
The compact styling on definition lists (
<dl spacing="compact">
) does not appear to function properly.https://www.ietf.org/archive/id/draft-ietf-ohai-ohttp-06.html#section-9.1 includes a large definition list that uses the compact spacing, however it does not render very differently from the normal one. My expectation is that the compact spacing approximates the inter-line spacing of a regular paragraph, but this appears to be half-way between that and the full spacing.
(Separately, the full spacing is extremely wide, which might have the same cause.)
My investigation shows that this is due to the content of the
<dd>
element including elements (<p>
in this case) that have their own margins. These margins still apply, but it appears to expand the spacing between items.I found that the following works, even if it is a little clunky:
(The
.break
elements that are scattered throughout are a little annoying to style around; I just set them todisplay: none
but then I need to do this hack here. Thedl.compact
rule is for Julian's XSLT output, but it's been a while since I checked how that renders; ignore that one.)Code of Conduct
The text was updated successfully, but these errors were encountered: