[css-grid] Allow clamping the number of repetitions in repeat()

CSS Counter Styles allows UAs to take precautions against small 
stylesheets that could cause high memory usage:

> Some values of system (symbolic, additive) and some descriptors (pad)
> can generate representations with size linear to an author-supplied
> number. This can potentially be abused to generate excessively large
> representations and consume undue amounts of the userís memory or
> even hang their browser. User agents must support representations at
> least 60 Unicode codepoints long, but they may choose to instead use
> the fallback style for representations that would be longer than 60
> codepoints.

CSS Grid should do the same with the repeat() function. Something like: 
when the number of repetitions is more than 1000 (or some other number), 
use 1000 instead.

Mozilla bug on this topic:

Simon Sapin

Received on Wednesday, 26 March 2014 11:28:08 UTC