W3C home > Mailing lists > Public > www-style@w3.org > October 2013

Re: [css-shapes] how to position <basic-shape>s

From: Lev Solntsev <greli@mail.ru>
Date: Thu, 10 Oct 2013 01:22:46 +0400
To: "Alan Stearns" <stearns@adobe.com>
Cc: www-style <www-style@w3.org>
Message-ID: <op.w4phn8z939dhqv@lev-pc>
While compatibility is good thing to concern, background-position syntax
gives more possibilities. An element can be positioned from the bottom
right corner. Also it's good for i18n—positioning from the right edge
is an usual case in RTL-manner styling.

And why did you decided that one expects the bottom right corner and
not centering? I think, 50%-ish is a good way for centering in CSS.

Alan Stearns <stearns@adobe.com> писал(а) в своём письме Wed, 09 Oct 2013  
22:33:35 +0400:

> Hey all,
> The current editor's draft of shapes defines <basic-shape> functions that
> take their position arguments from SVG basic shapes. This means that
> there's just a basic x,y for positioning. CSS has additional positioning
> mechanisms, and it would be good to support these. It would also be good
> to be compatible with SVG, as <basic-shape> is used there as well.
> So far there are two proposals that can (to some extent) accommodate both
> requirements. It may be possible to go forward with both proposals if  
> they are both deemed worthy.
> 1. The first proposal is to introduce a new shape() function that would
> use CSS positioning (and other syntax) exclusively. It would use radial
> gradient syntax to define circles and ellipses, and we would define how  
> to
> express rounded rectangles and possibly polygons in the shape() function
> with future extensions. So you could any of these to express a centered,
> 10px radius circle:
> circle (50% 50% 10px)
> shape (circle 10px at 50% 50%)
> shape (circle 10px)
> 2. The second proposal is to adapt some of the current functions for
> future CSS position extensions. So the circle() function would become
> circle (10px at 50% 50%)
> And a square covering the top left corner would change from this
> rectangle (0px 0px 50% 50%) /* x y w h */
> To this
> rectangle (50% 50% at 0px 0px) /* w h at x y */
> [...snipped...]
> Given the percentage issue, my recommendation is to go with the first
> proposal, which allows us to get both CSS and SVG compatibility. We can
> either define shape() in level 2, or allow shape() with circles and
> ellipses in level 1 and extend the shape() keywords to rectangle and
> possibly others in level 2. Given that we're currently discussing how to
> amend the <position> value, it may make the most sense to put off all of
> shape() to level 2.
> Thanks,
> Alan
Received on Wednesday, 9 October 2013 21:23:17 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:33 UTC