W3C home > Mailing lists > Public > www-style@w3.org > July 2015

[css-snappoints] repeat(calc(<value>)) clamping behaviour

From: Majid Valipour <majidvp@chromium.org>
Date: Thu, 02 Jul 2015 15:24:42 +0000
Message-ID: <CAB8RdXseyXPDF+6nN7OB-d9kCOwznQhsQCqKGa5XBp1nabtEkw@mail.gmail.com>
To: "www-style@w3.org list" <www-style@w3.org>
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?

Majid

[1] http://dev.w3.org/csswg/css-values/#calc-range
Received on Thursday, 2 July 2015 15:25:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:18 UTC