:not
does not support combinator selectors.
If we’re talking about its direct parent:
:not(a) > code
Otherwise there’s no way to do this in CSS. You’ll have to override it:
code {
/* some styles */
}
a code {
/* override previous styles */
}
More Related Contents:
- What does the “>” (greater-than sign) CSS selector mean?
- Is there a CSS selector for elements containing certain text?
- What does the “~” (tilde/squiggle/twiddle) CSS selector mean?
- nth-of-type vs nth-child
- css3 nth of type restricted to class [duplicate]
- ::slotted CSS selector for nested children in shadowDOM slot
- wildcard * in CSS for classes
- nth-child doesn’t respond to class [duplicate]
- Select elements by attribute in CSS
- Nesting CSS classes
- CSS attribute selectors: The rules on quotes (“, ‘ or none?)
- Is the CSS :not() selector supposed to work with distant descendants?
- What is the difference between ‘>’ and a space in CSS selectors?
- Combining :last-child with :not(.class) selector in CSS
- Is there a workaround to make CSS classes with names that start with numbers valid? [duplicate]
- Why can’t you group descendants in a CSS selector?
- Should I use CSS :disabled pseudo-class or [disabled] attribute selector or is it a matter of opinion?
- Not CSS selectors
- What is this CSS selector? [class*=”span”]
- CSS selector (id contains part of text)
- Is there any pros and cons if i use always CSS Class instead CSS ID for everything?
- Is there such a thing as an “all inclusive sibling” CSS selector?
- CSS selector involving pseudo class first-child and dropcap
- Targeting position:sticky elements that are currently in a ‘stuck’ state
- Select odd even child excluding the hidden child
- Is there an opposite CSS pseudo-class to :hover?
- Comma in CSS, multiple selectors using the same CSS
- Correct terms and words for sections and parts of selectors
- Can I target all tags with a single selector?
- What is the difference between pseudo-classes and pseudo-elements?