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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 9 Oct 2013 14:38:27 -0700
Message-ID: <CAAWBYDBkOB8FEXWke=kteqMh3RKZ7yTGGzEE=sk8Sjbo-PJkDw@mail.gmail.com>
To: Lev Solntsev <greli@mail.ru>
Cc: Alan Stearns <stearns@adobe.com>, www-style <www-style@w3.org>
On Wed, Oct 9, 2013 at 2:22 PM, Lev Solntsev <greli@mail.ru> wrote:
> 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.

You can do that without the <position> syntax - just use calc().  20px
from the right edge is "calc(100% - 20px)".  The <position> syntax
makes this more convenient/readable, but the only difference in
ability is the functionality of percentages.

> 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.

Either is possibly what the author intended, which is why we should
allow both.  Alan's proposal does that.

For example, if you're doing something clever from script with
clipping/masking/shaping/etc, it's probably easier to use the
SVG-inspired syntax.  If using them in static CSS, the CSS-inspired
syntax is probably easier.

~TJ
Received on Wednesday, 9 October 2013 21:39:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:03 UTC