[selectors4] feedback

Hello w3.

I believe that it would be beneficial for a selector similar to :blank & :empty to be added...

This selector would include elements with content that are not visible (for example through display:none)

It is worth noting that this could be used to style the parent of an element - without any concerns over abuse;

<ul>
<li><a href="bad link">invalid</a></li>
<li><a href="./valid.html">valid</a></li>
</ul>

With the following styles:

a[href="bad link"] { display:none; }
li:nodisplay { display:none; }

Where :nodisplay is a temporary name simply to illustrate it.

In this case the link would be set to display:none and subsequently as there are no more visible elements in its parent element, the parent would also be hidden.

The performance in this case should be minimally affected as whenever a single child is found to have visible content, it returns false.

>From Gareth Light.

Received on Wednesday, 31 August 2016 13:49:21 UTC