So based on this : CSS selector structure - CSS: Cascading Style Sheets | MDN
I’m a bit confused which is the anchor and what would be the relative selector in the following examples:
:has(+ div#topic > #reference) {
}
:has(> .icon) {
}
dt:has(+ img) ~ dd {
}
i dont think they specifically mentioned that to exist in that example, here its giving reference how to make use of “:has” in css, if im not mistaken
happy coding
But then why using that as an example? and which would be an example of anchor used in relative selector?
Certain contexts may accept relative selectors, which are a shorthand for selectors that represent elements relative to one or more relative selector anchor elements. Relative selectors begin with a combinator, with a selector representing the anchor element implied at the start of the selector. (If no combinator is present, the descendant combinator is implied.)
According to this there are always anchors in a relative selector