How to Prepare an SVG file

Standard SVG preparation is as follows:

  1. Auto-format
  2. In the <svg> tag, remove everything except version and viewbox.
    1. Add preserveAspectRatio="xMinYMin meet" class="svg-content"
  3. Replace the colors with the following as appropriate
    1. var(--ifm-font-color-base)
    2. var(--ifm-background-color)
  4. Replace the fonts with the following as appropriate
    1. var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base)
    2. var(--ifm-font-family-monospace)
Last updated on