[rfc-i] definition lists "hanging" attribute

julian.reschke at gmx.de (Julian Reschke) Thu, 13 November 2014 20:03 UTC

From: "julian.reschke at gmx.de"
Date: Thu, 13 Nov 2014 21:03:47 +0100
Subject: [rfc-i] definition lists "hanging" attribute
In-Reply-To: <CBEBDDDF-0C18-447C-80A4-1F808AE7F1E0@tzi.org>
References: <546508E4.3050708@gmx.de> <CBEBDDDF-0C18-447C-80A4-1F808AE7F1E0@tzi.org>
Message-ID: <54650EA3.6030107@gmx.de>

On 2014-11-13 20:54, Carsten Bormann wrote:
>
>> On 13 Nov 2014, at 09:39, Julian Reschke <julian.reschke at gmx.de> wrote:
>>
>> <http://tools.ietf.org/html/draft-hoffman-xml2rfc-12#section-2.20>
>>
>>> 2.20.1. 'hanging' attribute
>>>
>>>
>>>    The hanging attribute defines whether or not the term appears on the
>>>    same line as the definition. hanging="false" indicates that the term
>>>    is to the left of the definition, while hanging="true" indicates that
>>>    the term will be on a separate line.
>>>
>>>    Allowed values:
>>>
>>>    o  "false" (default)
>>>
>>>    o  "true"
>>
>> I realize that this duplicates v2 functionality, but?
>
> I?m confused now.
> (v2 doesn?t have that functionality, that?s one place where vspace is used extensively.)

list style "hanging" (see 
<http://greenbytes.de/tech/webdav/draft-reschke-xml2rfc-latest.html#element.list.attribute.style>); 
what's new is the ability to ask for new lines.

The latter is trivial in HTML definition lists, the former (old 
behavior) is not.

> ?hanging? strikes me as a strange name for this feature, as both variants are ?Hangs? in the publishing sense.
>
>> Does anybody have a clue how to achieve the "hanging" effect in HTML/CSS (while still producing an HTML list)? Joe?
>
> HTML renders DL with line breaks, because both dt and dd are "display: block".
>
> For non-breaking hangs:
>
> .hangingindent {
>      padding-left: 22px;
>      text-indent: -22px;
> }

But that doesn't replicate the plain text behavior people appear to 
like: the indentation is static (per list), and the labels will "hang" 
into the list item when they are wider than the indentation.

HTML4 used to have the "compact" attribute (see 
<https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl>), but 
it's IMHO not implemented and was removed in HTML5.

>> Also: v2 allowed to specify the indentation for this case; I believe that if we keep "hanging" we'll have to preserve this as well.
>
> +1.

Best regards, Julian