Re: [css3-values] required ranges for values

On Tue, Apr 17, 2012 at 4:57 PM, Sylvain Galineau
<sylvaing@microsoft.com> wrote:
> [Kang-Hao (Kenny) Lu:]
>> The current draft has this to say
>>
>>   # For repeated component values (indicated by ‘*’, ‘+’, or
>>   # ‘#’), UAs must support at least 30 repetitions of the component.
>>   # If a property value contains more than the supported number of
>>   # repetitions, the declaration must be ignored as if it were invalid.
>>
>>   # UAs must support ‘calc()’ expressions of at least 30 terms, where
>>   # each ‘number’, ‘dimension’, or ‘percentage’ is a term. If a
>>   # ‘calc()’ expression contains more than the supported number of
>>   # terms, it must be treated as if it were invalid.
>>
>> For the number '30', I should note that in my support of the restyling
>> effort[1], I already used about '60' gradients as background. I don't
>> think my example is common but I think it's a valid user case and I don't
>> want my example fail to work just because this mysterious restriction. Is
>> there any evidence that providing a finite number here would help make
>> more conforming user agents? I should note that there's no limit for the
>> size of the CSS document and the number of rules and declarations it could
>> contain.
>
> I missed this change; where does this number come from?
>
>> Having said that, based on testing, calc() in IE9 supports only about 20
>> terms, so... I am willing to trust the data from a Microsoft person here.
>>
>>   # Properties may restrict the percentage value to some range. If the
>>   # value is outside the allowed range, the declaration is invalid and
>>   # must be ignored. For unrestricted values, UAs must support at least
>>   # up to ±2^30%; unsupported values must be clamped to the closest
>>   # supported value.
>>
>> Based on getComputedStyle, IE9 only supports up to 0.01 * 2^31% =
>> 21474836.48%, which is less than 2^30% = 1073741824% . I haven't tested
>> the others, but I don't think we care this too much to the point that we
>> really want to make IE9 non-conforming. I suggest we lower this number for
>> IE.
>
> Likewise, how was this limit chosen?

All of these numbers were pulled out of our ass at one point, because
we hadn't gotten data back from Arron about the limits yet.

We just talked to him, and he said that 2^27-1 for numbers.  He didn't
have a maximum length of lists/components/etc yet.

We'll switch our numbers to 2^27-1.  We'll bring up the other numbers
as a WG issue for people to collect data on their own and report back.

~TJ

Received on Wednesday, 18 April 2012 00:13:08 UTC