Giter Site home page Giter Site logo

Comments (5)

AKlaus avatar AKlaus commented on September 24, 2024 3

Google has their flags as 48x32 (link) and they show them as 24x16 images (e.g. in Google Contacts on the phone field), so Retina displays handle the images gracefully.

Talking about sprites, I'd like to suggest an idea voiced here on Stackoverflow.com to save the flags in a grid according to the country ISO2 code, where 1st letter -> vertical position and 2nd letter -> horizontal position. So the flag location can be calculated with a very easy function on the client side without the need of 200+ extra style definitions.

from country-flags.

drdim avatar drdim commented on September 24, 2024 1

I think create custom image size (from imagemin), default size one flag 1x - 20x14 px, 2x 40x28 px
or add npm build map command.

from country-flags.

hampusborgos avatar hampusborgos commented on September 24, 2024

What resolution would be appropriate for such a mapping? 100x100?

from country-flags.

unnieayilliath avatar unnieayilliath commented on September 24, 2024

I think a sprite image is really necessary. 48 * 48 would be good

from country-flags.

wyattoday avatar wyattoday commented on September 24, 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/sprity/sprity

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.