TheOdinProject / css-exercises

MIT License
1.67k stars 70.92k forks source link

Bug - Foundations exercise 5: Child combinator wrongly labeled as descendant combinator in solution #558

Closed adamarous closed 5 months ago

adamarous commented 5 months ago

Complete the following REQUIRED checkboxes:

The following checkbox is OPTIONAL:


1. Description of the Bug:

In the solution for the exercise, there's a few options listed as alternatives to the descendant combinator. It's' basically a mix-and-match of classes and type selectors. But there's an option that isn't actually a descendant combinator, but a child combinator. This is the div > p option. According to MDN, it is not a descendant combinator, and it actually enforces stricter inheritance between parent and child element relationships.

2. How To Reproduce:

Look through the foundations/05-descendant-combinator/solution/solution.css, and compare with https://developer.mozilla.org/en-US/docs/Web/CSS/Child_combinator and https://developer.mozilla.org/en-US/docs/Web/CSS/Descendant_combinator.

3. Expected Behavior:

For either the solution not to include the child combinator itself as an alternative descendant combinator, or to possibly include another link in the corresponding TOP page, this being Intro to CSS, as an Additional Resource to know more about other combinators, considering the lesson itself does mention their existence but doesn't go into any further details.

4. Desktop/Device:

5. Additional Information:

None.

ManonLef commented 5 months ago

good catch, I agree we should leave the child combinator option out and will open this up for someone to work on since you haven't indicated you'd like to pick it up. Thank you!

incandesc3nce commented 5 months ago

I would like to pick this up. Will open pull request in a few minutes.