- From: Hans Meiser <brille1@hotmail.com>
- Date: Thu, 19 May 2005 17:15:06 +0000
- To: www-style@w3.org
>From: Mikko Rantalainen <mikko.rantalainen@peda.net>
>To: www-style@w3.org
>Subject: Re: Suggestion: Inheritance
>Date: Thu, 19 May 2005 15:30:25 +0300
>
>Seems pretty limited to me. Is this any better than a single-pass
>precompiler?
...limited? I guess you don't seem to recognize the full potential of this
simple yet powerful extension to the standard.
It brings unprecedented flexibility and maintainability to CSS, particularly
in multi-client environments where design templates could simply create a
whole new design by just changing some basic rules.
Using values from another rule adds a flexibility which has never been
available in CSS yet. Using it, if you change one design aspect in an
existing web design, from now on you won't have to search and replace any
rule referring to the same aspect. Back-referencing does all the job.
Moreover, back-referencing leverages object oriented design in CSS. Using
back-references it is now possible to design reusable web controls in
libraries and have them integrated in any web page, adapting to the current
design of the hosting page without having the page designer bother with
implementation details of the web control. It's a completely new branch
becoming available to CSS design.
No precompiler can possibly be used or applied in scenarios like these.
>In addition, you'll run into problems because you decided to use CSS
>selector as a key to reference to. For example:
>
>serif, fantasy /* elements 'serif' and 'fantasy' */
>{
> font: "Arial Unicode MS" 1em;
>}
>
>fantasy.font /* special class here */
>{
> font: "Garamond" 1em;
>}
>
>.myspecialclass
>{
> font: serif, fantasy.font; /* is this replaced? */
>}
I suggest we should first basically agree on the advantages of the concept
and accept it. After that we can discuss implementation details like this...
I leave your question to the public. In any way, it doesn't change the
concept at all.
I on my behalf would agree that "fantasy.font" should be replaced. As well
as: "border: 1px solid body.color".
>Or
>
>p
>{
> color: blue;
>}
>
>html:nth-of-type(1) > head + body div > table td > p
>{
> color: red;
>}
>
>html:nth-of-type(1) > head + body div > table td > ul > li
>{
> color: html:nth-of-type(1) > head + body div > table td > p.color; /* is
>this supposed to work to get red instead of blue? */
>}
Same.
>It may be pretty easy to implement but if it has no power over a
>single-pass precompiler, it's not worth it.
Now, this is *your* perspective... I see much more potential in it.
Back-referencing should be added to the standard so that it can be applied
everywhere, on the fly, without compilation. It has minimum performance
issues but maximum gain. - It belongs to the standard.
Axel Dahmen
Received on Thursday, 19 May 2005 17:17:21 UTC