- From: Mike Wilson <mikewse@hotmail.com>
- Date: Thu, 25 Sep 2008 07:43:44 +0200
- To: "'Andrew Fedoniouk'" <news@terrainformatica.com>
- Cc: <www-style@w3.org>
Andrew,
> We've found that natural constants first-seen-first-used approach
> works just well. For example:
You suggested the same thing back in June and it was discussed here:
http://www.nabble.com/WebKit-now-supports-CSS-Variables-td18076178i60.html#a
18162114
or
http://lists.w3.org/Archives/Public/www-style/2008Jun/0351.html
..
and I agree with the other posters at that time that it would be
confusing to have "first rule overrides later rules" for
variables/constants when the rest of CSS uses "last rule overrides
earlier rules".
Best regards
Mike Wilson
> -----Original Message-----
> From: www-style-request@w3.org
> [mailto:www-style-request@w3.org] On Behalf Of Andrew Fedoniouk
> Sent: den 25 september 2008 05:58
> To: fantasai
> Cc: L. David Baron; Mike Wilson; 'Daniel Glazman'; www-style@w3.org
> Subject: Re: [Css Variables] Variable Declaration Blocks
>
>
> fantasai wrote:
> >
> >
> > This was as far as I got Friday afternoon at the F2F:
> > http://fantasai.inkedblade.net/style/specs/constants/
> >
> > It's not very complete, but I think it captures the important points
> > in the discussion.
> >
> >
>
> fantasai, could you explain the intention of these constructions:
>
> @style name
> {
> property: value;
> property: value;
> }
> @import constants "corporate-colors.css";
>
> ?
>
> And what is the purpose of having constants "overridden by a later
> declaration"? (that is from "Scoping of Named Constants" section)
>
> We've found that natural constants first-seen-first-used approach
> works just well. For example:
>
> --- main.css ---
>
> @value CORPORATE_BACK #ffeedd url(corp.png) repeat;
> @import "module-a.css";
> @import "module-b.css";
>
> --- module-a.css ---
> @value CORPORATE_BACK red; /* fall back value if it was
> not defined before */
>
> div { background: @CORPORATE_BACK; }
> ---
>
> This way module-a.css could work in standalone mode and as an
> inclusion
> in some other main.css.
>
> Motivation of this approach: any style sheet that uses constants
> has to declare constants used inside. By assigning fall-back values
> designer may e.g. discover missed declarations, etc.
>
> --
> Andrew Fedoniouk.
>
> http://terrainformatica.com
>
>
Received on Thursday, 25 September 2008 05:44:41 UTC