Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update child.html #128

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Update child.html #128

wants to merge 2 commits into from

Conversation

ertyertyerty
Copy link

@ertyertyerty ertyertyerty commented Mar 29, 2023

The example could be improved. While fiddling with the 'border-top' field, changing it to 'border-left' or 'border-right' created a border that ran past ALL four link fields instead of just the first two. Changing it to 'border-bottom' created a border under the first and fourth link fields. Changing 'border-top: 5px solid red;' to a simple 'color: red;' resulted in ALL four links turning red. This is because the '<ol>' section is within the second '<li>' field, which itself is a direct child of '<ul>'.

I think a better example would not have the '<ol>' section nested within the second link, but rather nested within the '<ul>' section itself; and use a simple 'color: red;' styling. Then, removing the '>' demonstrates child combinator vs descendant combinator. And fiddling is simplified.

If this commit is accepted, slight changes will also be needed to the text in:
'en-US/docs/Learn/CSS/Building_blocks/Selectors/Combinators'

ertyertyerty and others added 2 commits March 29, 2023 02:14
The example could be improved.  While fiddling with the 'border-top' field, changing it to 'border-left' or 'border-right' created a border that ran past ALL four link fields.  Changing it to 'border-bottom' created lines under the first and fourth link fields.  Changing 'border-top: 5px solid red;' to a simple 'color: red;' resulted in ALL four links turning red.  This is because the '<ol>' section is within the second '<li>' field, which itself is a direct child of '<ul>'.  

I think a better example would not have the '<ol>' section nested within the second link of the '<ul>' section, and use a simple 'color: red;' styling.  Then, removing the '>' demonstrates direct children vs all children.  And fiddling is simplified.
Copy link

github-actions bot commented Mar 7, 2024

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle Issues and pull requests with no activity for three months. merge conflicts 🚧
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants