- From: Xidorn Quan <quanxunzhen@gmail.com>
- Date: Fri, 19 Feb 2016 09:25:38 +0800
- To: www-style list <www-style@w3.org>
- Cc: mail@christianmayer.de
On Fri, Feb 19, 2016 at 5:55 AM, Christian Mayer <mail@christianmayer.de> wrote: > Hello all, > > currently the the box-shadow offset is calculated with regard to the > element and then the transform is applied to both, the element and it's > shadow. > > For a transform:translate() this makes mostly sense, but for a > transform:rotate() it usually doesn't: > The box-shadow offset should fake a lighting of the design so it should > always go in the same direction for all elements (ignoring special uses > for special effects). So when a element is rotated by a > transform:rotate() the box-shadow is currently also rotated. > > The only way to show a consistently lighted design is to do the maths > for the inverted rotation yourself and apply that to the box-shadow > offset to compensate the transform:rotate(). > But this will only work on a static design. I guess this is solvable when we have the API for custom properties, and if we support trigonometric functions in calc()... But even if we have both, it still seems to be too complicated for such a simple requirement. Probably we can add some keyword to make specific shadow be applied after transform? - Xidorn
Received on Friday, 19 February 2016 01:26:50 UTC