.foo[disabled] { background: blue; } .bar[disabled] foo { background: blue; } foo [disabled].baz { background: blue; }