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

hii ! what is the issue for the 17 please?

Open myriamnt opened this issue 5 years ago • 13 comments

myriamnt avatar Mar 04 '20 10:03 myriamnt

.small:last-child {} ;)

============== Best regards, Willie S. Ceres (@htmlstrap)

[image: Picture]

On Wed, Mar 4, 2020 at 12:02 PM myriamnt [email protected] wrote:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/flukeout/css-diner/issues/194?email_source=notifications&email_token=AHFJSLFAK6A7RNBOA4VWPDDRFYRKVA5CNFSM4LBBJE5KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ISKAFWQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHFJSLHBCPLFI4SITTIRKZTRFYRKVANCNFSM4LBBJE5A .

ui-coder avatar Mar 04 '20 10:03 ui-coder

tks but i don't understand why it is .small:last-child i have three things small: apple orange and pickle and the last child is just a pickle so where is the small apple on".small:last-child"?

myriamnt avatar Mar 04 '20 14:03 myriamnt

It's :last-child of first element (.fancy) and parent element (.table)

============== Best regards, Willie S. Ceres (@htmlstrap)

[image: Picture]

On Wed, Mar 4, 2020 at 4:20 PM myriamnt [email protected] wrote:

tks but i don't understand why it is .small:last-child i have three things small: apple orange and pickle and the last child is just a pickle so where is the small apple on".small:last-child"?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/flukeout/css-diner/issues/194?email_source=notifications&email_token=AHFJSLCASMO6BU6UMRN6ZYLRFZPTZA5CNFSM4LBBJE5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENYCB2Y#issuecomment-594551019, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHFJSLGPMEMY2POVYYWFK2DRFZPTZANCNFSM4LBBJE5A .

ui-coder avatar Mar 04 '20 14:03 ui-coder

See these specs https://www.w3schools.com/cssref/sel_last-child.asp https://css-tricks.com/almanac/selectors/l/last-child/

Have fun ;)

htmlstrap avatar Mar 05 '20 14:03 htmlstrap

I guess the orange tag without small class that should be selected, should not it?

This is the practice code linked by following url. https://codepen.io/fwt0209/pen/KKdjKBG

fwt0209 avatar May 28 '20 04:05 fwt0209

It's .small:last-child Have a good one.

Best regards, Willie S. Ceres (@htmlstrap)

[image: Picture]

On Thu, May 28, 2020 at 7:02 AM fwt0209 [email protected] wrote:

I guess the orange tag without small class that should be selected, should not it?

This is the practice code linked by following url. https://codepen.io/fwt0209/pen/KKdjKBG

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/flukeout/css-diner/issues/194#issuecomment-635083655, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHFJSLHT4Q256BJMZJE2BFDRTXO5HANCNFSM4LBBJE5A .

ui-coder avatar May 28 '20 15:05 ui-coder

Hey there,

I was also a bit confounded by this problem. I ended up getting it to work with a different solution as well:

apple, pickle, orange :last-child

I don't really understand why this worked, but it did lol. Is this a glitch or is there an explanation?

Thanks!

erictessin avatar Jul 03 '20 00:07 erictessin

Hey there,

I was also a bit confounded by this problem. I ended up getting it to work with a different solution as well:

apple, pickle, orange :last-child

I don't really understand why this worked, but it did lol. Is this a glitch or is there an explanation?

Thanks!

I have the same question, please reply

loopsito avatar Sep 23 '20 23:09 loopsito

Hey there, I was also a bit confounded by this problem. I ended up getting it to work with a different solution as well: apple, pickle, orange :last-child I don't really understand why this worked, but it did lol. Is this a glitch or is there an explanation? Thanks!

I have the same question, please reply

Hi Eric and Loopsito, My understanding of the :last-child is that it will select whatever you put before the : if it is the last child of its parent element.

Refer to Q17's HTML apple is the last-child of the fist pickle is the last-child of the outer

orange is the last:child of second

You can delete orange, it works the same. Something like below:

apple, pickle:last-child

galaxy-dot avatar Nov 02 '20 03:11 galaxy-dot

This app is so bugged

diegoALCE95 avatar Nov 02 '20 06:11 diegoALCE95

apple, pickle:last-child

rvpn avatar May 02 '21 23:05 rvpn

Hello

For me the problem was to understand the question : Select the small apple and the pickle OK the solution is simple : apple,pickle

The question would be : Select the small apple and the small pickle In that case, we understand we need to select all "small" items, and find a way to avoid the small orange. And so : .small:last-child

fredjay avatar Feb 12 '22 08:02 fredjay

apple, pickle, orange :last-child

The app obviously takes your input and calls querySelectorAll with it, then compares the result with a list of "expected items". If they match, your input is considered good, even if it doesn't use the lesson content.

That's why apple, pickle works at all. The purpose of the lesson was the :last-child pseudo class.

And orange :last-child selects nothing, because there's a space between orange and :last-child, and the markup contains no orange with a child element.

Rolf-B avatar Jun 20 '22 09:06 Rolf-B