Skip to content

Is there a way to use multiple colours on a remote SVG file? #1841

Closed
@namti

Description

@namti

Question

I am using fontawesome duotone SVG from remote URL. Is there a way to set the colour for different element separately?

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
  <defs>
    <style>.fa-secondary{opacity:.4}</style>
  </defs>
  <path class="fa-primary" d="M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0V512z"/>
  <path class="fa-secondary" d="M256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512V0z"/>
</svg>

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions