I'm still learning how to work with SVGs, so I appreciate your patience as I ask what may seem like a simple question.
Currently, I have an SVG image that resembles a cake shape. See it here: https://i.sstatic.net/tDhUL.png
Take a look at the code:
<svg version="1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px" y="0px"
viewBox="0 0 142 66" enable-background="new 0 0 142 66" xml:space="preserve">
<linearGradient id="XMLID_115_" gradientUnits="userSpaceOnUse" x1="2e-6" y1="42" x2="142" y2="42">
<stop offset="0" style="stop-color:#F8E8B9"/>
<stop offset="50%" style="stop-color:#E6C173"/>
<stop offset="100%" style="stop-color:#F8E8B9"/>
</linearGradient>
<!-- Side of Cake -->
<path id="XMLID_1_" opacity="1" fill="url(#XMLID_115_)" d="M0,48C0,58,32,66,71,66s71-8,71-18V18
c0,10-32,18-71,18S0,27,0,18L0,48z"/>
<g id="XMLID_5_">
<linearGradient id="XMLID_116_" gradientUnits="userSpaceOnUse" x1="71" y1="35" x2="71" y2="9e-13">
<stop offset="0" style="stop-color:#E6C173;stop-opacity:1"/>
<stop offset="1" style="stop-color:#F8E8B9"/>
</linearGradient>
<!-- Top of Cake -->
<ellipse id="XMLID_4_" opacity="1" fill="url(#XMLID_116_)" cx="71" cy="18" rx="71" ry="18"/>
</g>
</svg>
This SVG was designed and exported using Illustrator.
The goal is to reduce the width of the cake shape while maintaining its height. Whether through JavaScript, CSS, or any other means, I want the cakes to stack up but visually remain the same.
My understanding is that adjusting the length of the cake side path (as labeled in comments) should achieve this effect, but I haven't been successful in finding a method to do so. It's possible that my approach is completely off base!
I've created a quick jsfiddle incorporating the CSS solution provided below.