mdn/css/1_css_building_blocks/04_combinators

04_combinators

dz / mdn / css / 1_css_building_blocks / 04_combinators

Summary

Combinators

Node Tree

Nodes

combinator
content combinator
children child_combinator, combine_other_selectors (description), descendent_combinator, nesting, next_sibling_combinator, subsequent_sibling_combinator

combine_other_selectors
content Combine other selectors
parents combinator

descendent_combinator
content Descendent combinator
children desc_elem_dont_match (child combinator), descendent_combinator_desc (description), descendent_selector, space (notation)
parents combinator

descendent_combinator_desc
content Combines 2 selectors, elements matched by send selector are selected if ancestor matches first selector
parents descendent_combinator

space
content space
parents descendent_combinator

descendent_selector
content Descendent Selector
parents descendent_combinator

child_combinator
content Child Combinator
children child_combinator_desc (description), greater_than (notation)
parents combinator

greater_than
content >
parents child_combinator

child_combinator_desc
content Matches second selector that are drect children of element matched by first selector
children desc_elem_dont_match
parents child_combinator

desc_elem_dont_match
content Descendent Elements don't match
parents descendent_combinator, child_combinator_desc

next_sibling_combinator
content Next-sibling combinator
children next_sibling_combinator_desc (description), plus (notation)
parents combinator

plus
content +
parents next_sibling_combinator

next_sibling_combinator_desc
content Matches second selector that are next-sibling elements of first selector
parents next_sibling_combinator

subsequent_sibling_combinator
content Subsequent sibling combinator
children subsequent_sibling_combinator_desc (description), tilde (notation)
parents combinator

tilde
content ~
parents subsequent_sibling_combinator

subsequent_sibling_combinator_desc
content Selects siblings of element even if they aren't adjacent
parents subsequent_sibling_combinator

nesting
content nesting
children nesting_selector
parents combinator

nesting_selector
content Nesting Selector
children ampersand (notation)
parents nesting

ampersand
content &
parents nesting_selector