Today I tested what happens when you use
getBoundingClientRect() on an SVG element that has been rotated.
The result is that:
Chrome, Safari, Opera, and IE appear to calculate the local (untransformed) bounding box of the element, and then return the client rect for that bounding box. This can result in a client rect larger than seems appropriate.
Firefox, on the other hand, clips the client rect to fit the element itself.
Which behavior is correct according to the specifications?
Non-firefox browsers don't seem to give useful results and don't seem to match the relevant specifications either.
©2020 All rights reserved.