Re: :required validation in CSS3

15.6.2016, 1:38, Benedicte Roussel wrote:

> I have used :required in a HTLM5 form<label for="mail">Votre mail :
> </label><input type="email" name="mail" id="mail" required/>. It was
> understood by the navigators but in the validator instead of writing the
> following in my CSS3:
>
> *:required*
– –
> *I had to write the following in order that my CSS (level3) be validated.*
>
>
> *[required]*

I’m afraid there isn’t any definite published description of exactly 
what the CSS Validator is checking against. But it seems that (possibly 
with some exceptions) it recognizes W3C CSS specifications with maturity 
level CR (Candidate Recommendation) or higher.

And as far as I can see, :required is not defined in such documents.
“Selectors Level 4” mentions it, but it’s just a Working Draft and has 
not made much progress (the newest Working Draft is dated 2 May 2013).

> *Could we expect that :required be validated by CSS3 validator in a very
> near future ? Or am I dreaming about it ?*

I wouldn’t expect so. But why would that matter?

There is the simple workaround you mention, using the attribute selector 
[required]. (I wonder whether :required offers any particular benefit 
over it.)

Yucca

Received on Wednesday, 15 June 2016 20:06:37 UTC