{"componentChunkName":"component---src-templates-tag-jsx","path":"/tag/performance/","result":{"data":{"contentfulTag":{"title":"Performance","id":"d7a7c8c4-e306-53c5-a10d-348f33697e1d","slug":"performance","post":[{"id":"7e54470c-db49-5981-942c-a11981eaf392","title":"Practical use cases for the picture element","slug":"practical-use-cases-for-the-picture-element","publishDate":"February 01, 2016","publishDateISO":"2016-02-01","heroImage":{"title":"css-rule","fluid":{"aspectRatio":0.9847715736040609,"src":"/archive/v3/ctf/251b5b526cce50c7.jpg","srcSet":"/archive/v3/ctf/2f677f399f0407a1.jpg 388w","srcWebp":"/archive/v3/ctf/683e90762363d1a7.webp","srcSetWebp":"/archive/v3/ctf/fc305290d3d1e42d.webp 388w","sizes":"(max-width: 1800px) 100vw, 1800px"}},"body":{"childMarkdownRemark":{"timeToRead":3,"html":"<p>The brave new world of responsive images has already been explored and explained in great detail all over the web (see <a href=\"#resource-list\">resource list below</a>). Most of these resources advise against using the <code class=\"language-text\">&lt;picture/&gt;</code> element for standard images since it’s far more declarative and doesn’t allow the browser to automagically choose an image based on the user’s network and screen resolution. (hint: srcset does this, so use this method when including images you don’t need declarative control over.) If a majority of the web agrees that the <code class=\"language-text\">&lt;img/&gt;</code> tag accompanied with the new srcset and sizes attributes is the most pragmatic solution where does that leave the poor ‘ol <code class=\"language-text\">&lt;picture/&gt;</code> element? 😥</p>\n<p>The stand alone <code class=\"language-text\">&lt;img/&gt;</code> and <code class=\"language-text\">srcset</code> method trumps in all cases except art direction and type-switching fallback support. This post simply showcases these two use cases for quick reference and experimentation. For more information on the <code class=\"language-text\">&lt;picture/&gt;</code> element and the responsive images spec, refer to the list of resources below.</p>\n<h2 id=\"art-direction\" style=\"position:relative;\"><a href=\"#art-direction\" aria-label=\"art direction permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Art direction</h2>\n<p>The most pragmatic use case for the <code class=\"language-text\">&lt;picture/&gt;</code> element is art direction. The <code class=\"language-text\">srcset</code> and <code class=\"language-text\">media</code> attributes give you full control of serving different images to various viewport sizes. This comes in handy when you need to serve cropped, or different sized images to multiple viewports for art directed media or for readability purposes.</p>\n<p><a class=\"code-example\" href=\"https://codepen.io/coreybruyere/pen/zqgKxp\">Code Example</a></p>\n<div class=\"gatsby-highlight\" data-language=\"html\"><pre class=\"language-html\"><code class=\"language-html\">  <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>picture</span><span class=\"token punctuation\">></span></span>\n    <span class=\"token comment\">&lt;!---[if IE 9]>&lt;video style=\"display: none;\">&lt;![endif]--></span>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>source</span> <span class=\"token attr-name\">srcset</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>/image-full.jpg<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">media</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>(min-width: 1024px)<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>source</span> <span class=\"token attr-name\">srcset</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>/image-close.jpg<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">media</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>(min-width: 768px)<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span>\n    <span class=\"token comment\">&lt;!---[if IE 9]>&lt;/video>&lt;![endif]--></span>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>img</span> <span class=\"token attr-name\">src</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>/image-closer.jpg<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">alt</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>Image Description<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">/></span></span>\n  <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>picture</span><span class=\"token punctuation\">></span></span></code></pre></div>\n<p><em>Resize your browser window and notice how cropped and resized versions are served as you resize to a smaller viewport. Notice how declarative the picture method is? Giving it a new media source at different media queries makes for a practical solution for art direction.</em></p>\n<figure>\n  <picture>\n    <source srcset=\"/archive/v3/ctf/a2eb64b5ff83da81.jpg\" media=\"(min-width: 1024px)\"/>\n    <source srcset=\"/archive/v3/ctf/051690dc322dd0b3.jpg\" media=\"(min-width: 768px)\"/>\n    <img src=\"/archive/v3/ctf/f46203a095867034.jpg\" alt=\"Twin Peaks Red Room\"/>\n  </picture>\n  <figcaption>\n    <blockquote>\n      The picture element is used when you need explicit control\n      over which source is shown at set viewport sizes.\n    </blockquote>\n    <cite>– Picturefill docs</cite>\n  </figcaption>\n</figure>\n<h2 id=\"type-switching\" style=\"position:relative;\"><a href=\"#type-switching\" aria-label=\"type switching permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Type switching</h2>\n<p>The <code class=\"language-text\">&lt;picture/&gt;</code> spec provides a <code class=\"language-text\">type</code> attribute that you can use on any nested <code class=\"language-text\">&lt;source/&gt;</code> element. This provides you with a viable fallback solution for older browser that don’t support new images formats, e.g., <code class=\"language-text\">.webp</code>, <code class=\"language-text\">.svg</code>.</p>\n<p><a class=\"code-example\" href=\"http://codepen.io/coreybruyere/pen/PNMGPY\">Code Example</a></p>\n<div class=\"gatsby-highlight\" data-language=\"html\"><pre class=\"language-html\"><code class=\"language-html\">  <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>picture</span><span class=\"token punctuation\">></span></span>\n    <span class=\"token comment\">&lt;!--[if IE 9]>&lt;video style=\"display: none;\">&lt;![endif]--></span>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>source</span> <span class=\"token attr-name\">srcset</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>/pattern-example.svg<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">type</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>image/svg xml<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span>\n    <span class=\"token comment\">&lt;!--[if IE 9]>&lt;/video>&lt;![endif]--></span>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>img</span> <span class=\"token attr-name\">src</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>/pattern-example.png<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">alt</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>Image Description<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">/></span></span>\n  <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>picture</span><span class=\"token punctuation\">></span></span></code></pre></div>\n<figure>\n  <picture>\n    <!-- [if IE 9]><video style=\"display: none;\"><![endif]-->\n    <source srcset=\" /archive/v3/ctf/17e2ba840ce3e871.svg\" type=\"image/svg+xml\" />\n    <!-- [if IE 9]></video><![endif]-->\n    <img src=\"/archive/v3/ctf/9c1a3b0977cdf06e.png\" alt=\"Image Description\"/></picture>\n  <figcaption>\n    <blockquote>The types attribute is used to send an alternate image source format only to browsers that support that format, and a fallback source to browsers that do not. Unlike existing solutions, the picture element makes these negotiations using a single request.\n    </blockquote>\n    <cite>– Picturefill Docs</cite>\n  </figcaption>\n</figure>\n<h2 id=\"resource-list\" style=\"position:relative;\"><a href=\"#resource-list\" aria-label=\"resource list permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Resource list</h2>\n<ul>\n \t<li><a href=\"http://codepen.io/Tigt/post/when-responsive-images-get-ugly#media-conditions-not-media-queries\">When Responsive Images Get Ugly</a></li>\n \t<li><a href=\"http://ericportis.com/posts/2014/srcset-sizes/\">Srcset and sizes</a></li>\n \t<li><a href=\"http://blog.cloudfour.com/dont-use-picture-most-of-the-time/\">Don’t Use Picture Most of the Time</a></li>\n \t<li><a href=\"http://sarasoueidan.com/blog/svg-picture/\">Better SVG Fallback and Art Direction With The picture Element</a></li>\n \t<li><a href=\"https://css-tricks.com/responsive-images-youre-just-changing-resolutions-use-srcset/\">Responsive Images: If you’re just changing resolutions, use srcset</a></li>\n \t<li><a href=\"http://www.smashingmagazine.com/2014/05/responsive-images-done-right-guide-picture-srcset/\">Responsive Images Done Right: A Guide To <picture> And srcset</picture></a></li>\n \t<li><a href=\"https://usecases.responsiveimages.org/\">Use Cases and Requirements for Standardizing Responsive Images</a></li>\n \t<li><a href=\"https://html.spec.whatwg.org/multipage/embedded-content.html\">Spec</a></li>\n</ul>","excerpt":"The brave new world of responsive images has already been explored and explained…"}}},{"id":"92be9949-616f-55b2-b025-db56cd33a3de","title":"CSS audit with Parker","slug":"css-audit-with-parker","publishDate":"June 06, 2016","publishDateISO":"2016-06-06","heroImage":{"title":"sailing-around-the-bay","fluid":{"aspectRatio":1.5100671140939597,"src":"/archive/v3/ctf/28f0ee4123a82b23.jpg","srcSet":"/archive/v3/ctf/c73bfb0cb076f919.jpg 450w,\n/archive/v3/ctf/a5309c870cb16245.jpg 900w,\n/archive/v3/ctf/5b41f2341f78844f.jpg 1800w","srcWebp":"/archive/v3/ctf/fd97ca9aea400033.webp","srcSetWebp":"/archive/v3/ctf/4ba9f255eaf40cac.webp 450w,\n/archive/v3/ctf/ad814d61e4d38a3f.webp 900w,\n/archive/v3/ctf/258b4c55c3aecc37.webp 1800w","sizes":"(max-width: 1800px) 100vw, 1800px"}},"body":{"childMarkdownRemark":{"timeToRead":3,"html":"<p>While reading Harry Roberts’ article <a href=\"http://csswizardry.com/2016/06/improving-your-css-with-parker/\">Improving Your CSS with Parker</a>, I decided I’d follow along by auditing this very site to see what I could improve. While this is only a small portfolio/blog site, I still wanted to see what CSS improvements I could be making since I use the same base CSS framework on every project. I’m just using this post to document each metric and explain what I should be doing to improve my score. For a more in-depth explanation of Parker and each metric you should head over to the <a href=\"https://github.com/katiefenn/parker\">docs</a>.</p>\n<h3 id=\"total-stylesheets\" style=\"position:relative;\"><a href=\"#total-stylesheets\" aria-label=\"total stylesheets permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Total Stylesheets</h3>\n<p>Auditing one stylesheet, main.css</p>\n<h3 id=\"total-stylesheet-size\" style=\"position:relative;\"><a href=\"#total-stylesheet-size\" aria-label=\"total stylesheet size permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Total Stylesheet Size</h3>\n<p><strong>42990 bytes, or 42.99 KB</strong>. Not bad, seeing that the average stylesheet size is 76 KB. Then again, this is a small portfolio site. Maybe it’s time for a refractor?</p>\n<h3 id=\"total-rules-selectors-identifiers-and-declarations\" style=\"position:relative;\"><a href=\"#total-rules-selectors-identifiers-and-declarations\" aria-label=\"total rules selectors identifiers and declarations permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Total Rules, Selectors, Identifiers, and Declarations</h3>\n<p>I had to do a quick Google search to find out the difference between a selector and identifier. Here’s a crude drawing of the anatomy of a CSS rule.</p>\n<p><img src=\"/archive/v3/ctf/9b7b4a4fdc282264.jpg\" alt=\"css-rule\"></p>\n<p><code class=\"language-text\">Rules = 517</code>\n<code class=\"language-text\">Selectors = 589</code>\n<code class=\"language-text\">Identifiers = 918</code>\n<code class=\"language-text\">Declarations = 1447</code></p>\n<p>Harry also defines a custom metric by dividing <strong>Total Declarations</strong> by <strong>Total Rules</strong>, which gives us the average Declarations Per Ruleset. The lower this number is, the better. I’m content with my ~2.8 number.</p>\n<p><strong>Declartions Per Ruleset = 2.798839458</strong></p>\n<h3 id=\"selectors-per-rule\" style=\"position:relative;\"><a href=\"#selectors-per-rule\" aria-label=\"selectors per rule permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Selectors Per Rule</h3>\n<p><code class=\"language-text\">1.1392649903288201</code>. Doing good here, I just need to completely move away from the few @extends I use and use single-purpose classes instead of attaching multiple selectors to the same declarations, e.g. grouping all the various input types to the same CSS declarations.</p>\n<h3 id=\"identifiers-per-selector\" style=\"position:relative;\"><a href=\"#identifiers-per-selector\" aria-label=\"identifiers per selector permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Identifiers Per Selector:</h3>\n<p><code class=\"language-text\">1.7351443123938879</code>. Don’t nest classes to maintain a score between 1 and 2.</p>\n<h3 id=\"specificity-per-selector\" style=\"position:relative;\"><a href=\"#specificity-per-selector\" aria-label=\"specificity per selector permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Specificity Per Selector:</h3>\n<p><code class=\"language-text\">10.750424448217318</code>. Harry explains the specificity rating for this metric. Anything near a 10 is excellent, but don’t ever go over 20.\nTop Selector Specificity:</p>\n<ol start=\"41\">\n<li>Ouch, I can explain..</li>\n</ol>\n<h3 id=\"top-selector-specificity-selector\" style=\"position:relative;\"><a href=\"#top-selector-specificity-selector\" aria-label=\"top selector specificity selector permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Top Selector Specificity Selector:</h3>\n<p><code class=\"language-text\">.post__title a:visited~.post__status:after</code>. This one was necessary. I was shooting for the neat, CSS-only unread post status and it required a hefty selector.</p>\n<h3 id=\"total-id-selectors\" style=\"position:relative;\"><a href=\"#total-id-selectors\" aria-label=\"total id selectors permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Total Id Selectors:</h3>\n<p><code class=\"language-text\">0</code>. All the cool kids <strong>DON’T</strong> use ID selectors.</p>\n<h3 id=\"total-unique-colors\" style=\"position:relative;\"><a href=\"#total-unique-colors\" aria-label=\"total unique colors permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Total Unique Colors:</h3>\n<p><code class=\"language-text\">13</code>. Lucky 13.</p>\n<h3 id=\"unique-colors\" style=\"position:relative;\"><a href=\"#unique-colors\" aria-label=\"unique colors permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Unique Colors:</h3>\n<p><code class=\"language-text\">#FFFF00, #000000, #FFFFFF, #515554, #009688, #FF9800, #CFD2D2, #ACACAC, #F1F1F1, #E74C3C, #F1C40F, #2980B9, #27AE60</code></p>\n<h3 id=\"total-important-keywords\" style=\"position:relative;\"><a href=\"#total-important-keywords\" aria-label=\"total important keywords permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Total Important Keywords:</h3>\n<p><code class=\"language-text\">50</code>. All important declarations are attached to utility helpers.</p>\n<h3 id=\"total-media-queries\" style=\"position:relative;\"><a href=\"#total-media-queries\" aria-label=\"total media queries permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Total Media Queries:</h3>\n<p><code class=\"language-text\">14</code></p>\n<h3 id=\"media-queries\" style=\"position:relative;\"><a href=\"#media-queries\" aria-label=\"media queries permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Media Queries:</h3>\n<p><code class=\"language-text\">(min-width:0em), (min-width:37.5em), (min-width:64em), screen and (max-width:47.999375em), screen and (min-width:34.375em), screen and (min-width:20em), screen and (min-width:48em), screen and (min-width:64em), screen and (min-width:78.5em), screen and (min-width:100em), screen and (max-width:78.499375em), screen and (max-width:19.999375em), screen and (max-width:34.374375em), screen and (max-width:63.999375em)</code></p>","excerpt":"While reading Harry Roberts’ article Improving Your CSS with Parker, I decided I…"}}}]}},"pageContext":{"slug":"performance","limit":6,"skip":0,"numPages":1,"currentPage":1}},"staticQueryHashes":[]}