Re: [css-variables] parse-time error handling in uses of variables

|  Since variable values are not explicitly typed, this falls into the
|  problem I described above.  I know your proposal allows an explicit
|  type, but it's not required (and it defaults to typeless), so it's
|  still subject.

I'm unsure why the checking time is combinatorial. I've a vague idea but I 
think my proposal doesn't have the problem I think about. However, I may 
miss something. Could explain it to me?



|  There is a reason I would refuse that possibility, if it's low value
|  and confusing.  ^_^

Granted ;-) I'm conscient you are not forced to, but if you accept my 
philosophy and try to define a broad (token stream) reference concept, you 
need to encompass everything included in attribute references as well. I 
think there's a clear added value to support type enforcers for attributes 
so there's one for references in general. Also, this is a life saver in 
cases like web components where you want to be able to specify a default 
value (different from 'initial') in the case the cascaded value of a custom 
property doesn't match the intended type.

    width: get(host x-sidebar-width | length | 50%)

or when you want to support (for legacy reason) another format

    width:
        get(
            host x-sidebar-width | length |
            calc(
                get(host x-sidebar-width | number | 0.5)
                * 100%
            )
        )
    ; 

Received on Saturday, 8 December 2012 16:33:48 UTC