> > Well-written css code means *lean* selectors so a well written styles
> sheet
> > should need more comments than a badly written one, isn't?.
> 
> With respect, I disagree : you are choosing to interpret "well-written"
> as "efficient"; I interpret "well-written" as "transparent",
> "immediately clear to the reader", code that demonstrates clarity
> of thought and clarity of expression.

Then following your interpretation, looking at the same example:

#mainmenu ul li#last #donations {font-size:1.24em;}

What is "immediately clear" to you in that rule?

1. the extra selectors are needed to give enough weight to that rule
2. "li" is used to differentiate this rule from another one that targets the
same ID, but on a DIV (in another document)
3. all the above
4. none of the above

Imho, with the "short version", there is much less guessing. What's clear to
the reader is that we're styling that key selector, nothing more. We are not
messing with specificity and we are not sending mixed signals by pairing the
element with its ID. If we decide to add a comment it is to help authors
spot the element in the sheet and/or document, not to tell them what we're
actually doing. That's because our short selector makes that obvious.

--
Regards,
Thierry
@thierrykoblentz
www.tjkdesign.com | www.ez-css.org | www.css-101.org 



 

  

______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to