Okay
  Public Ticket #160254
SVG sizing
Closed

Comments

  • Daniel started the conversation
    Hi Themenectar. I am using svgs for several images on the my site. The problem is getting them scale evenly. Even though they have the same dimensions when I created them, they are different sizes when in browser. My fix was to contain them in iframes with constrained proportions but that increases page load time to an unacceptable level. Is there a way to insert svgs in Salient with fixed dimensions that, doesn't affect my load time.
  •  1,077
    ThemeNectar replied

    Hey Daniel,

    as I mentioned on the ThemeForest comments page -

    You could also do something like this:
    
    <img src="icon.svg" class="my-icon" />
    
    and then in the custom css box:
    
    .my-icon {
      height: 90px;
    }
    

    That should handle the issue and allow you to get away from using iframes :)

  • Daniel replied

    Hey ThemeNectar thanks for your reply.  I decided to use inline embeded base64, but I can't get it to code to stick.  It loads the first time but any change on the page removes the embedded code.  Any suggestions?

  •  1,077
    ThemeNectar replied

    Hey again - since we're talking about this on the theme comments, we'll keep it there for the sake of organization.

    Cheers :)