- From: Rune Lillesveen <rune@opera.com>
- Date: Thu, 02 May 2013 13:43:54 +0200
- To: "www-style list" <www-style@w3.org>
- Cc: "Simon Pieters" <simonp@opera.com>
Hi. There are two related issues about zero widths/heights in @viewport reported by me[1] and Simon Pieters[2]. I'd like to resolve these issues by allowing zero lengths for <viewport-length>s, both for descriptor values and resolved/used values. Rationale: 1. It's already possible to get zero-length widths and heights for viewports established by iframes. 2. Range checking[3] for calc() requires a closed interval value range. The current range is open. Realizing that even initial viewports can have 0 lengths for width and height (in particular through iframes), means the spec should say something about potential division-by-zero in the constraining procedure. Also, for the sake of range checking of calc(), I'd like to change to allow 0 values for the various *zoom descriptor values. In practice, a UA will have a lower limit on the used value for zoom, so I don't think this change will mean anything in practice. Proposed changes: 1. Change all requirements for lengths in descriptors from "positive" to "non-negative". 2. Change all requirements for zoom factors in descriptors from "positive" to "non-negative". To avoid division-by-zero problems in the constraining procedure: 3. Change: "7. If width is ‘auto’, set width = height * (initial-width / initial-height)" to: "7. If width is ‘auto’, set width = height * (initial-width / initial-height), or width = initial-width if initial-height is 0." and change: "8. If height is ‘auto’, set height = width * (initial-height / initial-width)" to: "8. If height is ‘auto’, set height = width * (initial-height / initial-width), or height = initial-height if initial-width is 0." Issue [2] is about my test-suite checking for non-zero used values of viewport lengths. That can be resolved by me changing the test-suite. [1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=21782 [2] https://www.w3.org/Bugs/Public/show_bug.cgi?id=20289 [3] http://dev.w3.org/csswg/css-values/#calc-range -- Rune Lillesveen
Received on Thursday, 2 May 2013 11:44:28 UTC