<?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 Matthew Garrett on Medium]]></title>
        <description><![CDATA[Stories by Matthew Garrett on Medium]]></description>
        <link>https://medium.com/@matthewdtotheg?source=rss-b9079a06c835------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*oFYhzT-AOsK5bgR3.</url>
            <title>Stories by Matthew Garrett on Medium</title>
            <link>https://medium.com/@matthewdtotheg?source=rss-b9079a06c835------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 15:15:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@matthewdtotheg/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[The Bootstrap grid system for beginners]]></title>
            <link>https://medium.com/@matthewdtotheg/the-bootstrap-grid-system-for-beginners-f3fc4519663e?source=rss-b9079a06c835------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3fc4519663e</guid>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Matthew Garrett]]></dc:creator>
            <pubDate>Tue, 03 Apr 2018 12:26:51 GMT</pubDate>
            <atom:updated>2018-04-03T12:26:51.258Z</atom:updated>
            <content:encoded><![CDATA[<p>The purpose of this article is to shed some light on all the <a href="https://getbootstrap.com/docs/4.0/layout/grid/">bootstrap grid</a> has to offer and how to easily implement it in your next project. This article assumes you already have bootstrap added to your project and if you have not <a href="https://getbootstrap.com/">here</a> is the documentation accomplish that. The grid is designed as a mobile-first flexbox to build layouts of all shapes and sizes, let’s get started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*AZ5AcmRJZujZArDLcCjAKg.png" /></figure><p>First let’s briefly describe what the <a href="https://www.w3schools.com/css/css3_flexbox.asp">flexbox model</a> is. The foundation of flexbox is the container element which has the class display flex. The child elements inside of the container react to the the parent changing in size and stack in several different ways you can define as you wish. You can align and manipulate the elements from within the container. You can read more about the flexbox <a href="http://flexbox model">here</a>.</p><p>The code below is a very basic example of a simple three column grid which will be center aligned in the page thanks to the parent container element. To start off there must always be a wrapper div with the class container followed by your corresponding row class. The grid is laid out with 12 possible columns with can be broken up to suit your sites needs. You designate the columns with the col class and either -sm for small, -md medium, and -lg for large which we will discuss in a little later.</p><pre>&lt;div class=&quot;container&quot;&gt;<br>  &lt;div class=&quot;row&quot;&gt;<br>    &lt;div class=&quot;col-sm&quot;&gt;<br>      One of three columns<br>    &lt;/div&gt;<br>    &lt;div class=&quot;col-sm&quot;&gt;<br>      One of three columns<br>    &lt;/div&gt;<br>    &lt;div class=&quot;col-sm&quot;&gt;<br>      One of three columns<br>    &lt;/div&gt;<br>  &lt;/div&gt;<br>&lt;/div&gt;</pre><p>Lets go into a more in-depth description as to what each class is actually doing for you.</p><ul><li>Containers provide a means to center and horizontally pad your site’s contents. Use .container for a responsive pixel width or .container-fluid for width: 100%across all viewport and device sizes.</li><li>Rows are wrappers for columns. Each column has horizontal padding (called a gutter) for controlling the space between them. This padding is then counteracted on the rows with negative margins. This way, all the content in your columns is visually aligned down the left side. The gutter is the margin of the rows. Which can be removed if you wish by using no-gutters in the.row class.</li><li>You can specify the exact amount of columns you want elemtent to cover with .col-4 .col-5 .col-6 ect. Classes indicate how many columns out of the twelve you intend that column to take up. You must be sure that sum of your columns is always twelve for the grid to behave properly.</li><li>To make the grid responsive, there are five grid breakpoints shown below.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gWFYSX5wh8_Yw-4OMGgjew.png" /></figure><p>Extra small would be cell phones, small typically quates to tablets, Large equals laptops and small desktops. XL for hefty sized monitors.</p><p>So what do these queries actually mean and how can they be used? Using class=&quot;col-xs-12 col-sm-6 col-md-4 col-lg-3&quot; all at the same time is used to activate different CSS properties on an element when viewing the page on a particular device. In other words if a person visits a website on a desktop, col-lg-3 mean’s that a total of four columns would be displayed, col-md-4 a total of three columns, two columns for col-sm-6 and only one for col-xs-12 with a width of 100%. Being able to simply create a class for each different screen type makes responsive design quick and painless. Overall bootstrap’s grid is a great way to quickly make a great looking mobile friendly website.</p><p>Works cited:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fe5VQampkqdg%3Fstart%3D275%26feature%3Doembed%26start%3D275&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3De5VQampkqdg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fe5VQampkqdg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2dfc0ed33d0fe9f2d32187c7bc8751c9/href">https://medium.com/media/2dfc0ed33d0fe9f2d32187c7bc8751c9/href</a></iframe><p><a href="https://www.w3schools.com/css/css3_flexbox.asp">https://www.w3schools.com/css/css3_flexbox.asp</a></p><p><a href="https://getbootstrap.com/docs/4.0/layout/grid/">https://getbootstrap.com/docs/4.0/layout/grid/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3fc4519663e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Animations with ScrollReveal.js]]></title>
            <link>https://medium.com/@matthewdtotheg/animations-with-scrollreveal-js-e4062961cbb9?source=rss-b9079a06c835------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4062961cbb9</guid>
            <dc:creator><![CDATA[Matthew Garrett]]></dc:creator>
            <pubDate>Wed, 28 Feb 2018 02:50:57 GMT</pubDate>
            <atom:updated>2018-02-28T19:23:03.293Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*idpT5sopU1QadJagaSWFiQ.png" /></figure><p><a href="https://scrollrevealjs.org/">ScrollReveal.js</a> is a light weight javascript animation library that is fully responsive across all devices and browsers. It allows you to add some spice to otherwise humdrum web pages and portfolio sites. The library is just 3Kbs in size if minified and requires no dependencies, making installation to new or existing websites quick and easy. Before we get into the installation let’s talk about all the awesome animations it can do!</p><p>You are able to make any HTML element fade in from any direction, distance, duration, or easing style. By default, animations will begin fading in from the bottom at a distance of 20px. Any valid CSS distance is able to be used e.g rem, %, vw and px. The starting location, scale, distance, duration and easing are all fully customizable and simple to adjust. <a href="http://andywolff.co/">This</a> website is a great example of the different animations.</p><p>There are several different ways to install the library which you can find in the <a href="https://github.com/jlmakes/scrollreveal">documentation</a> but the simplest method to get you up and running is to simply include the link to provided in the documentation before your closing HTML body tag.</p><pre>&lt;script src=&quot;https://unpkg.com/scrollreveal/dist/scrollreveal.min.js&quot;&gt;&lt;/script&gt;</pre><p>There is also a option to install with npm and bower if you prefer. Once installed, pick the HTML elements that you would like to manipulate and create a CSS class on those elements.</p><pre>&lt;!-- HTML --&gt;<br>&lt;div class=&quot;reveal&quot;&gt; Cool stuff &lt;/div&gt;</pre><p>In your javascript file include the below code to initialize the library.</p><pre>window.sr = ScrollReveal();<br>sr.reveal(&#39;.reveal&#39;);</pre><p>Congratulations! The default animation should now be up and running! Here is the functionality that comes baked in.</p><pre>// &#39;bottom&#39;, &#39;left&#39;, &#39;top&#39;, &#39;right&#39;<br>origin: &#39;bottom&#39;,<br><br>// Can be any valid CSS distance, e.g. &#39;5rem&#39;, &#39;10%&#39;, &#39;20vw&#39;, etc.<br>distance: &#39;20px&#39;,<br><br>// Time in milliseconds.<br>duration: 500,<br>delay: 0,<br><br>// Starting angles in degrees, will transition from these values to 0 in all axes.<br>rotate: { x: 0, y: 0, z: 0 },<br><br>// Starting opacity value, before transitioning to the computed opacity.<br>opacity: 0,<br><br>// Starting scale value, will transition from this value to 1<br>scale: 0.9,<br><br>// Accepts any valid CSS easing, e.g. &#39;ease&#39;, &#39;ease-in-out&#39;, &#39;linear&#39;, etc.<br>easing: &#39;cubic-bezier(0.6, 0.2, 0.1, 1)&#39;,<br><br>// `&lt;html&gt;` is the default reveal container. You can pass either:<br>// DOM Node, e.g. document.querySelector(&#39;.fooContainer&#39;)<br>// Selector, e.g. &#39;.fooContainer&#39;<br>container: window.document.documentElement,<br><br>// true/false to control reveal animations on mobile.<br>mobile: true,<br><br>// true:  reveals occur every time elements become visible<br>// false: reveals occur once as elements become visible<br>reset: false,<br><br>// &#39;always&#39; — delay for all reveal animations<br>// &#39;once&#39;   — delay only the first time reveals occur<br>// &#39;onload&#39; - delay only for animations triggered by first load<br>useDelay: &#39;always&#39;,<br><br>// Change when an element is considered in the viewport. The default value<br>// of 0.20 means 20% of an element must be visible for its reveal to occur.<br>viewFactor: 0.2,<br><br>// Pixel values that alter the container boundaries.<br>// e.g. Set `{ top: 48 }`, if you have a 48px tall fixed toolbar.<br>// --<br>// Visual Aid: https://scrollrevealjs.org/assets/viewoffset.png<br>viewOffset: { top: 0, right: 0, bottom: 0, left: 0 },<br><br>// Callbacks that fire for each triggered element reveal, and reset.<br>beforeReveal: function (domEl) {},<br>beforeReset: function (domEl) {},<br><br>// Callbacks that fire for each completed element reveal, and reset.<br>afterReveal: function (domEl) {},<br>afterReset: function (domEl) {}</pre><p>Now for some customization! In your javascript file include a javascript object that matches the name of your ScrollReveal class and adjust the functionality with the keywords included in the documentation. Let’s say you would like to have a longer delay and a origin location of left instead of bottom. Here is what that would look like.</p><pre>const reveal = {<br>  origin : &#39;left&#39;,<br>  delay    : 200,<br>  distance : &#39;120px&#39;,<br>  easing   : &#39;ease-in-out&#39;,<br>};</pre><p>These animations can also be reused on whichever element you desire. If you would like to have the same one on every div on your site, no problem!</p><p>You can also do sequenced animations! This can be accomplished by passing a sequence interval to your method. Make sure to not get confused between the duration time of the animation and the sequence interval time.</p><pre>window.sr = ScrollReveal({ duration: 2000 });<br>sr.reveal(&#39;.box&#39;, 50);</pre><p>In this example both durations are in milliseconds. 50 is the sequence reveal and 2000 is the duration. These are just a few of the amazing things you can do with ScrollReveal.js. With it’s light weight and simplicity to install it is one of the very best javascript library’s for making on scroll animations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4062961cbb9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>