Subject of Selector + Child Combinator
Removed from specification
The subject of a selector with child combinator allows you to determine the subject. By default, the subject of a selector is the element represented by the last compound selector in the selector But in level 4 selectors, you can explicitly identify the subject by prepending an exclamation mark (!) to one of the compound selectors in a selector.
Browser Support (tested using latest versions)
Desktop
Mobile
Syntax
!E > F { /* Style properties */ }
Example
/* In this example, any p element with a span child will have have a green background (without the exclamation mark [!], the span element would have a green background). */
!p > span {
background: green;
}
Information is based on Selectors Level 4 - W3C Working Draft (last updated on May 2, 2013)
Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C liability, trademark and document use rules apply.