Re: Mirror as background property

On Sat, Aug 29, 2009 at 8:04 PM, David Perrell<davidp@hpaa.com> wrote:
> Hmm, I kinda prefer the more general background-flip I described earlier.

Heh, thought you probably would.  I'm just addressing the use-cases
that I see as most common here.

>But, in any case, what's the need for 4 directions? Mirror-x and mirror-y (and just plain 'mirror' for left-to-right *and* top-to-bottom) is easier to remember. Background-repeat goes top->bottom and left->right, it seems sufficient for mirroring to do the same.

Well, background-repeat is *symmetrical* top-bottom or left-right.
Mirroring isn't - it inherently favors a particular half.  That said,
I don't think it would be particularly bad to just say that it always
takes the left or top, so we could simplify it to just mirror-x and
mirror-y (and plain 'mirror' for the quadrant mirroring).  I suppose
we can do that - it cuts down on the number of keywords, and makes a
nice parallel with background-repeat.

> Background-flip can be useful. Here's a use case:
>
> http://hpaa.com/csstest/bgflipwithgradient.htm
>
> Sure, the effect is commonly done with an image editor, but why not save time plus 50% on image size and do it with CSS? Flipping an image is pretty trivial.

Better would be to do that with Webkit's support for reflections
through -webkit-box-reflect.  I think they plan on speccing that?

~TJ

Received on Sunday, 30 August 2009 14:59:17 UTC