Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A CSS library that renders emoji in HTML via class names, using Twemoji icons.
Emoji CSS is a CSS-only utility that renders emoji in HTML through class names, using Twitter's open-source Twemoji icon set.
Emoji CSS is a small front-end utility that lets you include emoji in your HTML by adding simple class names to elements, in the spirit of Font Awesome's icon-font approach. Instead of copying and pasting Unicode characters or image files, you write a shortcode-like class such as :smiley: and the stylesheet renders the corresponding emoji graphic. The project is a GitHub repository (893 stars) that builds a demonstration and documentation site with Jekyll, and it pulls its emoji data from the iamcal/emoji-data project. The current implementation relies on Twitter's Twemoji set for the actual emoji artwork, and it is designed to work without JavaScript.
Emoji CSS provides a class-based API, Twemoji artwork, and a Jekyll-powered demo site. Here are the notable features:
bundle exec jekyll serve -w.make pulls fresh emoji data from iamcal/emoji-data.emoji/ directory still contains copyrighted images for backward compatibility, but these are scheduled for removal.Web developers, static-site authors, and UI prototypers are the primary users of Emoji CSS.
Emoji CSS is useful in any HTML context where a visual emoji is needed. Examples include:
:smiley:) in HTML or Markdown instead of copying the actual emoji character.To build or develop the project, you need Ruby 2.x and Bundler. After running bundle and bundle exec jekyll serve -w, the site is available at http://localhost:4000. To refresh the emoji data, run make, which reads from the emoji-data repository and regenerates the stylesheet and assets.
Other projects in the emoji-as-CSS space include:
:shortname: syntax and influenced this project.The source code is publicly available on GitHub, but the repository does not specify a license. The legacy images in the emoji/ folder are copyrighted and are being removed in the future, so rely on the Twemoji-based output for production use.
Twemoji, Twitter's open-source emoji set, provides the emoji graphics. The project's "See Also" links point to the Twemoji repository.
You need Ruby 2.x and Bundler. Run bundle to install dependencies, then bundle exec jekyll serve -w and open http://localhost:4000.
The project's Makefile runs make to pull the latest emoji data from the iamcal/emoji-data repository and regenerate the CSS.
