- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 6 Jul 2015 14:03:12 -0700
- To: Majid Valipour <majidvp@chromium.org>
- Cc: "www-style@w3.org list" <www-style@w3.org>
On Thu, Jul 2, 2015 at 8:24 AM, Majid Valipour <majidvp@chromium.org> wrote: > According to snap points spec, repeat(<length>) only allows positive length > values. This is reasonable because negative or zero length values do not > make sense as a repeat value. > > At the same time, length can be a calc in which case according to CSS Values > spec[1] its range should be a closed one which is at odds with the open > range that 'positive' implies. > > For example, what is the expected behaviour for: > repeat(calc(-10%)) > repeat(calc(10px - 10%)) /* can be positive or negative depending on size */ > > Perhaps we can allow 0 in repeat but make it a no-op? Yes, this should use strategy #1 from <https://wiki.csswg.org/spec/limited-ranges>, and define a minimum value (or say that there is a UA-specific minimum value). I'd be fine with a minimum of 1px. (Now that you mention it, *every* usage of "positive (or non-negative) length or you're invalid" in CSS has to be handled, actually. With calc(), you can't always tell that it's non-negative until layout time, so you can't just assume that every value that survives is definitely non-negative.) ~TJ
Received on Monday, 6 July 2015 21:04:01 UTC