Sign up | Lost password? | Help

[ advanced search ]

Sunday, 7. March 2004, 22:23:36

hadur

avatar

Posts: 47

CSS: nth-child

CSS3 added the supprt for an nth-child selector. For example, li:nth-child(even) could be used to change the background color of every other line instead of relying on server side css classes or client side javascript hacks. Please add support for this useful selector!

[url]http://www.w3.org/Style/CSS/Test/CSS3/Selectors/20011105/html/static/flat/css3-modsel-28.html

Sunday, 7. March 2004, 22:25:15

Moose

avatar

Posts: 7520

Norway

Opera Software
+1

I wouldn't expect it before 8.0 though :frown:

M.

Sunday, 7. March 2004, 22:40:40

non-troppo

Spinning Top

avatar

Posts: 4657

+1

Considering Opera's great presence in the CSS working groups - I am a bit disappointed that we don't get more CSS3 bits to play with - even IE has more CSS3 support than Opera at the moment! :smile:

Sunday, 7. March 2004, 23:00:32

+1

"nth-child" is VERY useful. :up:

Sunday, 7. March 2004, 23:32:29

Moose

avatar

Posts: 7520

Norway

Opera Software
Oh yeah, useful it is. I could for instance abandon constructs such as these:

#lista li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li+li {...}

M.

Monday, 8. March 2004, 04:02:00

Now why would you want to do that, Moose? :smile:

Monday, 8. March 2004, 04:04:13

Originally posted by non-troppo
Considering Opera's great presence in the CSS working groups - I am a bit disappointed that we don't get more CSS3 bits to play with


Well, I for one am quite happy that they're orking on UI enhancements presently. Some more CSS toys -would- be fun, though. Maybe for the next version? :smile:

Monday, 8. March 2004, 05:45:09

Moose

avatar

Posts: 7520

Norway

Opera Software

Originally posted by MTKnight
Now why would you want to do that, Moose? :smile:



Why??? Cascading Love Sheets, for instance! Any list where list items need to be each differently styled either requires you to add warm s-h-i-t-e to your markup, or use adjacent ladder, or else hope that Øpera will add support for the goody goods soon! My choice goes for the ladder. That is how my Destroy is styled, after all...

M.

Monday, 8. March 2004, 06:53:33

I was being sarcastic..... :smile:

Monday, 8. March 2004, 06:58:00

Moose

avatar

Posts: 7520

Norway

Opera Software
Hehe, you out-ironized a European! 1:0 to you then. :smile:

I am now doing an inaccessible design of a set of pages. And I love it.

M.

Sunday, 8. May 2005, 03:54:38

hadur

avatar

Posts: 47

Little bump :smile:

This would be a very useful selector and would help make Opera more CSS-complete.

Wednesday, 15. February 2006, 14:14:07

Zajec

avatar

Posts: 3909

Poland

What about bump again? ;-)

Topic was created about 2 years ago but Opera still doesn't support nth-child selector. Consider adding this selector in some near build, please.

I've made some example of using this, visit my page http://zajec.no-ip.com/nth-child - it looks wouderful :-)

Thursday, 16. February 2006, 04:42:23

xErath

javascript guru

avatar

Posts: 6403

Norway

Opera Software
:yikes: I didn't knew there was a request this old !!
PLEASE I want this ! this and document.styleSheets:raider:

Originally posted by Zajec:

visit my page http://zajec.no-ip.com/nth-child - it looks wouderful :-)

Nice one ! :smile:

Friday, 17. February 2006, 19:15:26

Zajec

avatar

Posts: 3909

Poland

Originally posted by xErath:

:yikes: I didn't knew there was a request this old !!
PLEASE I want this ! this and document.styleSheets:raider:

Nice to know someone has wishes like mine ;-)


One more argument: We could use this selector to modify existing pages. For example google:
The first result from searching on white background
Second - on yellow background :-)

Saturday, 18. February 2006, 04:48:58

xErath

javascript guru

avatar

Posts: 6403

Norway

Opera Software
I want document.styleSheets so I can use IE7 script to patch Opera with nth-child :lol:
http://dean.edwards.name/IE7/

Thursday, 16. March 2006, 15:20:31

Boris.de

avatar

Posts: 2

++supporters; :smile:

Originally posted by Zajec:

One more argument: We could use this selector to modify existing pages.


With exactly this reason.

Friday, 17. March 2006, 13:58:23

porneL

79% geek, 47% nerd

avatar

Posts: 2604

Originally posted by Moose:

+1
I wouldn't expect it before 8.0 though :frown:
M.


9.0? 10.0? :smile:

Thursday, 23. March 2006, 05:02:30 (edited)

