The ugly truth about ddoc

Ary Borenszweig via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 18 19:12:22 PST 2015


On 1/18/15 11:18 PM, Andrei Alexandrescu wrote:
> TL;DR: I've uploaded new menu colors at http://erdani.com/d/, this time
> aiming for a more martian red ethos. Please let me know.
>
> ==================
>
> So I was looking at the css today (original at
> http://paste.ofcode.org/fHGT24YASrWu3rnMYLdm4C taken from the zip at
> http://cssmenumaker.com/menu/modern-jquery-accordion-menu) and it was
> quite unwieldy to experiment with. For example, the same color appears
> hardcoded in a number of places; whenever changing one I'd need to
> change all, or miss some important instances (as it happened with my
> first experiment).
>
> I'm sure experts must have tools for allowing things like variables and
> macros for css creation.

Sass (http://sass-lang.com/) and Less (http://lesscss.org/) comes to my 
mind. Any decent web framework comes with support for them.

I think you will eventually find that ddoc is turing-complete and will 
implement one of the above transpilers in it.

And css minification isn't just about gzip. It's also about removing 
whitespace and compacting stuff. Can you code a ddoc macro for that?


More information about the Digitalmars-d mailing list