Comments (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.
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.
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)
- bring back twemoji to mobile devices
- FEAT: Improve the ui of footer in the website
- FEAT: Improve the ui of footer in the websit HOT 1
- Fluent Emoji: Twemoji drop-in replacement HOT 3
- about using twemoji HOT 1
- New CDN doesn't seem to work HOT 2
- CDN not needed HOT 1
- Where is the donkey, goose, jellyfish and moose? HOT 10
- How to use twemoji for input field HOT 2
- Grey heart emoji (1FA76.svg) is barely differentiable from the white heart emoji (1F90D.svg)
- Update flag of Martinique HOT 2
- Attribution
- I want to make a Chinese translation HOT 3
- Blue heart (1f499) is different shade than other blue emojis such as blue square, circle, etc. HOT 2
- ![sweating-nervous](https://user-images.githubusercontent.com/2575182/211350030-249c6b1f-a347-4ade-bd40-1ed83629f09f.gif) HOT 1
- Old Twitter Logo (the bird) still not updated (to the X) in twitter.com/account/access HOT 2
- twemoji website doesnt work HOT 2
- CDN links to maxcdn.com are broken HOT 3
- Question: Commercial offline & online usage
- Improper neutralization of special elements used in a command in twemoji shell-quote
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twemoji.