{"id":147254,"date":"2013-08-19T07:36:28","date_gmt":"2013-08-19T14:36:28","guid":{"rendered":"http:\/\/css-tricks.com\/?p=147254"},"modified":"2015-05-04T11:16:51","modified_gmt":"2015-05-04T18:16:51","slug":"svg-fallbacks","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/svg-fallbacks\/","title":{"rendered":"SVG Fallbacks"},"content":{"rendered":"<div class=\"explanation\"><strong>UPDATE<\/strong>: Here&#8217;s <a href=\"https:\/\/css-tricks.com\/a-complete-guide-to-svg-fallbacks\/\">a more comprehensive guide to SVG fallbacks<\/a> we&#8217;ve published.<\/div>\n<p>There is a <a href=\"http:\/\/lynn.ru\/examples\/svg\/en.html\" rel=\"noopener\">very clever technique<\/a> by Alexey Ten on providing an image fallback for SVG going around the internet recently. It does just what you want in the classic no-SVG-support browsers IE 8- and Android 2.3. If we dig a little deeper we find a some pretty interesting stuff including a bit of unexpected behavior that is a bit of a bummer.<\/p>\n<p><!--more--><\/p>\n<p>Alexey&#8217;s technique looks like this:<\/p>\n<pre rel=\"HTML\"><code class=\"language-markup\">&lt;svg width=\"96\" height=\"96\"&gt;\r\n  &lt;image xlink:href=\"svg.svg\" src=\"svg.png\" width=\"96\" height=\"96\" \/&gt;\r\n&lt;\/svg&gt;<\/code><\/pre>\n<p>The idea was based on Jake Archibald&#8217;s <a href=\"http:\/\/jakearchibald.com\/2013\/having-fun-with-image\/\" rel=\"noopener\">revisiting<\/a> of the fact that browsers render the <code>&lt;image&gt;<\/code> tag like <code>&lt;img&gt;<\/code>. It&#8217;s just a weird alias from the days of yore that can be exploited.<\/p>\n<h3>What Displays<\/h3>\n<p>The technique is pretty close to perfect in terms of what supporting and non-supporting browsers display. IE 8, which doesn&#8217;t support SVG, it displays the fallback PNG. Android 2.3, same story. <\/p>\n<p>The part I got confused on was iOS 3 and 4. The native browser on those operating systems do support SVG, in the form of <code>&lt;img src=\"*.svg\"&gt;<\/code> or as a CSS <code>background-image<\/code>. But with this technique, the PNG displays rather than the SVG. The trouble is that iOS 3 &#038; 4 <a href=\"https:\/\/twitter.com\/jaffathecake\/status\/369431061387694081\" rel=\"noopener\">don&#8217;t support &#8220;inline&#8221; SVG<\/a> (e.g. using SVG with an <code>&lt;svg&gt;<\/code> tag right in the HTML) (<a href=\"http:\/\/caniuse.com\/#feat=svg-html5\" rel=\"noopener\">support chart<\/a>). SVG support isn&#8217;t as simple as yes\/no. It depends on how it is used. <\/p>\n<p>The point: it&#8217;s weird to see <code>&lt;img&gt;<\/code> work and <code>&lt;image&gt;<\/code> not work in these cases. And since those browsers do support SVG, it&#8217;s a shame not to use it.<\/p>\n<h3>What Downloads<\/h3>\n<p>Of course we also care about what gets downloaded because that affects page performance. Again it&#8217;s mostly good news. Modern browsers like Chrome only download the SVG. Android 2.3 only downloads the PNG. <\/p>\n<p>But we run into an issue with Internet Explorer versions 9, 10, and 11 (a preview at this time). In IE 9, you can see both images turn up in the Network timeline.<\/p>\n<figure id='post-147366 media-147366' class='align-none'><img data-recalc-dims=\"1\" src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2013\/08\/ie9-timeline.png\" alt='' \/><\/figure>\n<p>The PNG ends up with a result of &#8220;Aborted&#8221; and listed as 0 B received, but still affects the download timing. <\/p>\n<p>It is a similar story in IE 10, it just seems to abort quicker and move on to the SVG without much downtime.<\/p>\n<figure id='post-147367 media-147367' class='align-none'><img data-recalc-dims=\"1\" src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2013\/08\/ie10-timeline.png\" alt='' \/><\/figure>\n<p>Scott Jehl <a href=\"https:\/\/twitter.com\/scottjehl\/status\/369178695908327424\" rel=\"noopener\">suggested<\/a> using <a href=\"http:\/\/www.charlesproxy.com\/\" rel=\"noopener\">Charles Proxy<\/a> to test what is being downloaded more accurately. Charles verifies that the PNG is being requested.<\/p>\n<figure id='post-147369 media-147369' class='align-none'><img data-recalc-dims=\"1\" src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2013\/08\/charles.png\" alt='' \/><\/figure>\n<p>The size of the response body is indeed 0 B, so the abort happens fast enough that not much data is transferred. Although the request and response header combined is 782 B and it takes ~300 ms to happen. A Yoav Weiss <a href=\"https:\/\/twitter.com\/yoavweiss\/status\/369388902051622912\" rel=\"noopener\">points out<\/a>, the problem may be worse if there are blocking scripts at the top of the page.<\/p>\n<p>Also note there is some chance that using a proxy affects what is\/isn&#8217;t downloaded as Steve Souders <a href=\"http:\/\/blog.cloudfour.com\/using-charles-proxy-to-examine-ios-apps\/comment-page-1\/#comment-15400\" rel=\"noopener\">points out<\/a> in this Jason Grigsby <a href=\"http:\/\/blog.cloudfour.com\/using-charles-proxy-to-examine-ios-apps\/\" rel=\"noopener\">article<\/a> about Charles Proxy.<\/p>\n<p>Research by Andy Davies suggests that the PNG request isn&#8217;t aborted at all in IE 11 on Windows 7. <\/p>\n<blockquote class=\"twitter-tweet\">\n<p><a href=\"https:\/\/twitter.com\/stopsatgreen\" rel=\"noopener\">@stopsatgreen<\/a> <a href=\"https:\/\/twitter.com\/jaffathecake\" rel=\"noopener\">@jaffathecake<\/a> <a href=\"https:\/\/twitter.com\/chriscoyier\" rel=\"noopener\">@chriscoyier<\/a> In my IE11 \/ Win7 response isn&#39;t aborted and shows up in dev tools and pcap <a href=\"http:\/\/t.co\/ypitwTYAAH\">pic.twitter.com\/ypitwTYAAH<\/a><\/p>\n<p>&mdash; Andy Davies (@andydavies) <a href=\"https:\/\/twitter.com\/andydavies\/statuses\/369404411191115776\" rel=\"noopener\">August 19, 2013<\/a><\/p><\/blockquote>\n<p><script async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<h3>Findings<\/h3>\n<p>I did the display tests from this Pen, but the download tests I made sure to do with just one of the techniques present on the page and using <a href=\"http:\/\/blog.codepen.io\/2013\/06\/03\/debug-view-urls\/\" rel=\"noopener\">Debug View<\/a> so there was nothing else on the page but the raw technique.<\/p>\n<p data-height=\"715\" style=\"height: 715px; display: flex; align-items: center; justify-content: center; border: 2px solid black; margin: 1rem 0; padding: 1rem; overflow: auto;\" data-theme-id=\"1\" data-slug-hash=\"cmybF\" data-user=\"chriscoyier\" data-default-tab=\"result\" class='codepen'>See the Pen <a href=\"http:\/\/codepen.io\/chriscoyier\/pen\/cmybF\" rel=\"noopener\">SVG Tests<\/a> by Chris Coyier (<a href=\"http:\/\/codepen.io\/chriscoyier\" rel=\"noopener\">@chriscoyier<\/a>) on <a href=\"http:\/\/codepen.io\" rel=\"noopener\">CodePen<\/a><\/p>\n<h3 id=\"the-fallbacks\">So, Fallbacks<\/h3>\n<p>The Alexey Ten is still clever and if the iOS display issue and IE download issue is acceptable to you, it&#8217;s still usable. Here&#8217;s some more fallback techniques, which differ depending on how you use SVG.<\/p>\n<h4>If you&#8217;re using SVG as a background-image&#8230;<\/h4>\n<p>Modernizr has an <a href=\"http:\/\/modernizr.com\/docs\/#features-misc\" rel=\"noopener\">SVG test<\/a>. So you could declare a fallback with the class names it injects onto the HTML element.<\/p>\n<pre rel=\"CSS\"><code class=\"language-css\">.my-element {\r\n  background-image: url(image.svg);\r\n}\r\n.no-svg .my-element {\r\n  background-image: url(image.png);\r\n}<\/code><\/pre>\n<p>That shouldn&#8217;t have any double-download issues but doesn&#8217;t have the Modernizr dependency. <\/p>\n<p>A very clever technique with no dependency at all comes is to use a little CSS trick with multiple backgrounds and old-syntax linear-gradients:<\/p>\n<pre rel=\"CSS\"><code class=\"language-css\">.my-element {\r\n  background-image: url(fallback.png);\r\n  background-image: \r\n    linear-gradient(transparent, transparent),\r\n    url(image.svg);\r\n}<\/code><\/pre>\n<p>There was a technique going around that just used multiple backgrounds here. But that didn&#8217;t quite get the job done because Android 2.3 supported that but not SVG and thus broke. This combines old-syntax gradients with multiple backgrounds, so it works everywhere. <a href=\"http:\/\/pauginer.com\/post\/36614680636\/invisible-gradient-technique\" rel=\"noopener\">Reference<\/a>.<\/p>\n<p>If both those things are supported, the browser will use the second declaration (with SVG), otherwise fall back to the first declaration (with PNG).<\/p>\n<h4>If you&#8217;re using SVG as inline &lt;svg>&#8230;<\/h4>\n<p>David Ensinger <a href=\"http:\/\/davidensinger.com\/2013\/04\/inline-svg-with-png-fallback\/\" rel=\"noopener\">posted a technique<\/a> using the <code>&lt;foreignObject&gt;<\/code> tag in <code>&lt;svg&gt;<\/code>. But the trouble with that is the fallback is loaded no matter what resulting in the double download all the time instead of just sometimes like the <code>&lt;image&gt;<\/code> technique. <\/p>\n<p>This gets a bit complicated, but Artur A posted this idea which seems to solve the double download and work everywhere:<\/p>\n<pre rel=\"HTML\"><code class=\"language-markup\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n\r\n&lt;head&gt;\r\n    &lt;title&gt;HTML5 SVG demo&lt;\/title&gt;\r\n    &lt;style&gt;\r\n     .nicolas_cage {\r\n         background: url('nicolas_cage.jpg');\r\n         width: 20px;\r\n         height: 15px;\r\n     }\r\n     .fallback {\r\n     }\r\n    &lt;\/style&gt;\r\n&lt;\/head&gt;\r\n\r\n&lt;body&gt;\r\n  \r\n  &lt;svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"0\" height=\"0\"&gt;\r\n    &lt;style&gt;\r\n    &lt;![CDATA[ \r\n      .fallback { background: none; background-image: none; display: none; }\r\n    &gt;\r\n    &lt;\/style&gt;\r\n  &lt;\/svg&gt;\r\n\r\n  &lt;!-- inline svg --&gt;\r\n  &lt;svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"40\" height=\"40\"&gt;\r\n  &lt;switch&gt;\r\n     &lt;circle cx=\"20\" cy=\"20\" r=\"18\" stroke=\"grey\" stroke-width=\"2\" fill=\"#99FF66\" \/&gt;\r\n     &lt;foreignObject&gt;\r\n         &lt;div class=\"nicolas_cage fallback\"&gt;&lt;\/div&gt;\r\n     &lt;\/foreignObject&gt;\r\n  &lt;\/switch&gt;\r\n  &lt;\/svg&gt;\r\n\r\n  &lt;!-- external svg --&gt;\r\n  &lt;object type=\"image\/svg+xml\" data=\"circle_orange.svg\"&gt;\r\n    &lt;div class=\"nicolas_cage fallback\"&gt;&lt;\/div&gt;\r\n  &lt;\/object&gt;\r\n\r\n&lt;\/body&gt;\r\n\r\n&lt;\/html&gt;<\/code><\/pre>\n<p>Alternatively, you could do something like:<\/p>\n<pre rel=\"HTML\"><code class=\"language-markup\">&lt;svg&gt; ... inline SVG stuff ... &lt;\/svg&gt;\r\n&lt;div class=\"my-svg-alternate\"&gt;&lt;\/div&gt;<\/code><\/pre>\n<p>Then use the Modernizr SVG test again to get the support HTML class and then&#8230;<\/p>\n<pre rel=\"CSS\"><code class=\"language-css\">.my-svg-alternate {\r\n  display: none;\r\n}\r\n.no-svg .my-svg-alternate {\r\n  display: block;\r\n  width: 100px;\r\n  height: 100px;\r\n  background-image: url(image.png);\r\n}<\/code><\/pre>\n<p>Or wrap the SVG in that div so the div could be used for consistent sizing.<\/p>\n<p>If you&#8217;re using inline SVG, there is a good chance you are doing it with <code>&lt;use&gt;<\/code>, in which case the script <a href=\"https:\/\/github.com\/jonathantneal\/svg4everybody\" rel=\"noopener\">svg3everybody<\/a> does a pretty good job. If SVG the way you are using inline SVG is supported, it just works. If it&#8217;s being referenced externally in IE (which doesn&#8217;t work), it makes it work by ajaxing it in. If it doesn&#8217;t work at all, it has a syntax you can use to specify a PNG fallback.<\/p>\n<h4>If you&#8217;re using SVG as &lt;object>&#8230;<\/h4>\n<p>You could use the object tag itself as the element to style after the Modernizr test.<\/p>\n<pre rel=\"HTML\"><code class=\"language-markup\">&lt;object type=\"image\/svg+xml\" data=\"image.svg\" class=\"logo\"&gt;&lt;\/object&gt;<\/code><\/pre>\n<pre rel=\"CSS\"><code class=\"language-css\">.no-svg .logo {\r\n  display: block;\r\n  width: 100px;\r\n  height: 100px;\r\n  background-image: url(image.png);\r\n}<\/code><\/pre>\n<h4>If you&#8217;re using SVG as &lt;img>&#8230;<\/h4>\n<p>There is a technique which a failing SVG file can get swapped out on the fly:<\/p>\n<pre rel=\"HTML\"><code class=\"language-markup\">&lt;img src=\"image.svg\" onerror=\"this.src='image.png'\"&gt;<\/code><\/pre>\n<p>That requires special HTML as you can see, so if that&#8217;s not possible or practical for you, you could swap sources with Modernizr. This uses the JS API of Modernizr, not the class names:<\/p>\n<pre rel=\"JavaScript\"><code class=\"language-javascript\">if (!Modernizr.svg) {\r\n  $(\"img[src$='.svg']\")\r\n    .attr(\"src\", fallback);\r\n}<\/code><\/pre>\n<p>Where <code>fallback<\/code> is a string of a URL where the non-SVG image fallback is. You could keep it in a <code>data-fallback<\/code> attribute, use a consistent URL pattern where it just replaces .svg with .png, or whatever other smart thing you can think of. <a href=\"http:\/\/benhowdle.im\/svgeezy\/\" rel=\"noopener\">SVGeezy<\/a> is a library that does exactly this, and uses <a href=\"https:\/\/css-tricks.com\/test-support-svg-img\/\">a clever detection method<\/a>.<\/p>\n<p>The trouble with those methods is that the require an <code>&lt;img src&gt;<\/code> and that src is going to be prefetched and there is no way you can fight it. So you&#8217;re looking at potential double-downloads which is always bad. <\/p>\n<p>Or you could use a similar technique as with the inline SVG and object techniques where a hidden DIV is displayed with a fallback.<\/p>\n<p>Another pretty good option is using <a href=\"https:\/\/github.com\/scottjehl\/picturefill\" rel=\"noopener\">Picturefill<\/a>. The <code>&lt;picture&gt;<\/code> element allows for content-type fallbacks. You&#8217;ll need the polyfill because picture isn&#8217;t very well supported yet. This solves the double download problem though, which is great, but doesn&#8217;t work without JavaScript. But then again neither do the other methods so. It looks like this:<\/p>\n<pre rel=\"HTML\"><code class=\"language-markup\">&lt;picture&gt;\r\n\r\n  &lt;source srcset=\"graph.svg\" type=\"image\/svg+xml\"&gt;\r\n\r\n  &lt;img srcset=\"graph-small.png, graph-medium.png 400, graph-large.png 800\" alt=\"A lovely graph.\u201d&gt;\r\n\r\n&lt;\/picture&gt;<\/code><\/pre>\n<h4>Remember one kind of fallback is nothing at all<\/h4>\n<p>If you&#8217;re using the SVG as a background-image, that&#8217;s probably decorational and non-vital to the site working, so that&#8217;s likely a situation where no fallback is OK. <\/p>\n<p>Similarly with SVG embellishments of any kind, like an icon that is accompanied by a word in a button. Without that SVG, it&#8217;s still a button with a word, so acceptable fallback.<\/p>\n<h3>Alrighty Then<\/h3>\n<p>If this post didn&#8217;t mean much to you because you aren&#8217;t using SVG yet, you should because it&#8217;s awesome. <a href=\"https:\/\/css-tricks.com\/using-svg\/\">This post<\/a> could help you get started.<\/p>\n<p>If you have more data to share, we&#8217;d love to hear.<\/p>\n<p>Good luck! <\/p>\n","protected":false},"excerpt":{"rendered":"<p>UPDATE: Here&#8217;s a more comprehensive guide to SVG fallbacks we&#8217;ve published. There is a very clever technique by Alexey Ten [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"inline_featured_image":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"c2c_always_allow_admin_comments":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[4],"tags":[469],"class_list":["post-147254","post","type-post","status-publish","format-standard","hentry","category-articles","tag-svg"],"acf":{"show_toc":"No"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":195363,"url":"https:\/\/css-tricks.com\/inline-svg-grunticon-fallback\/","url_meta":{"origin":147254,"position":0},"title":"Inline SVG with Grunticon Fallback","author":"Chris Coyier","date":"February 9, 2015","format":false,"excerpt":"In which we look at Grunticon and how it can be used as the fallback system even if you want to start with inline SVG in the document.","rel":"","context":"In &quot;Articles&quot;","block_context":{"text":"Articles","link":"https:\/\/css-tricks.com\/category\/articles\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":199370,"url":"https:\/\/css-tricks.com\/a-complete-guide-to-svg-fallbacks\/","url_meta":{"origin":147254,"position":1},"title":"SVG Fallbacks Guide","author":"Amelia Bellamy-Royds","date":"May 4, 2015","format":false,"excerpt":"If you're using SVG and are worried about unsupported environments, this is the guide for you. There is no single solution, since how you use SVG dictates the fallback.","rel":"","context":"In &quot;Articles&quot;","block_context":{"text":"Articles","link":"https:\/\/css-tricks.com\/category\/articles\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2015\/05\/svg-fallback-guide.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2015\/05\/svg-fallback-guide.png?fit=1200%2C600&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2015\/05\/svg-fallback-guide.png?fit=1200%2C600&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2015\/05\/svg-fallback-guide.png?fit=1200%2C600&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2015\/05\/svg-fallback-guide.png?fit=1200%2C600&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":162310,"url":"https:\/\/css-tricks.com\/test-support-svg-img\/","url_meta":{"origin":147254,"position":2},"title":"Test for Support of SVG as img","author":"Chris Coyier","date":"February 10, 2014","format":false,"excerpt":"Browser support for SVG isn't quite as simple as yes or no. In addition to some quirks on how that support plays out, it depends on how that SVG is being used. One common way is right within an image tag, like . How can you detect if a browser\u2026","rel":"","context":"In &quot;Articles&quot;","block_context":{"text":"Articles","link":"https:\/\/css-tricks.com\/category\/articles\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":168417,"url":"https:\/\/css-tricks.com\/icon-fonts-vs-svg\/","url_meta":{"origin":147254,"position":3},"title":"Inline SVG vs Icon Fonts [CAGEMATCH]","author":"Chris Coyier","date":"April 22, 2014","format":false,"excerpt":"If you're building an icon system for a site, you have some options. If you know the icons need to be raster images, then you'll likely be using CSS sprites. If the icons will be vector images (much more common these days), you have some options. Two of those options\u2026","rel":"","context":"In &quot;Articles&quot;","block_context":{"text":"Articles","link":"https:\/\/css-tricks.com\/category\/articles\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":20319,"url":"https:\/\/css-tricks.com\/using-svg\/","url_meta":{"origin":147254,"position":4},"title":"Using SVG","author":"Chris Coyier","date":"March 5, 2013","format":false,"excerpt":"SVG is an image format for vector graphics. It literally means Scalable Vector Graphics. Basically, what you work with in Adobe Illustrator. You can use SVG on the web pretty easily, but there is plenty you should know. Why use SVG at all? Small file sizes that compress well Scales\u2026","rel":"","context":"In &quot;Articles&quot;","block_context":{"text":"Articles","link":"https:\/\/css-tricks.com\/category\/articles\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":187949,"url":"https:\/\/css-tricks.com\/svg-animation-on-css-transforms\/","url_meta":{"origin":147254,"position":5},"title":"SVG Animation and CSS Transforms: A Complicated Love Story","author":"Jack Doyle","date":"November 10, 2014","format":false,"excerpt":"The following is a guest post by Jack Doyle, author of the GreenSock Animation Platform (GSAP). Jack has been deep in the woods of web animation for a long time, trying to make it easier and better. He's written here before, talking about how JavaScript animation can be the most\u2026","rel":"","context":"In &quot;Articles&quot;","block_context":{"text":"Articles","link":"https:\/\/css-tricks.com\/category\/articles\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/147254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=147254"}],"version-history":[{"count":20,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/147254\/revisions"}],"predecessor-version":[{"id":201570,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/147254\/revisions\/201570"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=147254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/categories?post=147254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=147254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}