<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Brittan McGinnis on Medium]]></title>
        <description><![CDATA[Stories by Brittan McGinnis on Medium]]></description>
        <link>https://medium.com/@brittanmcginnis?source=rss-638afded2114------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*cRsA7JiLXNZdgyXl.jpg</url>
            <title>Stories by Brittan McGinnis on Medium</title>
            <link>https://medium.com/@brittanmcginnis?source=rss-638afded2114------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 15:05:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@brittanmcginnis/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How To Use the CSS Transform Property]]></title>
            <link>https://medium.com/the-dirty-coder/how-to-use-the-css-transform-property-b3b31f31316f?source=rss-638afded2114------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3b31f31316f</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css-animation]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Brittan McGinnis]]></dc:creator>
            <pubDate>Tue, 08 May 2018 03:17:21 GMT</pubDate>
            <atom:updated>2018-05-08T03:25:17.245Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y9kYM96wqim37GX7G-Kqcw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/13PjNBaDMcg?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">David Clode</a> on <a href="https://unsplash.com/search/photos/transform?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>I’m setting out to learn CSS animations and the transform property was the second piece on my list.</p><p>My goal of this post is to teach (so that I can better learn), the very basics of transform.</p><p>This property is super cool and was actually pretty fun to learn. I would suggest playing around with it if you are not familiar.</p><h4>Basics</h4><p>You should have a basic understanding of CSS and HTML prior to reading this article.</p><h4>Introduction</h4><p>This journey that I’m on to learn CSS animations has a super important learning element to it. I basically find and filter information pertaining to this concept. Make a list of learning comprehensions that need to be understood before I can say I “know” the thing. Do those things, be it reading articles, doing exercises, watching videos, reading books, etc. one by one. Then I play around. I have no set goal when doing this. Just to play in the most basic sense. Break stuff. Have fun. Mostly this step is to develop questions. Then research and answer my questions. Then teach. That could be a blog post, teaching a friend or just explaining in depth the concept.</p><p>During this post I may gloss over some other concepts. This post is mainly just for the CSS transform property. However, I will be using the transition property quite a bit as well. If you would like to read further on that, I have another blog post for <a href="https://dev.to/brittanmcg/how-to-use-the-css-transition-property-20mm">that</a>.</p><h4>Transforms</h4><p>CSS transform has 6 main property values:</p><ul><li>scale</li><li>translate</li><li>rotate</li><li>skew</li><li>perspective</li><li>matrix</li></ul><p>In truth it has way more, because many of those values have an X, Y and Z property. For the sake of brevity though, I will not display that entire list. If you would like to take a look, you can see it <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/transform">here</a>.</p><p>I’ll explain below what each one of the values does.</p><h4>Lets play with these</h4><p>Below, I’ll build 7 examples cards. Each will perform the animation that it’s named.</p><h4>Starter Code</h4><pre>&lt;div class=&quot;container&quot;&gt;<br>  &lt;div class=&quot;translate&quot;&gt;<br>&lt;p&gt;translate&lt;/p&gt;<br>  &lt;/div&gt;  <br>&lt;/div&gt;<br>@import url(https://fonts.googleapis.com/css?family=Open+Sans);<br><br>body {<br>  background: lightblue;<br>  font-family: &#39;Open Sans&#39;;<br>}<br><br>.translate {<br>  margin: 50px auto;<br>  background: papayawhip;<br>  width: 150px;<br>  height: 150px;<br>  border-radius: 20px;<br>}<br><br>p {<br>  margin-top: 60px;<br>}</pre><h4>Adds hover psuedo class</h4><p>This moves the element down the Y axis 100px. While kinda cool and useful depending on your use case, it is not very graceful and does not animate very nicely. Next we’ll add a transition to make this animate smoothly.</p><pre>// ...<br><br>.translate:hover {<br>  transform: translateY(100px);<br>}<br>// ...<br><br>.translate {<br>  // ...<br>  transition: 1s ease;<br>}<br><br>.translate:hover {<br>  transform: translateY(100px);<br>}</pre><h4>Scale</h4><p>Add a duplicate of the previous div and name the class to the property that we will be changing.</p><p>I will not include this code for the following examples as it is the same.</p><pre>&lt;div class=&quot;container&quot;&gt;<br>  &lt;div class=&quot;translate&quot;&gt;<br>&lt;p&gt;translate&lt;/p&gt;<br>  &lt;/div&gt;  <br>  &lt;div class=&quot;scale&quot;&gt;<br>&lt;p&gt;scale&lt;/p&gt;<br>  &lt;/div&gt;  <br>&lt;/div&gt;</pre><p>Here we’ll add a text-align center to the .container so the elements will be in the center of this container.</p><p>Then we’ll change the margin and display properties so they sit next to each other.</p><pre>// …</pre><pre>.container {<br>  text-align: center;<br>}<br><br>.translate, .scale {<br>  margin: 50px 10px auto;<br>  display: inline-block;<br>  background: papayawhip;<br>  width: 150px;<br>  height: 150px;<br>  border-radius: 20px;<br>  transition: 1s ease;<br>}<br><br>p {<br>  margin-top: 60px;<br>}<br><br>// ...</pre><p>Then we’ll add a scale property on hover. This will shrink it to 1/2 of it&#39;s original size. Because I only provide one value it uses that value for both the x and y coordinates.</p><pre>// ...<br>.scale:hover {<br>  transform: scale(.5);<br>}</pre><p>If I provide it a second value then it will apply the value to the x and y coordinates respectively.</p><pre>// ...<br>.scale:hover {<br>  transform: scale(.5, 2);<br>}</pre><h4>Rotate</h4><p>After you have duplicated the html and renamed the class and inner text for the p tag to rotate, then add the rotate class to our base styling for our divs like so:</p><p>.translate, .scale, .rotate {</p><p>Then we’ll add an :active psuedo class to the .rotate class. This way when we click on that element it rotates.</p><p>The rotate value takes a turn value or a degree value.</p><p>rotate takes a negative or positive value. If you were to give this transform: rotate(-360deg) for example it would turn counter-clockwise</p><pre>// ...<br><br>.rotate:active {<br>  transform: rotate(360deg);<br>}<br><br>// This accomplishes the same thing as above<br>.rotate:active {<br>  transform: rotate(1turn);<br>}</pre><h4>Skew</h4><p>The skew value will &#39;tilt&#39; the element to one side depending on the value given. As with many of these functions you can specify either scaleX, scaleY or scale. If you pass in only one value to scale() it will give the Y axis a 0 value which will then only scale the X axis.</p><p>The skew value also takes degree values, turns or radius as parameters. This signature looks like this: skew(10deg) or skew(-0.06turn, 18deg) or skew(.312rad). Taken from the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/skew">MDN docs</a>.</p><p>Skew can be a little tricky because you may only want to skew the container of an element and not the inner content. In that case you will have to skew in reverse.</p><p>Below you can see an example of skewing the div but keeping the text inside un-skewed.</p><ol><li>We’ll duplicate our html, change our class name and our inner text like so &lt;p&gt;skew&lt;/p&gt;</li><li>We’ll add .skew to our growing list of elements targeted in our base CSS</li></ol><p>Now we’ll add a skew value to this element.</p><pre>// ...<br><br>.skew:hover {<br>   transform: skew(10deg)<br>}</pre><p>Problem with this is that it skews the inner text as well. We can remedy that by giving it an inverse value of the same amount and targeting that element.</p><pre>.skew:hover p {<br>  transform: skew(-10deg);<br>}</pre><p>This is still kind of weird looking because the text corrects itself on hover. I’m not sure if there is a more natural way to fix this. I couldn’t come up with one in this contrived example. If any reader has a better way please let me know in the comments.</p><h4>Perspective</h4><p>The perspective value is used to give some perspective to 3d elements. You are targeting the z-index so that it looks as thought the element is popping out of the page. The point that the perspective originates from is the center. You can alter this using the perspective-origin value. I will however use the transform-origin property because I am using this on the transform property and on the perspective property.</p><p>For this example I will use both the perspective and the transform-origin values. I&#39;ll make it look as though the card is flipping up and out from the bottom.</p><p>Copy the code from the last example and add the respective class and supporting css.</p><p>Then add this to the hover state.</p><pre>// ...<br>.perspective {<br>  transform-origin: top;<br>}<br><br>.perspective:hover {<br>  transform: perspective(300px) rotateX(50deg);<br>}</pre><h4>Matrix</h4><p>The matrix function is a little more complex and admittedly the one that I spent the least amount of time playing with. Also it requires that you have a pretty good understanding of linear algebra and the Cartesian coordinates system (which I do not), in order to really understand what is going on.</p><p>There is both a matrix and a matrix3d function. The matrix function is behind every transform function. For example, when you are calling rotateX(30deg), you are actually saying matrix(0.86602540, 0.50000000, -0.50000000, 0.86602540, 0, 0);. There is a cool matrix calculator for rotate <a href="http://www.boogdesign.com/examples/transforms/matrix-calculator.html">here</a>, where you can see the value of your rotation.</p><p>2d transforms are a 3x3 matrix of integers where 3d transforms are a 4x4 matrix. Hence the arguments passed to each function respectively.</p><p>Big thanks to this deep dive article <a href="https://dev.opera.com/articles/understanding-the-css-transforms-matrix/">Understanding the CSS Transforms Matrix</a> by <a href="https://twitter.com/webinista">Tiffany Brown</a>.</p><p>Here I’ll make this card flip up and out to the left using the matrix function.</p><p>We’ll add our html and css same as with the previous cards, then you can add this :hover state to the .matrix class</p><pre>// ...<br>.matrix:hover {<br>  transform: matrix(.5, -1, 0, .5, 0, 0);<br>}</pre><p>The matrix3d can create the illusion of 3 dimensions in 2 dimensions using CSS. The signature takes 16 arguments as coordinates.</p><p>I’ll copy all the stuff I just did for Matrix and just add 3d to the class name and text. Then we’ll rotate this card up, right and out at the bottom using the matrix3d function. We&#39;ll do this on the :active psuedo class.</p><pre>// ...<br>.matrix3d:active {<br>  transform: matrix3d(0.8535533905932737, 0.4999999999999999, 0.14644660940672619, 0, -0.4999999999999999, 0.7071067811865476, 0.4999999999999999, 0, 0.14644660940672619, -0.4999999999999999, 0.8535533905932737, 0, 22.62994231491119, -20.3223304703363, 101.3700576850888, 1);<br>}</pre><p>Below is a pen of all the examples.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Fkonamax123%2Fembed%2Fpreview%2FaGZGVG%3Fheight%3D600%26slug-hash%3DaGZGVG%26default-tabs%3Dcss%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io%26embed-version%3D2&amp;url=https%3A%2F%2Fcodepen.io%2Fkonamax123%2Ffull%2FaGZGVG&amp;image=https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fi.cdpn.io%2F29917.aGZGVG.small.d7ccb7c6-b944-44e2-9daf-e484719851f3.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/8aab0b665ec82e7a265dfe22ca8b49e4/href">https://medium.com/media/8aab0b665ec82e7a265dfe22ca8b49e4/href</a></iframe><h4>Conclusion</h4><p>I would love to hear any feedback that anyone has about my understanding of the transform property. I wrote this post to re-enforce my knowledge of this concept. If I have made any glaring errors please let me know. I will gladly update this post with the correct information.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b3b31f31316f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-dirty-coder/how-to-use-the-css-transform-property-b3b31f31316f">How To Use the CSS Transform Property</a> was originally published in <a href="https://medium.com/the-dirty-coder">The Dirty Coder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Use Chrome Developer Tools v.1]]></title>
            <link>https://medium.com/the-dirty-coder/how-i-use-chrome-developer-tools-v-1-4a776ae7294c?source=rss-638afded2114------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a776ae7294c</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Brittan McGinnis]]></dc:creator>
            <pubDate>Tue, 09 Aug 2016 13:22:04 GMT</pubDate>
            <atom:updated>2016-08-09T13:22:04.258Z</atom:updated>
            <content:encoded><![CDATA[<p>As a developer you may spend a lot of your time reading through your code in your code editor of choice. But I’ll bet that if you spend any amount of time debugging your code you spend a significant amount of time in Chrome’s developer tools. Here are the pieces that I find most useful.</p><p>This will not be and exhaustive tutorial on all the functionality of Chrome’s developer tools but more of a “this is how I use them” kind of post.</p><h4>The Network tab</h4><p>This tab is pretty much indispensable. It allows me to see all the network calls that are being made. Or check to see if the call that I expect to be made is being made. For example: You just implemented some widget to call make a GET request some API and return you back some JSON data. You could use the network tab to make sure that request is being returned successfully and you are getting back a 200 response. You could also check the response tab to see what is being returned.</p><figure><img alt="Response from GET request" src="https://cdn-images-1.medium.com/proxy/1*3MvzYXY11M2ojAMgRg9lTw.png" /><figcaption>Response from GET request</figcaption></figure><p>This is extremely helpful when you are trying to figure out if your call is returning what you expect. This will also help you to visualize the format in which your content is being returned so that you can properly handle it.</p><p>You can also use this tab to look at the data that you are posting to an endpoint. For example say you have to post some information from a form to an endpoint. You can use the Header tab and look at your form data as it posts. Super helpful!</p><figure><img alt="Form data" src="https://cdn-images-1.medium.com/proxy/1*9djAV5M7abXasyklUfTSRg.png" /><figcaption>Form data</figcaption></figure><h4>Console</h4><p>This is the tab that most javascript developers are probably the most familiar with. It’s what you are going to use to log out all your variables that you want to know the value of at runtime. It’s also going to show you errors or warnings in your code. It will catch syntax errors, browser response code errors, and sometimes display warnings that your Framework or library of choice chooses to display.</p><p>It’s also a wonderful tool to just evaluate your javascript in. If you are curious about if you can something evaluates to true, i.e.</p><pre>var one = 1;<br>one == &quot;1&quot;<br>true<br>one === &quot;1&quot;<br>false</pre><p>I use it for this purpose all the time. It’s much more convenient than opening an editor and running a file or opening a REPL.</p><h4>Elements</h4><p>The elements panel show the entire DOM tree as the web browser sees it. You can use this tab to navigate through the structure of your code and verify that elements are nested correctly.</p><p>This is also where I do most of my CSS debugging. If I’m having an issue targeting a specific element when developing I will use this tab to inspect that specific element and look in the styles panel to the right and see which styles are being applied to that element.</p><figure><img alt="Selected element with styles panel on the right" src="https://cdn-images-1.medium.com/proxy/1*ayPSMRi_2ZAgczVNOyIIkw.png" /><figcaption>Selected element with styles panel on the right</figcaption></figure><p>You can also force element states which is extremely useful to see what your button looks like when it’s in hover or clicked state. You can do this by clicking on the little :hov text in the styles panel and clicking on the desired state from the panel.</p><figure><img alt="David Connor&#39;s collection of button hover effects." src="https://cdn-images-1.medium.com/proxy/1*iJDaaQlv7wvibqRrANwxjw.gif" /><figcaption>David Connor’s collection of button hover effects.</figcaption></figure><p>One really cool thing is that Chrome has a color palette tool that allows you to select your web safe color and hex code from the color picker.</p><figure><img alt="Chrome&#39;s color picker tool" src="https://cdn-images-1.medium.com/proxy/1*9Aq02JlbD4Pc5huGSwskOw.png" /><figcaption>Chrome’s color picker tool</figcaption></figure><h4>Resources</h4><p>Here are some great resources that helped me when researching for this post.</p><ul><li><a href="https://developer.chrome.com/devtools/docs/tips-and-tricks">https://developer.chrome.com/devtools/docs/tips-and-tricks</a></li><li><a href="https://www.youtube.com/watch?v=hJdqtBeAUNI&amp;feature=youtu.be">Totally Tooling Tips</a></li><li><a href="https://developers.google.com/web/shows/ttt/series-1/dt-grab-bag?hl=en">https://developers.google.com/web/shows/ttt/series-1/dt-grab-bag?hl=en</a></li><li><a href="http://tutorialzine.com/2015/03/15-must-know-chrome-devtools-tips-tricks/">http://tutorialzine.com/2015/03/15-must-know-chrome-devtools-tips-tricks/</a></li><li><a href="https://developers.google.com/web/tools/chrome-devtools/iterate/inspect-styles/shortcuts?hl=en">https://developers.google.com/web/tools/chrome-devtools/iterate/inspect-styles/shortcuts?hl=en</a></li><li><a href="https://www.codeschool.com/courses/discover-devtools?from_search=dev+too">https://www.codeschool.com/courses/discover-devtools?from<em>search=dev+too</em></a></li></ul><h4>Next Steps</h4><p>I’m going to write a follow up to that will go into some of the other tabs that I use.</p><ul><li>Timeline</li><li>Profiles</li><li>Resources</li><li>Sources</li></ul><p>Chrome’s Dev tools are extremely powerful and has some really cool and empowering features and this post has barely scratched the surface. I would love to hear what others peoples favorite tools are!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a776ae7294c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-dirty-coder/how-i-use-chrome-developer-tools-v-1-4a776ae7294c">How I Use Chrome Developer Tools v.1</a> was originally published in <a href="https://medium.com/the-dirty-coder">The Dirty Coder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[New Blogo Test]]></title>
            <link>https://medium.com/@brittanmcginnis/new-blogo-test-db58fce28a1a?source=rss-638afded2114------2</link>
            <guid isPermaLink="false">https://medium.com/p/db58fce28a1a</guid>
            <dc:creator><![CDATA[Brittan McGinnis]]></dc:creator>
            <pubDate>Sun, 26 Jun 2016 13:03:08 GMT</pubDate>
            <atom:updated>2016-06-26T13:03:08.683Z</atom:updated>
            <content:encoded><![CDATA[<p>var myFun = function myFun () { console.log(‘some text here’); } myFun();</p><p>Some more text here.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db58fce28a1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>