CSS: Select elements that contain another selector

Posted . Visible to the public.

CSS4 comes with :has Show archive.org snapshot . E.g. h1:has(b) would select all <h1> tags that contain a <b> tag.

This is implemented in no browser Show archive.org snapshot but the jQuery query engine already supports it Show archive.org snapshot as a custom extension.

Henning Koch
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2015-12-15 16:30)