W3C home > Mailing lists > Public > www-style@w3.org > April 2016

Re: [css-values] url(#frag) handling when base url changes

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 28 Apr 2016 16:52:28 -0700
Message-ID: <CAAWBYDDRFt0kjuuecr9DLC+LrSXCns9fncMavUcm8h7h6+ckbA@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style list <www-style@w3.org>
On Wed, Mar 23, 2016 at 2:55 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Wed, Mar 23, 2016 at 9:05 AM, fantasai <fantasai.lists@inkedblade.net> wrote:
>> On 03/22/2016 02:55 PM, Simon Pieters wrote:
>>> On Tue, 22 Mar 2016 18:52:35 +0100, Tab Atkins Jr. <jackalmage@gmail.com>
>>> wrote:
>>>> On Mon, Mar 21, 2016 at 6:23 PM, fantasai <fantasai.lists@inkedblade.net>
>>>> wrote:
>>>>> I'm.. not 100% clear on what's going on here, but, isn't this handled
>>>>> by the fact that CSS is stateless? It's only a problem if the computed
>>>>> value is cached over the base URL change--and that's a caching problem,
>>>>> not a spec problem.
>>>> CSS is not, in fact, stateless for this issue.  Style-Attr requires
>>>> the URL to be absolutized at parse-time.  Values says URLs are
>>>> absolutized at computed-value time.  The web platform in general is
>>>> not consistent on whether things are "stateless" or not for base-URL
>>>> changes; <img>, for example, does not reload (tho it does change its
>>>> serialization of the src attribute), and this behavior is
>>>> well-specified by HTML.
>>>> I put together a test-case at
>>>> <http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=4017>.
>>> Nice! I had started a simpler test at
>>> http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4018
>>> I think nothing anywhere says to do anything in particular for CSS when
>>> the base URL changes, which probably means that the URLs in CSS shouldn't
>>> be reparsed, right?
>> There's a comment in the spec source saying that hixie intended for dynamic
>> changes to the base URL to not affect style.
>> I'm not sure the rationale why...
> Probably so that things like "background-image: url(image.jpg);" don't
> break when the URL updates, same reason that <img> doesn't dynamically
> reload itself.
> This desire is totally reasonable, just inconsistent (in our current
> handling) with the desire that url(#frag) always refer to the local
> document.  Thus this thread. ^_^

Ping! I'm going to make this change if no one objects.

Received on Thursday, 28 April 2016 23:53:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:02 UTC