Improved Phobos dox

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Sep 16 10:14:01 PDT 2013


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.

> There is a reason HTML 4 offered many element types and HTML 5 expanded
> this even more so.  It improves code readability and has other benefits
> beyond that including assisting screen readers and other accessibility
> services for disabled people.
>
> http://coding.smashingmagazine.com/2013/01/18/the-importance-of-sections/

Sections would be nice to use.


Andrei



More information about the Digitalmars-d mailing list