chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Centralized documentation


From: Alejandro Forero Cuervo
Subject: Re: [Chicken-users] Centralized documentation
Date: Tue, 20 Feb 2007 14:50:44 -0500
User-agent: Mutt/1.5.9i

> I've spent a couple of hours hacking the CSS.  The result can be viewed
> at http://frohike.homeunix.org/stream-wiki.html
> Feel free to snarf the CSS and plug it in the current wiki.

Beautiful.  Thanks for the improvement. :-)

> This CSS was prepared on the basis of the original HTML as it was
> found on the wiki.  I'd give this a huge overhaul, if possible,
> though.  It's very unsemantic and suffers from a disease
> webdevelopers call "divitis", which means there are too many
> DIVs/SPANs thrown in for no reason, or as substitutes for UL/OLs.
> Also, there is a lot of class abuse.

I agree with this.  This huge overhaul that you speak of would be very
welcome.  In fact, it's already started.  But keep reading for some
disclaimers.

> A small example straight from the source:
> <div id="info-box" class="info-box">
>   <span class="info-box">
>     <a class="info-box" href="xsvnwiki-atom/stream-wiki">XML</a>
>   </span>
> </div>

The <span> could, *probably*, be removed, but leaving it as it is may,
perhaps, simplify some tasks (eg. draw some decorations around the
links that aren't part of the link themselves)?

The <div>, on the other hand, surrounds *all* the info-box links, not
each individual one, as your example implies.  So, IMO, it shouldn't
be removed.  A more correct example would be:

> <div id="info-box" class="info-box">
>   <span class="info-box">
>     <a class="info-box" href="xsvnwiki-atom/stream-wiki">XML</a>
>   </span>
>   <span class="info-box">
>     <a class="info-box" href="foo">Edit</a>
>   </span>
>   ...
> </div>

I agree with your #1 statement:

> 1) It's pointless to define both a class and an id on the toplevel DIV.
> Just the id should suffice since there's only one info-box on the page, ever.

In

  http://freaks-unidos.net/azul-home/src/svnwiki/trunk/shared.scm

you'll find the following comment:

   ; 'class' attribute is deprecated for unique elements: header, toc-links,
   ; content-box info-box, content, last-update and credits.  The 'id' attribute
   ; should be used instead

We switched from 'class' to 'id' around 2006-06.

Are you proposing that we break all the CSS files of all svnwiki users
that relied on the 'class' attributes that were provided previously,
before svnwiki was changed to using 'id'?

If that's what you're proposing, I'd say I agree, but I'll do it in
the future, giving other users of svnwiki that have created their own
CSS files more time to adapt them to depend on 'id' rather than
'class'.

> 2) It's pointless to define the same class on all sub-elements of
> the info-box.  If you're trying to be generic and target all things
> of class info-box (...), you'll get into trouble because you're
> actually targeting more than you want to target.
>
> 3) If I want to target the inner link, I don't have to have a class to
> target it:
> 
> /* Target the direct descendent of a span which is a direct descendent of
>    anything with id info-box and give it the color #666699. */
> #info-box > span > a {
>    color: #669;
> }
> 
> Or, more generic:
> 
> /* Target any descendent (at any level) below anything with an id of info-box 
> */
> #info-box a {
>   color: #669;
> }
>
> 4) If I give the #info-box a font, for example, the span and a will inherit
> it from the #info-box.  Anything that isn't defined in #info-box is inherited
> from its parent, and so on.  (this doesn't apply to link color and
> text-decoration because links have some sort of special status; they're
> always colored differently, so you'll have to explicitly target them in CSS)

I see (2), (3) and (4) as exactly the same issue.  And yes, I agree
with this: its kinda pointless to use the same class in sub-elements.

On the other hand, I don't think it hurts.  It certainly didn't
prevent you from making your CSS and I would think it didn't even make
it *harder* for you to make it.  Whereas changing this would probably
break some many CSS files.

Thanks for your suggestions.

Alejo.
http://azul.freaks-unidos.net/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]