- From: Tom Potts <karaken12@gmail.com>
- Date: Tue, 21 Jul 2015 13:02:27 +0100
- To: CSS WG <www-style@w3.org>
- Message-ID: <CAF2aeH2v_g6XwpyNvuF67aNa0bvqRNAHu8F5cK8cC1KQZejwHg@mail.gmail.com>
While I think the definition of shape-margin is pretty intuitive, I don't think it's rigorous enough for use in odd corner cases. It relies on the definition of "perpendicular" (which doesn't work for corners, so you have to add a special case), and also on a direction "outward" from the shape, which is awkward for cases of self-intersection. I suggest something like the following: """ The shape-margin property adds a margin to a shape-outside. This defines a new shape, defined as the path enclosing the smallest area that includes all the points that are closer than the shape-margin distance from a point inside the underlying shape. This property takes only non-negative values. """ This relies only on the concept of distance and "inside" the shape, which is well-defined (and may depend on the value of the fill-rule property). It could then be followed with an explanatory note with something similar to the current wording (including the shrink-wrap bit, I think that's a great analogy!), as that's probably simpler to understand and would apply to 99% of cases anyway. I realise this definition is a bit harder to follow (although I'm sure the wording I've suggested can be improved) but I think it's important we get this right now so we can re-use the definition in later levels. Technical notes: - There's no need to specify points closer than *or equal to* the shape-margin distance; the path which encloses all such points must include their limit anyway. Whether it's clearer or not to include that wording is another matter. :-) - We could just say "points that are closer than the shape-margin distance *from the underlying shape*", as the usual definition of distance from a shape is the infimum of the distance from the points in it anyway, but I think it's actually clearer to spell it out like this. - This definition clarifies the status of infinitely thin spurs: since they do no enclose any points, they do not contribute to the margin. Thanks, Tom
Received on Tuesday, 21 July 2015 12:04:32 UTC