Re: [css-variables] CSS Variables are a NEW kind of variable

Property accessors is one of the most commonly requested features in Sass.
We can't add it because we can't know the cascade. Also, there are
complexities with reading individual properties vs compound properties. But
this would provide immense benefit to authors.

I can't speak to whether the internals can support this without introducing
unacceptable performance issues. But it seems to me that the internals of
CSS needn't treat known properties the way they treat variables. It seems
like they could be properly parsed a then converted back into a token
stream at first read access -- so a performance impact would only be levied
on authors who use them.

Chris

On Wed, Jun 13, 2012 at 4:44 PM, L. David Baron <dbaron@dbaron.org> wrote:

> On Wednesday 2012-06-13 16:17 -0700, Chris Eppstein wrote:
> > If it really is a property then make it a property with a -user- prefix
> and
> > then make all properties accessible for read.
>
> That would make declarations of all CSS properties consume more
> memory and take more time to parse, since we'd have to store a token
> stream in addition to the other parsing that needs to happen.
>
> -David
>
> --
> 𝄞   L. David Baron                         http://dbaron.org/   𝄂
> 𝄢   Mozilla                           http://www.mozilla.org/   𝄂
>

Received on Wednesday, 13 June 2012 23:51:51 UTC