Improved Phobos dox

Vladimir Panteleev vladimir at thecybershadow.net
Mon Sep 16 09:56:30 PDT 2013


On Monday, 16 September 2013 at 16:49:25 UTC, Andrei Alexandrescu 
wrote:
> On 9/16/13 9:44 AM, Vladimir Panteleev wrote:
>> I noticed the change: dd -> div. This is bad, because it 
>> reduces semantics.
>
> The change was from unqualified <dd> to <div class="param">. 
> Big difference.

(I assume that "param" is now used with the meaning of the 
abstract value of the "class" HTML attribute, in contrast to its 
previous occurrence as the literal "param" CSS class from the <i> 
example)

> Now you're arguing that <dd class="param"> is better than <div 
> class="param">. This is more interesting, and I'd like to get 
> convinced one way or another.

Is the Wikipedia link I posted earlier not applicable? I believe 
it discusses why it is beneficial to use HTML tags that reflect, 
or reflect closely the semantics of their contents. E.g. <nav> 
instead of <div> for navigation blocks, <address> instead of 
<span> for addresses, and respectively <dd> instead of <div> for 
definition lists.

> For my part I prefer the minimal commitment of <div> - just 
> leave it to the style to decide how to go about things. So I 
> have minimal hardcoding of semantics in the generated html, and 
> maximum flexibility in the CSS - I can get to hide the thing 
> altogether, or format it in ways that are very different from 
> classic <dd>.

Right. I think I found the source of the misunderstanding: the 
idea is not to depend on the default formatting of <dd> - the 
idea is to remove the default styles using CSS, then use it like 
<div>, which is what the old code did.

(Apologies to everyone for, once again, blowing up a nitpick 
matter into an overgrown discussion of a dozen posts.)


More information about the Digitalmars-d mailing list