W3C home > Mailing lists > Public > www-style@w3.org > October 2003

Re: [css3-cascade] Proposed property: rule( sSelector );

From: Chris Moschini <cmoschini@myrealbox.com>
Date: Wed, 22 Oct 2003 11:05:13 -0400
To: www-style@w3.org
Message-ID: <1066835113.7f27c6e0cmoschini@myrealbox.com>

Sorry, accidentally sent this only to Daniel.

Daniel Glazman [danielglazman@easyconnect.fr] wrote:
> Hum. I think I yet have to find the difference between
> div.section { xxxxxxx }
> p.section { rule("div.section"); yyyy }
> and
> div.section, p.section { xxxxxx }
> p.section { yyyyy }

Within just 1 file, I agree. However, consider a site that takes advantage of
CSS's "cascade," where there is site.css for everything, articles.css for all
article pages, and, finally some styles in a set of style tags for this specific
article. What if I want the color of the H1's site-wide - no matter what our
site designer sets them to throughout the years - to be the color of my
div.section h3's? Other than going in and changing site.css - which is just no
good - I cannot make this step from one set of definitions to another.

There is also something to be said for organization within 1 file. It's common
to see a CSS file broken into sections, relative to the sections of *ML it's
meant to style. Although it's true the comma syntax lets you group some set of
rules into one, it forces you to place sets of ids and classes from distinct
sections into one part of the CSS. The result is a much more difficult to read
CSS file, especially when you want to know why your article links are turning up
chartreuse when you expected red.

-Chris "SoopahMan" Moschini
Received on Wednesday, 22 October 2003 11:05:13 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:09 UTC