- From: Nicolas Lesbats <nlesbats@etu.utc.fr>
- Date: Tue, 22 Jun 1999 13:13:48 +0200 (MET DST)
- To: Daniel Glazman <Daniel.Glazman@der.edf.fr>
- cc: www-style@w3.org
On Mon, 21 Jun 1999, Daniel Glazman wrote: | > I think that we need a 'base' property, similar to the <base href="..." /> | > element in HTML, which will define on which a relative address is relative | > to (humpf... I think there is grammar mistake in my sentence...). | > | > Don't know if this is necessary for replaced elements : | > | > img { content: replaced(attr(src)); | > base: document-source } | > | > (a url() value always refers to the stylesheet source, not to the | > document source, and this can be a problem) | | Hmmm.. This adds URL management to style sheets. I am absolutely | not in favor of that. Not really. A 'base' property wouldn't be used for defining the <base> element, for instance. I want to say, this property wouldn't have the goal to define what a relative address _in the document_ is relative to. It would only define what a relative URL *used by the stylesheet* is relative to. Who else can do it but the stylesheet itself ? But yes, there are some problems I don't have seen. In fact, this could create backward incompatibility, for instance in the following case : [HTML] <img src="image.gif"> [CSS] img { content: replaced(attr(src)); base: stylesheet-source } For an old browser, image.gif would be relative to the document source (or the document base), not to the stylesheet source... For HTML, the solution is to prohibit the use of a base different of 'document-source', for any URL value ('replaced()' or 'url()') which uses an 'attr()' value. But if you have [CSS] h1:before { content: url("repertory-image.gif"); base: document-source } then the 'base' property is necessary, since the image should change depending on the document source. Note the concept of an image which would be associated to a repertory is not invented for the example. For instance, on the www.organization.org, a repertory is used to place their journal. www.organization.org/journal/ The journal is numbered www.organization.org/journal/1/ www.organisation.org/journal/2/ and each publication deals with a particular theme, which is figured by an image, e.g. coverture.gif www.organization.org/journal/1/coverture.gif www.organization.org/journal/2/coverture.gif Any article of a journal should include the coverture picture in this content, then could use the CSS rule above. Now take the first code in XML [XML] <img src="image.gif" /> Here, the UA doesn't know that image.gif is a URL. This is the CSS stylesheet which will parse the address. Then, I don't see the problem : why couldn't this stylesheet parse the URL relative to the document source as well as to the stylesheet source (or to a given string) ? This doesn't affect the document directly, but this is a necessary tool for it to be properly formatted. If you don't like this, how can we realize the same with another structure ? -- Nicolas Lesbats - nlesbats@etu.utc.fr 85 r. Carnot 60200 Compiegne - France 06 86 800 908 Plaider <http://wwwassos.utc.fr/~plaider/> 3:-)
Received on Tuesday, 22 June 1999 07:13:54 UTC