Permalink
Browse files

Make sure to put the png file in the svg css, in case an svg doesn't …

…exist
  • Loading branch information...
1 parent 584e37f commit 7451302912c6e9d586aaba7382249fca185c8b2e @jefflembeck jefflembeck committed Aug 12, 2013
@@ -44,6 +44,9 @@ nav li a.deadly-bears:before { background-image: url('data:image/png;base64,iVBO
.icon-map { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAiCAYAAABFlhkzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAA6hJREFUSMftlllsTFEYgG+bNrbYJcQSQeJFkHiQ8MCDEBEiHiwJFcKLSDxIbFFbVRtrW6GWWhprlCC0mlpb1FQVXYwuQ1vTmY6Zdu695y7nzOb+/usBc+eWmVGJByf5Hm7Of8//n/OvHPd/ddfSNG1CKBTa1skLRZ1escrDCxZBkC4CwCpk4J8cPIUnUqVXUtXj1R7fitLPMLvYCfNKnLD+hQcKbR5ZZT4my3IuKuof0+GU0o2iQunaJ04t+YwNuNNNpgy79BHy6zxMocyNBk2O6nBFUXa08LIy+nIzcKcao2JpiUNTKZNQycTfPcucTkmlwy98AO5EQ0wsv+/QJMqceEYf08PxHZOISl1zC+3A5dbHRUF9h4oroysFi6vsvMQds4KRqdeboby1U2L+QICojOW9dbFBZxoi5MZesAE6XsWzekYo4AWhePUDB3BH34UxraAZZMoUvPpKpB8yCiPnbFOHpPTKfR8hX/nJQ1BmfqRzKfOOy0en5dSF8aaN1523xHDbBCJJJRset2lG+TRL+xe/359pfJ4ETCYtSRfKqv1OMn4HcQP3k00CYtnd9y7ys7zO6vtt4OX5G0YFifgDJGbVAHfkB0nZteAPBEO419dEwZrrte3yz/I6KcV28ArC7cgnUikZcRKddag6jKJGt+Lz+XYZDOopyHLT4jutEfJbSh0aJmp2hIIOni9feAuT6+DbMEafsoIH0xodex6tnossFWXFesPqVhMMsjoPG1zE6LNvKxAIbM577WTc/tdgZMjRGsh4bg9aWtzig3oXSSlsgcQDkXKDUU6vT6a1SQ8/BTcHZKElmVVxsefppyAh0pUuSwUhckF6mT3AZbyCWBmaU63nC0Xrx/6qFo1RqI8Ny8ZbpFfGxOXqdoqFMieaappzFYW5vS8hWqaftwImKm8Wzma36Ktn9cx8LAN7Kn5LYloFWB28gvmYEnXD0QvfB4zNZPyZ2235JatuNmmiSOr0ZI1FQYIgSeWbim0hbmc5dEW/fRXAY//AW0+NpyePR4fTkQfQianPTTn4pNVPCLkWd+PH5rH/dl27ym1/BkbGHX6lO1ZFQ4bHrQCfqrfe0Oecwyq77WkYRe8cOBbQHd0xFy2weyWlRypavrXsG7PyatB6+tm0c8WzREIepd6zBbnNpZCECj66RBkVL+rO6Q4znNExmRZYd7P+C3azl3qkdesIyRjbXdbopqJM9bCc9Ddm1B6STB16w/+bg/AMfJoh/8RU/hXHSG8PVDVMcQAAAABJRU5ErkJggg=='); background-repeat: no-repeat; }
+/* Using an external URL reference because this image would have a data URI of 164498 characters, which is greater than the maximum of 32768 allowed by IE8. */
+.icon-over-ie8-data-uri-limit { background-image: url('png/over-ie8-data-uri-limit.png'); background-repeat: no-repeat; }
+
.icon-plus { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAfNJREFUSMft1s9LFGEYwPG9JUKnTnrpEF3q4qlT0M7spF082SFByINi4EGxQRMEcesvEEoyBX9kmigRUupimz9CD1Lq/mAPmkU4zszOvO/M7uh1n9738AjWOkoyLwW98D0+82EG3mc3FPp//tYDACW6ro8QYq8f5dobmqZVBQoXCoUrOY8eTqTaAFv9MQpZmp0PHKZ5y4su3wJsOtMDFrXeC4G7FsOAvU4LhNvjYcDGUoJgwuDWhTBgw0mBcHMsDNhgQhScs7zGWQmw/s2oGNhm8P13EmDPvjDYOgfMlwN/8ClJDD6onZEA6/0cBdd142eYLS8K843k5Okhf6OTInnbm9oad2reSoA9iN2Dr8aO4zfHM+m+wfDrv8E2W39dn1SofiMHUkpLOOyrKkXhzhUV7kzLgZTc84HVJRXkSTmQEj7wxnB6FLpXo77dnamFmxPysdSlR6fO7Vq7XlHYNM1KSukcvxonRQiJb+s7zo1XEcBaP3YCyZFtvzmeYRoDDC7943ucdS2v4mUEsI6Vx+e7x2eFdQZfG4kA9nBZIHx1KAJYy6JA+PKgAlhz/IkYeJ/BZS8UwJo+CIQvPVcAa1gQCF/sUwCrjwmCNQZfeHobsLp5MXD5nm0aa9+TDpbRv3mGaQ4E/qee/7Tx1fdLpaF/4fwE7LF6jsFNUaEAAAAASUVORK5CYII='); background-repeat: no-repeat; }
.icon-star { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAA9hJREFUWMPtmVtsVFUUhvGSaIwajeiDPphgURCtokIHC6Eh1OADNkZDvESNJhBEkQc0EhqVpiJqJBrlgZhIhKQPEjUxWkSsRS5Nbam1dkovdM7M9DbMTDudns5MZ85el98nExt7Zc7QeehKvre9d9bZWWv//9l7wYL5mA93AsBVAK7I+0SZU+0izoG8TlJVN1DqUEyo21LV2/I2UeH4WR70gGIviwjty9faXM+pI4McLgCHC8BkWQAW5uFujpziSDE4VAAOFYAGN7MIVeZbba7jZFWU+xdjHMayVPWW/NlNsWt5oATce/c4KLqVRKgiX3ZzLdtHIxy8BxMh1OsDcFMe1Kb9K/euB/uXTIi5+DqrmnfnutNXs/19mK0lmAoxfT5VvXEuErxOVReLpGo5+Bi4e+mUUGgHich+Vb0TwNVu1941ABap6hpVfU5E9ookvxMeaWYzYHGiuYf6X7W5617MBBP5bFBSbX42UUs4Xi+SrlLlclV9SlWLVPWOWXSvvC+S/EZ4+JxQ1CfJlgDHvo1SqIKkdzPEXwa+4AF3LMuOC2sggachfa+BIx+nOV59UTLtfqEhS3jkjEj6sKq+NbmhoNFe8T8P7iwGn182N3SVwBl4z0DGjk6nMH9zx6PgtvvmBPJvGYOkv55Zs7DdxO1rwa33X1aM9UZKJPXlbJ1QvfGWKrcU4nJAgTcTQmOX5mOFRk6b1seFmguRS0xwty3i7M9WeWpM20ampgeQE3oq4yLOPpdkcvRnx7uJqPFBuIkJfDQMcfa4rOmJH4z3GUMNy+EGJvjpEGB25ciAJH6kPzeA6pdnRaZje0LVlOfQd6YOceuLoLqHssIEv8io6qbc/Qpn4vX0RynozMNZwd5tEJEPcuWYruVMxKJTjyBbuPFJiDN6LFdOfinHG3ro5Apkze8esBnuytnlggl+ZVPtCriBJLqtWVm7mSfKO7n1bVDNyqk5+8T0Y2pWgvt/Cqtqsfsdb9JVXP8C6ETRxNSuA/mPxMSJ1YgzbJF3b3rSsSeKYNoqWVVfcr+ZjN1Ev5WCjnvG88tqUOdBW8zIX6q68T+lsl0yUZ9p2W3+N+e4B9ywFSLO527X5w2c7LfomAfjOP9Jkp3hTlV9drKTQpXLJdnnM407ZNzck2UQx651O9FCDtf1UfUqUPUqmOaKDGeGLABbZni03QxxPuRRn2Xqtum/63AmZrl6l6qqZdR5MGnO7SJOhnzKvBPAlZewzu1CzgEeag3w6VfAQ94AgEVudvw7nA6HILQHwPUufPhdYtKHZSzSD6DETVVaqKq35kJE5h8T5mOa+AeULZ4uhFU7SwAAAABJRU5ErkJggg=='); background-repeat: no-repeat; }
@@ -44,6 +44,8 @@ nav li a.deadly-bears:before { background-image: url(png/gummy-bears-2.png); bac
.icon-map { background-image: url(png/map.png); background-repeat: no-repeat; }
+.icon-over-ie8-data-uri-limit { background-image: url(png/over-ie8-data-uri-limit.png); background-repeat: no-repeat; }
+
.icon-plus { background-image: url(png/plus.png); background-repeat: no-repeat; }
.icon-star { background-image: url(png/star.png); background-repeat: no-repeat; }
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -32,6 +32,7 @@
<pre><code>.icon-gummy-bears-1:</code></pre><div class="icon-gummy-bears-1" style="width: 340px; height: 448px"></div><hr/>
<pre><code>.icon-gummy-bears-2:</code></pre><div class="icon-gummy-bears-2" style="width: 340px; height: 449px"></div><hr/>
<pre><code>.icon-map:</code></pre><div class="icon-map" style="width: 24px; height: 34px"></div><hr/>
+ <pre><code>.icon-over-ie8-data-uri-limit:</code></pre><div class="icon-over-ie8-data-uri-limit" style="width: 440px; height: 230px"></div><hr/>
<pre><code>.icon-plus:</code></pre><div class="icon-plus" style="width: 30px; height: 30px"></div><hr/>
<pre><code>.icon-star:</code></pre><div class="icon-star" style="width: 42px; height: 42px"></div><hr/>
<pre><code>.icon-bear:</code></pre><div class="icon-bear" style="width: 100px; height: 62.905px"></div><hr/>
@@ -79,7 +79,7 @@
if( !this._svgdatauri ){
var imagedata = this.imagedata;
// get base64 of svg file
@staabm
staabm Aug 12, 2013

Comment no longer applies

- var prefix = "data:image/svg+xml;charset=US-ASCII,";
+ var prefix = this.isSvg ? "data:image/svg+xml;charset=US-ASCII," : "data:image/png;base64,";
this._svgdatauri = prefix + encodeURIComponent( imagedata
//strip newlines and tabs
.replace( /[\n\r]/gmi, "" )

0 comments on commit 7451302

Please sign in to comment.