Updating ddoc to support modern HTML tags

Stewart Gordon via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 25 16:57:41 PDT 2015


On 22/04/2015 08:47, Gary Willoughby wrote:
> On Tuesday, 21 April 2015 at 11:27:35 UTC, Jacob Carlborg wrote:
<snip>
>> I don't think you should use the "style" attribute at all. I think it's better to use
>> classes, or similar.
>
> Yes it's always better to use classes and style them in a CSS file. However, in this
> instance these tags are used to give an immediate result regardless of whether or not an
> accompanying css file exists.

Exactly.  Moreover, since these macros are designed to produce a specific presentational 
effect, I think specifying this presentational effect in the HTML directly is defensible. 
  CSS classes should ideally be semantic, rather than presentational.

> We could also add classes to the spans in addition to the
> style tags in-case people wanted to use CSS files to style.

I think that people who want to do this would probably define their own Ddoc templates to 
do so.  IIRC they would need to anyway, in order to make the HTML file include the <link> 
tag to import the CSS file.

Stewart.

-- 
My email address is valid but not my primary mailbox and not checked regularly.  Please 
keep replies on the 'group where everybody may benefit.


More information about the Digitalmars-d mailing list