Giter Site home page Giter Site logo

Comments (5)

hampusborgos avatar hampusborgos commented on June 23, 2024

It is probably possible yes, you're thinking that each flag will be identified by an ID tag in a single SVG then?

from country-flags.

un33k avatar un33k commented on June 23, 2024

@hjnilsson that is correct.

// usage: if we had a single flags.svg
<mat-icon svgIcon="ca"></mat-icon>
<mat-icon svgIcon="us"></mat-icon>

Here you see how Angular material is used to register multiple flags svg(s) vs. a single icon svg (mdi.svg).

Sadly, one trip to the backend is required for each svg.

from country-flags.

wyattoday avatar wyattoday commented on June 23, 2024

There are lots of tools that take separate images and combines them to create a single sprite. Rather than re-create that work here, just use google to find one of the tools.

Here's one example: https://github.com/svg-sprite/svg-sprite

from country-flags.

OzBob avatar OzBob commented on June 23, 2024

This package is used by Material! it's used a lot, it is impacting the internet by making millions of country flag requests per view.

Please reconsider adding a build step, to this repo, to create a single sprite for SVGs

from country-flags.

wyattoday avatar wyattoday commented on June 23, 2024

OK, there are tools to handle this. I linked to one. Google for others.

from country-flags.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.