Internal CSS cheatsheet for code used in every site build

Remove hyphens from your website

//remove hyphens//
p, h1, h2, h3 {
-webkit-hyphens: manual !important;
-moz-hyphens: manual !important;
-ms-hyphens: manual !important;
hyphens: manual !important;
}

Remove underlines from body links and bullets

//Remove Underlines From Body Text Links and bullets//
.sqs-block-html ul a {border-bottom: none;}
.sqs-block-html p a {border-bottom: none;}

Remove space at bottom of site on mobile

//remove space at bottom of site on mobile//
.Mobile-bar.Mobile-bar--bottom {
  padding: 0;
}

Remove links in footer

//Remove links in footer//
.Footer-blocks p a { border: none !important; }

Custom narrow width for blog posts

//custom width for blog//
.BlogItem { max-width:750px; margin: 0 auto; }

Hide cart until a product is added. (Add to footer section of code injection)

<script>
 (function () {
   var carts = [].slice.call(document.querySelectorAll('.Cart'));
   carts.forEach(function(cart) {
     hideCart(cart);
   });

   function hideCart(cart) {
     var cartQty = cart.querySelector('.sqs-cart-quantity');
     // Handler
     function handler(target) {
       if (target.innerHTML === '0') {
         cart.setAttribute('hidden', '');
       } else {
         cart.removeAttribute('hidden');
       }
     }
     // Observer handler
     var observer = new MutationObserver(function(mutations) {
       handler(mutations[0].target);
     });
     // Hide/show the cart when the page is loaded
     handler(cartQty);
     // Hide/show the cart when an item was added/removed
     observer.observe(cartQty, { childList: true });
   }
 })();
 </script>