W3C home > Mailing lists > Public > www-style@w3.org > March 2008

RE: "Selectors that People Actually Use"]

From: Alan Gresley <alan@css-class.com>
Date: Fri, 28 Mar 2008 05:20:39 -0700
To: Boris Zbarsky <bzbarsky@MIT.EDU>
cc: www-style@w3.org
Message-ID: <20080328052039.f8d1e42eb1f8db40312f41775502f7f0.2c87268c48.wbe@email.secureserver.net>

Boris Zbarsky wrote

> > Alan Gresley wrote:
>>
>> You could also have a string of selectors.
>> 
>> div.x, dix.y {} /* legacy style */
>> div[id="x"] {} /* x special style */
>> div[id="y"] {} /* y special style */
>> div[id*=""], div:not([id*=""]) {} /* progressive enhancement general style */
>> 
>> None of that requires *=, though.  And progressive enhancement for what, 
>> exactly?  Trying to lock out browsers that just don't support *= at all?
>> 
>> -Boris


For your information I have now changed.

#wrapper1[id*=""]:not(:first-child) {background: url(../images/backbluegreen2.jpg) right; -webkit-background-size: 20% 100%; -o-background-size:20% 100%; -khtml-background-size:20% 100%;}

to this

#wrapper1:nth-child(5n+3) {background: url(../images/backbluegreen2.jpg) right repeat-y;-webkit-background-size: 20% 100%, 20% 100%;-o-background-size:20% 100%;-khtml-background-size:20% 100%, 20% 100%;}

You have said in another instance that I should just simplify my style. You're saying here that I should not bother using CSS3 when CSS2.1 is good enough. This I will "not" do. 

So what does my #wrapper1:nth-child(5n+3) selector shown above do anyway? It creates a faux column on the right under my sidebar with the honor roll now seen in Safari 3.1 and Opera 9.5 using a image of 148px by 78px in size. If of not mistaken I would be the first person ever (I'm happy to be told otherwise) to have demonstrated this type of faux column approach. It appears shorter here.

http://css-class.com/test/

and longer here.

http://css-class.com/test/bugs/ie/ie-bugs.htm

Safari 3.1 recycles the same image that is used in the background of the menu strip. I'm very sorry Boris but my very simple CSS using structural classes and attribute classes has made my style sheet very simple but not simple for a newbie viewpoint but simple because I don't have this repeated endlessly in my css.

#id #id .class type {}
#id #id .class type {}
#id #id .class type {}

Now I just have to sit back and wait until Gecko and IE play catch up to get to the point that Safari and Opera are at now.

Alan

http://css-class.com/
Received on Friday, 28 March 2008 12:21:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:02 GMT