Re: [css-values] Base URL for relative url()

On 01/29/2014 12:09 PM, Simon Sapin wrote:
> Hi,
>
> CSS Values and Units define, for url()
>
>> For CSS style sheets, the base URI is that of the style sheet, not
>> that of the source document.
>
> It should make sure to define the base URL in all cases where url() can appear.
>
> In particular, style attributes are not stylesheets.

That's handled here: http://www.w3.org/TR/css-style-attr/#interpret

> <style> elements are stylesheets, but don’t "have" an URL
> of their own.

The fact that they share a URL with the source document
doesn't mean they don't have a URL, but you're right this
point could use clarification. It now reads

   # For CSS style sheets, the base URI is that of the style
   # sheet itself, not that of the styled source document.
   # Style sheets embedded within a document have the base URL
   # associated with their container.

> Finally, let’s make sure this is all well-defined in cases
> the base URL changes dynamically.

That's handled by CSS specs generally lack of statefulness.
We don't say that, for example, the root element's width
has to be updated when the viewport size changes. It just
is always XYZ calculation wrt the viewport.

(I *absolutely object* to changing that about CSS specs, btw.
We'd have to qualify every sentence with "And if that changes,
don't forget to recalculate." Which is dumb.)

~fantasai

Received on Thursday, 6 March 2014 05:02:31 UTC