css - Get SVG child element width in scss -
given html svg shapes:
<svg id="shapes"... <g id="myshape" class="myclass"> <g> <path fill="#e9eef1"...
and output css scss:
svg g { -moz-transform-origin: 50% 50%; -ms-transform-origin: 50% 50%; -webkit-transform-origin: 50% 50%; transform-origin: 50% 50%; }
how svg child shape width (in pixels) css?
i'm able javascript:
var shape = document.getelementbyid('myshape'); console.log(shape.getbbox());
but need rotate svg child shape using transform-origin
. using @include transform-origin(50%);
, cannot use 50% chrome , firefox interpret % differently. need width of svg shape css can transform it.
Comments
Post a Comment