- From: Morten Stenshorne <mstensho@opera.com>
- Date: Tue, 15 Oct 2013 19:43:11 +0200
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: www-style list <www-style@w3.org>
"Tab Atkins Jr." <jackalmage@gmail.com> writes: > Per our design patterns for CSS properties (apparently not written > down anywhere, unfortunately*), we don't use open continuous > intervals, because then whether something is valid or invalid depends > on unpredictable and UA-specific rounding behavior. > > However, 'column-width' states that its value must be a <length> > greater than zero. This violates that constraint. > > I suggest that we instead state that there is a minimum size for > columns (1px? ua-specific?), and that values less than this minimum > are clamped to the minimum. Values less than zero are still invalid, > as they're nonsensical. As far as I know, the only reason to disallow column-width:0 is to avoid an infinite used column-count, e.g. "column-width:0; column-gap:0; width:1000px;". So a minimum size seems necessary (I have no better suggestion, at least). It could be 1px. But I suppose 0.1px, 1em or 1mm are good candidates as well. :-P Are there similar problems in other specs, and are there any solutions out there already that can be of inspiration? There's a similar issue if you combine paged or fragmented overflow [1] with zero height. You'd get an infinite page count. And, in fact, you have the exact same problem with multicol here. If the multicol container height is 0 (or, more accurately, if column height ends up as 0), you get an infinite number of columns (actual column-count). In the implementations I've been working on, I've typically forced a minimum height of 1px. That way at least you avoid an _infinite_ number of columns/pages, but you sure still get an _insane_ number of columns/pages, and really silly layout too. [1] http://dev.w3.org/csswg/css-overflow-3/#overflow-properties -- ---- Morten Stenshorne, developer, Opera Software ASA ---- ------------------ http://www.opera.com/ -----------------
Received on Tuesday, 15 October 2013 17:43:16 UTC