FataL

Opera freak

avatar

Posts: 1302

USA

My +1!

Originally posted by Moose:

WIR?


I hope that's will be 9... but let's wait and see. :wink:
And I think when it will be ready Moose will moosefy opera:config, opera:history and opera:cache CSS with nth-child :idea: :wink:

Thursday, 23. March 2006, 19:50:41

+1, although I guess that implementing CSS selectors is a time-consuming job...

Friday, 24. March 2006, 14:36:44

Fyrd

avatar

Posts: 94

USA

+1, I'm always for new nifty CSS options. Does any other browser support this one yet?

Friday, 24. March 2006, 14:40:25

FataL

Opera freak

avatar

Posts: 1302

USA

Microsoft MSN Explorer for Mac

Friday, 31. March 2006, 11:37:01

catbert303

avatar

Posts: 79

nth-child :yes:
pointless extra classes/ugly chains of + :down:

+1

Tuesday, 18. April 2006, 12:28:19

Zajec

avatar

Posts: 3909

Poland

I remade my nice example ;-) http://zajec.net/test/nth-child

(I have lost my previous version)

Tuesday, 18. April 2006, 12:52:25

serious

a concerned citizen

avatar

Posts: 2332

Austria

+1

Tuesday, 18. April 2006, 23:42:01

FataL

Opera freak

avatar

Posts: 1302

USA

Originally posted by Zajec:

I remade my nice example ;-) http://zajec.net/test/nth-child

That's nice! Waiting for implementation... :wait:

Wednesday, 24. May 2006, 18:13:34

FataL

Opera freak

avatar

Posts: 1302

USA

I have feeling that this CSS 3 selector will not going to be implemented in Opera 9... :frown:
But I think that we can survive since no other browser (except Konqueror and dead MSN for Mac) support it yet... :wink:

Saturday, 23. September 2006, 21:30:17

Zajec

avatar

Posts: 3909

Poland

Originally posted by FataL:

But I think that we can survive since no other browser (except Konqueror and dead MSN for Mac) support it yet...


Maybe... But I really would like to use it in my widgets :/

Friday, 29. December 2006, 22:23:44

Turin

Swam to shore from Atlantis

avatar

Posts: 1123

Beleriand

+1

Saturday, 13. January 2007, 22:25:39

fearphage

Trained Swordsman of Unwanted Opera Termination

avatar

Posts: 2004

USA

It's coming I assume but css3 is not standardized yet. Its coming though I assume. Opera's not doing terrible with selector's this far: http://www.css3.info/selectors-test/test.html

Supported CSS3 selectors (out of 578)
  • ie6: 276
  • ie7: 300
  • Opera (latest 8692): 347
  • ff2: 357


That 347 number hasn't changed in quite a while but I am sure when css3 is done or closer to done it will get added.

EDIT: +1

Tuesday, 8. July 2008, 08:04:59

Ti

♡.. (^_^);

avatar

Posts: 223

France

Hey it seems to work now (Opera 9.51 10081), doesn't it ? :eek:

Tuesday, 8. July 2008, 17:21:24

_Grey_

avatar

Posts: 272

Yes of course. There's been lots of news around Opera supporting the selectors module about one year ago. David Storey even forged a somewhat friendly relationship with the css3.info guys around that time. This request has been met along the way :wink:

Wednesday, 9. July 2008, 11:39:18

Ti

♡.. (^_^);

avatar

Posts: 223

France

Cool! I did not notice this to work with 9.5 but maybe I overlooked it.

FIXED :yes:

Friday, 28. August 2009, 22:33:21

FataL

Opera freak

avatar

Posts: 1302

USA

There are still some issues:

Saturday, 29. August 2009, 07:30:42

serious

a concerned citizen

avatar

Posts: 2332

Austria

Originally posted by FataL:

nth-child(128), 129, 130... doesn't work


omg, good one. seems 128 is too big of a number for the internal representation P:

Sunday, 30. August 2009, 04:01:17 (edited)

_Grey_

avatar

Posts: 272

The second bug especially is going to annoy a lot of people.

Sunday, 30. August 2009, 18:56:36

fearphage

Trained Swordsman of Unwanted Opera Termination

avatar

Posts: 2004

USA

@FataL: have you filed both of those?

Monday, 31. August 2009, 20:30:13

FataL

Opera freak

avatar

Posts: 1302

USA

Originally posted by fearphage:

have you filed both of those?

bug DSK-263338 (nth-child(128), 129, 130... doesn't work)

@fearphage, feel free to submit 2nd one. :smile:

Forums » Opera Community » Opera for desktop » Desktop wish-list