Improved Phobos dox

Brad Anderson eco at gnuk.net
Mon Sep 16 10:17:06 PDT 2013


On Monday, 16 September 2013 at 17:14:01 UTC, Andrei Alexandrescu 
wrote:
> On 9/16/13 10:01 AM, Brad Anderson wrote:
>> 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.
>>>
>>> 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.
>>>
>>> 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>.
>>>
>>>> Your example is: i -> span class="param". This is good, 
>>>> because it
>>>> improves semantics.
>>>
>>> Great.
>>>
>>>
>>> Andrei
>>
>> Why not just make every element a div with a class in that 
>> case?
>
> The point of using specific elements is to get their default 
> attributes "for free". Otherwise one would need to specify a 
> bunch in the class definitions.
>
> I can see how using specific elements may help the browser if 
> the user alters the defaults.
>

The point is the semantics, not the default styling.  The default 
styling exists just to give them a sane default to work with.


More information about the Digitalmars-d mailing list