Skip to content

Instantly share code, notes, and snippets.

@hopearmstrong
Last active April 2, 2019 04:55
Show Gist options
  • Save hopearmstrong/48b1228b6fa7ce3a0af365edf15acd14 to your computer and use it in GitHub Desktop.
Save hopearmstrong/48b1228b6fa7ce3a0af365edf15acd14 to your computer and use it in GitHub Desktop.
Use inline CSS styles in the SVG
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
<g>
<!-- Notice the fill added to the rectangles below -->
<rect id="vertical-rectangle" width="48" height="4" x="1" y="23" transform="rotate(90 25 24)" style="fill: #0a2ca4;"/>
<rect id="horizontal-rectangle" width="48" height="4" y="21" style="fill: #4a8af4;"/>
</g>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment