css-diner icon indicating copy to clipboard operation
css-diner copied to clipboard

How to do 16.

Open waldemarmozola16 opened this issue 8 years ago • 12 comments

I can not do 16 level. I wrote apple, plate:only-child. It doesn't works. What is correct form.

waldemarmozola16 avatar Nov 21 '17 10:11 waldemarmozola16

With the selector

plate:only-child

you are selecting the plates that are the only child of their parents.

The solution for that level is

plate > :only-child

to remove the children of plate that are single children.

cgosorio avatar Nov 21 '17 11:11 cgosorio

Thanks.

waldemarmozola16 avatar Nov 21 '17 16:11 waldemarmozola16

This was a nice tutorial. When I got to this, I used

plate pickle:only-child, apple:only-child

My question is why didn't this work? plate apple:only-child, pickle:only-child

minoseah629 avatar Dec 28 '17 02:12 minoseah629

Your first selector

plate pickle:only-child, apple:only-child

works in level 16.

But with your second selector

plate apple:only-child, pickle:only-child

you are selecting also de pickle on the bento

cgosorio avatar Dec 28 '17 08:12 cgosorio

I found that this works too...


plate apple, plate pickle


Of course, it does not use the first-child.

mrkarthik3 avatar Aug 02 '19 08:08 mrkarthik3

I can not do 16 level. I wrote apple, plate:only-child. It doesn't works. What is correct form.

After I read the MDN about :only-child, I know the reason why plate:only-child doesn't works is that :only-child need a spacing before. plate :only-child is correct.

Liqiuyue9597 avatar Nov 18 '19 02:11 Liqiuyue9597

plate *:only-child

this also work but is this the correct way of doing it?

rvpn avatar May 02 '21 23:05 rvpn

plate apple,pickle:only-child why it's not working

Ivickysingh avatar Oct 01 '21 19:10 Ivickysingh

plate apple,pickle:only-child why it's not working

Because a pickle is also the only-child of a bento. So you end up selecting those 2.

smnarnold avatar Oct 01 '21 19:10 smnarnold

My answer is plate apple:only-child, plate pickle:only-child And it's working.

wondermini avatar Jul 10 '22 08:07 wondermini

and you can write: "plate>apple, plate>pinckle" === "plate>:only-child"

kbatyrbayev avatar Aug 24 '22 12:08 kbatyrbayev

My answer is: plate [SPACE] :only-child. Leave a blank space between "plate" and ":only-child"

asirheras avatar Nov 03 '22 09:11 asirheras