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

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -