svg Blog Posts

Inline SVG for high contrast support

Date: February 15, 2021
Author: Jon Gunderson

Using SVG graphics in combination with the CSS currentColor property to support high contrast theme options in operating systems. Rendered SVG menu open/close icon SVG Code <svg aria-hidden=”true” width=”11px” height=”11px” viewBox=”0 0 133 79″ version=”1.1″> <title>menu open/close icon</title> <g stroke=”none” stroke-width=”1″ fill=”none” fill-rule=”evenodd”> <g transform=”translate(-50.000000, -122.000000)” fill=”currentColor”> <g transform=”translate(45.000000, 64.000000)”> <path d=”M33.5,21 C40.4035594,21 46,26.5964406 46,33.5 …

Category: Color Usage