Giter VIP home page Giter VIP logo

Comments (3)

WebReflection avatar WebReflection commented on May 22, 2024 3

twemoji.js gives you this ability, everything else might fit or not users needs and expectations.

As example, I would never want different sizes for the following reasons:

  • users won't benefit from CDN anymore
  • having too many different sizes per page is confusing anyway

You can parse headers a part or before the rest of the document via querySelectorAll or even getElementsByTagNames and use the big one there, and stick with default for the rest.

The way we've done until today, the way that works already since the beginning, is specified in the README

img.emoji {
   height: 1em;
   width: 1em;
   margin: 0 .05em 0 .1em;
   vertical-align: -0.1em;
}

The reason what you suggest won't work is also that size is relative, and IPS (retina) might need different ratio than the one I decide.

As summary: the lower level ability to parse with different sizes is built-in, how you want to use it is up to you. Another option that does so much magic does not seem to be a good fit for this library, maybe you can write a jQuery plugin or something that does this through this library API.

Feel free to ask more, if needed.

from twemoji.

WebReflection avatar WebReflection commented on May 22, 2024

P.S. also consider the SVG version, that scales any size but it's slightly less compatible ( old browsers won't show them, slower too in non modern hardware )

from twemoji.

lewisje avatar lewisje commented on May 22, 2024

I was interested in picking out the PNGs by size-classes, so that even if I do decide to have the browser scale them up or down, they'll have the best image quality, while also being supported in older browsers. I'll keep my fork going.

from twemoji.

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.