Re: [css3-values] Invalid URI and IRI

On Thu, May 17, 2012 at 3:12 AM, Simon Sapin <simon.sapin@kozea.fr> wrote:
> There are multiple definitions of what is a valid URL/URI/IRI:

I would love to have a single good reference that matches reality.  I
know the RFC we currently point to doesn't fit that definition.  I'm
hoping the URL spec from abarth will.

> 1. Make the value and thus the declaration/rule invalid. The cascade does
> its usual fallback. Just like only some HASH tokens are valid hexadecimal
> <color> values, only some URI tokens would be valid <url> values.
>
> 2. Have them resolve to an invalid URI that always fails to be fetched. As
> with an HTTP 404 error, other fallbacks occur (list-style-type is used
> instead of list-style-image, ...)
>
> 3. Make sure that all Unicode strings are parsable/valid. (I don’t know if
> this is doable *or* a good idea.)

#1 isn't doable - URLs are a potentially moving target.  I'm fine with
not checking their validity at parse-time.

#2 is great.  We just need an "always-invalid URL" to resolve it to,
like "about:invalid" or something.

#3 isn't doable - CSS doesn't need to get into the game of defining
what's a valid URL.  All Unicode strings should be valid
*syntactically* in CSS, but they may or may not represent a valid URL
that actually makes a request.

~TJ

Received on Thursday, 17 May 2012 15:15:32 UTC