diff --git a/assets/sprites/emojione.sprites.css b/assets/sprites/emojione.sprites.css index b2e703b6b..10d59c592 100644 --- a/assets/sprites/emojione.sprites.css +++ b/assets/sprites/emojione.sprites.css @@ -1,4 +1,4 @@ -[class*=emojione-] { +.emojione { text-indent: -9999em; image-rendering: optimizeQuality; font-size: inherit; diff --git a/assets/sprites/emojione.sprites.mustache b/assets/sprites/emojione.sprites.mustache index 87cd466df..7550de45a 100644 --- a/assets/sprites/emojione.sprites.mustache +++ b/assets/sprites/emojione.sprites.mustache @@ -3,7 +3,7 @@ 'functions': true } -[class*=emojione-] { +.emojione { text-indent:-9999em; image-rendering: optimizeQuality; font-size: inherit; @@ -24,4 +24,4 @@ .{{name}} { background-position: (({{px.x}} * 100 / ({{px.total_width}} * (40/41))))#{"%"} (({{px.y}} * 100 / ({{px.total_height}} * (39/40))))#{"%"}; } -{{/items}} \ No newline at end of file +{{/items}} diff --git a/assets/sprites/emojione.sprites.scss b/assets/sprites/emojione.sprites.scss index 19d4a4e99..f79783c34 100644 --- a/assets/sprites/emojione.sprites.scss +++ b/assets/sprites/emojione.sprites.scss @@ -1,4 +1,4 @@ -[class*=emojione-] { +.emojione { text-indent:-9999em; image-rendering: optimizeQuality; font-size: inherit; diff --git a/demos/sprites-png.html b/demos/sprites-png.html index 5a8a68cd5..f25802f4b 100644 --- a/demos/sprites-png.html +++ b/demos/sprites-png.html @@ -128,9 +128,9 @@

2. Enable PNG Sprite mode

$client->imageType = 'png'; $client->sprites = true; -

If you are not using our conversion scripts, PNG sprites can be implemented using the following markup structure. In this example we're using the unicode symbol 1F433 aka 🐳

+

If you are not using our conversion scripts, PNG sprites can be implemented using the following markup structure. In this example we're using the unicode symbol 1F433 aka 🐳

-<span class="emojione-1f433">
+<span class="emojione emojione-1f433">
   &#x1f433;
 </span>
diff --git a/lib/js/emojione.js b/lib/js/emojione.js index f63ee5dfe..133ef7d1f 100644 --- a/lib/js/emojione.js +++ b/lib/js/emojione.js @@ -249,7 +249,7 @@ if(ns.imageType === 'png') { if(ns.sprites) { - replaceWith = ''+alt+''; + replaceWith = ''+alt+''; } else { replaceWith = ''+alt+''; @@ -286,7 +286,7 @@ if(ns.imageType === 'png') { if(ns.sprites) { - replaceWith = m2+''+alt+''; + replaceWith = m2+''+alt+''; } else { replaceWith = m2+''+alt+''; @@ -332,7 +332,7 @@ if(ns.imageType === 'png') { if(ns.sprites) { - replaceWith = ''+alt+''; + replaceWith = ''+alt+''; } else { replaceWith = ''+alt+''; diff --git a/lib/php/src/Client.php b/lib/php/src/Client.php index b89e49964..26d0b7485 100644 --- a/lib/php/src/Client.php +++ b/lib/php/src/Client.php @@ -245,7 +245,7 @@ public function shortnameToImageCallback($m) { if ($this->sprites) { - return ''.$alt.''; + return ''.$alt.''; } else { @@ -317,7 +317,7 @@ public function asciiToImageCallback($m) { if ($this->sprites) { - return $m[2].''.$alt.''; + return $m[2].''.$alt.''; } else { @@ -421,7 +421,7 @@ public function unicodeToImageCallback($m) { if ($this->sprites) { - return ''.$alt.''; + return ''.$alt.''; } else { diff --git a/lib/php/test/SpriteTest.php b/lib/php/test/SpriteTest.php index a482a0a4f..b2d6c6c9b 100644 --- a/lib/php/test/SpriteTest.php +++ b/lib/php/test/SpriteTest.php @@ -36,7 +36,7 @@ protected function tearDown() public function testToImage() { $test = 'Hello world! 😄 :smile:'; - $expected = 'Hello world! 😄 😄'; + $expected = 'Hello world! 😄 😄'; $this->assertEquals(Emojione::toImage($test), $expected); } @@ -49,7 +49,7 @@ public function testToImage() public function testShortnameToImage() { $test = 'Hello world! 😄 :smile:'; - $expected = 'Hello world! 😄 😄'; + $expected = 'Hello world! 😄 😄'; $this->assertEquals(Emojione::shortnameToImage($test), $expected); } @@ -62,7 +62,7 @@ public function testShortnameToImage() public function testUnicodeToImage() { $test = 'Hello world! 😄 :smile:'; - $expected = 'Hello world! 😄 :smile:'; + $expected = 'Hello world! 😄 :smile:'; $this->assertEquals(Emojione::unicodeToImage($test), $expected); } diff --git a/lib/python/emojipy/emojipy.py b/lib/python/emojipy/emojipy.py index 032a4b591..808e24e84 100644 --- a/lib/python/emojipy/emojipy.py +++ b/lib/python/emojipy/emojipy.py @@ -59,7 +59,7 @@ def replace_unicode(match): if cls.image_type == 'png': if cls.sprites: - return '%s'\ + return '%s'\ % (filename, escape(shortcode), alt) else: return '%s' % ( @@ -93,7 +93,7 @@ def replace_shortcode(match): filename = shortcode_replace[shortcode].upper() if cls.image_type == 'png': if cls.sprites: - return '%s'\ + return '%s'\ % (filename, escape(shortcode), alt) else: return '%s' % ( @@ -168,7 +168,7 @@ def replace_ascii(match): alt = escape(ascii) if cls.image_type == 'png': if cls.sprites: - return '%s'\ + return '%s'\ % (unicode, escape(ascii), alt) else: return '%s' % ( diff --git a/lib/python/emojipy/tests/test_sprite.py b/lib/python/emojipy/tests/test_sprite.py index 6523d9ebf..290450e66 100644 --- a/lib/python/emojipy/tests/test_sprite.py +++ b/lib/python/emojipy/tests/test_sprite.py @@ -18,6 +18,6 @@ def test_unicode_to_image(self): """ text = 'Hello world! 😄 :smile:' - expected = 'Hello world! 😄 :smile:' + expected = 'Hello world! 😄 :smile:' self.assertEqual(self.emoji.unicode_to_image(text), expected)