šŸ”„ CSS Tip

Andy Bell

If you want a negative version of a Custom Property, multiply it by -1.

CSS Code that reads: :root {   --left-margin: 1rem; }  .example {   margin-left: var(--left-margin); }  .example--negative {   margin-left: calc(var(--left-margin) * -1); }

https://codepen.io/andybelldesign/pen/pmJgPW