Ian Hickson p { background: red; color: yellow; } p:not(#other).class:not(.fail).test#id#id { background: green; color: white; } div { background: green; color: white; } div:not(#theid).class:not(.fail).test#theid#theid { background: red; color: yellow; } div:not(#other).notclass:not(.fail).test#theid#theid { background: red; color: yellow; } div:not(#other).class:not(.test).test#theid#theid { background: red; color: yellow; } div:not(#other).class:not(.fail).nottest#theid#theid { background: red; color: yellow; } div:not(#other).class:not(.fail).nottest#theid#other { background: red; color: yellow; }

This line should be green.

This line should be green.