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

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