Miva Merchant Development by Scot's Scripts

SVG / CSS: Icon Tricks

Miva Random Code Trivia

Want to start an online store? We work with you from start to finish, from commerce platform to design to SEO.
Experience counts, and we have a lot.

WARNING:

This information is offered "AS IS" for internal reference only. Use at your own risk.
Does AI actually understand your Miva Merchant store? Our smart JSON-LD schema generator makes sure it does. Contact us to get started. (more info)
SEO Audit & Inquiries • News & Updates • SEO for Miva Merchant

SVG / CSS: Icon Tricks

THIS CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED;
THE AUTHOR DISCLAIMS ALL LIABILITY FOR ANY DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR STORE DISRUPTIONS ARISING FROM ITS USE.

Scot Ranney • April 07, 2026


Yes, this was worked up on ChatGP since I was out of Claude credits. ChatGP whipped it up into a nice Boostrap 5 block that probably looks better than anything else in this knowledgebase, sigh... actually it's quite nice and clean, what do you know?

Directional Icons (SVG & Font Awesome)

Use a single icon and flip it horizontally with CSS instead of maintaining multiple versions.


1. Base CSS Utility
.flip-x {
  transform: scaleX(-1);
  transform-origin: center;
  display: inline-block; /* important for inline elements */
}

2. SVG Example
Right
Left (flipped)
<svg class="flip-x">...</svg>

3. Font Awesome Example
Right
Left (flipped)
<i class="fa-solid fa-arrow-right flip-x"></i>

4. Optional Direction Classes
.arrow-left {
  transform: scaleX(-1);
}

.arrow-right {
  transform: none;
}

Tip: This works best for directional icons (arrows, chevrons, carets). Avoid flipping text or logos.


https://www.scotsscripts.com/mvblog/svg-css-icon-tricks.html

svg icons css