RE: [css3] Suggestion: Selector variables or "synonyms"

Brad Kemper wrote:

> 
> Try as I might, I can't fathom how my proposed syntax, which is  
> basically a way of creating and using placeholders for CSS text,  
> could possibly have any compromising effect on user !important rules.  
> Once the UA expanded the placeholders into the text they contained,  
> they would be no different from any other text the author puts into  
> his or her style sheets. Perhaps you could explain more, or perhaps  
> you misunderstood my proposal?


This basically illustrate to core problem. CSS should not be changed to allow for the handling of inconsistency's in HTML (or other languages) coding. CSS should be developed in a way that what it is meant to style is properly coded Semantic HTML. Changing CSS to accommodate a problem that solely rest in the arena of HTML is wrong.

In saying this the concept of a placeholder in CSS has lost me completely.

If say two sets of HTML templates are used on the same site. One has it main navigation in a div #navigation. The other template has it main navigation in a div #menu. CSS can accommodate this by having a more cumbersome group selectors.

#navigation ul, #main ul {}

or having to sets of CSS for variations in styling of the navigation

#navigation ul {)

#main ul {}


Now to say #navigation equals #main is changing CSS to solve a HTML coding problem. CSS I think should be designed to style code, not to style and cope with code inconsistency's. Some of the problems I see.

1. No interoperability between non supporting UA and supporting UA.
2. Circular references with a whole new set of rules that need to be developed for handling of possible circular references.
3. Import rules, cascading rules and important rules and rules that need to be developed for handling them.


I did like one part of Jens' proposal. I will repeat it.

@rule #navigation = (nav) {
  ul { list-style: none }
  li { list-style: none; float: left; }
  a { display: block; width: 7em; }
  /* etc */
}

#navigation has a specificity of 100 and everything within the @rule block also has this extra specificity of 100. Since #navigation = (nav) the future HTML 5 <nav> also has the same specificity.


Alan

http://css-class.com/

Received on Tuesday, 12 February 2008 03:21:06 UTC