CSS selectors level 4 introduces a :has() pseudo class, but it isn't out there and even when it is it will (initially at least) only be supported in the "complete profile" - meaning it will work via querySelectorAll and friends, but not CSS itself.
If you only, need this in script, jQuery has had :has from the beginning (it was a proposal from CSS3 a decade and a half ago), and if you need it in CSS you might have a look at hitchjs which has it On May 16, 2014 5:53 AM, "BPJ" <b...@melroch.se> wrote: > is it possible to select an element based on the presence or absence of a > descendant with some attribute? > > /bpj > ______________________________________________________________________ > css-discuss [css-d@lists.css-discuss.org] > http://www.css-discuss.org/mailman/listinfo/css-d > List wiki/FAQ -- http://css-discuss.incutio.com/ > List policies -- http://css-discuss.org/policies.html > Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ > ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/