W3C home > Mailing lists > Public > www-style@w3.org > February 2016

Re: box-shadow offset when transform:rotate is used

From: Christian Mayer <mail@ChristianMayer.de>
Date: Fri, 19 Feb 2016 15:40:58 +0100
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
Message-ID: <56C7297A.5070304@ChristianMayer.de>
Am 19.02.2016 um 08:39 schrieb Tab Atkins Jr.:
> I share Xidorn's concern about this being fairly complicated.  But
> more importantly, it's *incomplete* - your suggestion handles
> rotations, but not skews or anything 3d.  (Scale, and translation as
> you point out, don't need to be "handled", at least on their own. When
> combined with other things, though, they do.)

Once you change the meaning of the shadow parameters from "before
transform" to "after transform" (3D guys would talk about object and
screen coordinates) it's obvious that it would handle all possible
transforms, including scaling and skews - even 3D transformations.

> If handling just the rotation is fine, though, then the nearish future
> with variables and custom functions will help in handling this -
> someone can write a custom function to translate a length+angle into
> two axis-aligned offsets, and then you can use a custom property to
> share the rotation value between the box-shadow and the transform
> without having to duplicate them.

This would be a work around, a bit nicer than what I have to use at the
moment. But for a wide audience probably still too complicated for
beeing a simple task.

Chris
Received on Friday, 19 February 2016 14:41:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:00 UTC