<?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 Paul Stonier on Medium]]></title>
        <description><![CDATA[Stories by Paul Stonier on Medium]]></description>
        <link>https://medium.com/@pstonier?source=rss-6fd6f1a93b63------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*rW-yzUT4VQRbo4LBzhjnOg.jpeg</url>
            <title>Stories by Paul Stonier on Medium</title>
            <link>https://medium.com/@pstonier?source=rss-6fd6f1a93b63------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 07:33:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pstonier/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[Modular Web Design Meets WordPress with Advanced Custom Fields]]></title>
            <link>https://medium.com/@pstonier/modular-web-design-meets-wordpress-with-advanced-custom-fields-c262dc87dbc0?source=rss-6fd6f1a93b63------2</link>
            <guid isPermaLink="false">https://medium.com/p/c262dc87dbc0</guid>
            <category><![CDATA[web-design]]></category>
            <category><![CDATA[wordpress]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Paul Stonier]]></dc:creator>
            <pubDate>Fri, 05 Feb 2016 04:47:28 GMT</pubDate>
            <atom:updated>2018-04-17T14:25:52.343Z</atom:updated>
            <content:encoded><![CDATA[<p>Modular web design is comprised of two types of patterns — <a href="http://danielmall.com/articles/content-display-patterns/">Content Patterns and Display Patterns</a> — and WordPress has been the perfect tool for me to put them together.</p><p>Let’s understand how each of these work…</p><h4>Content Patterns</h4><p>Content comes in many different forms &amp; types. Each format has specific attributes that need to be communicated. For example, an event may have a registration date, a max capacity, etc. A business listing should let their customers know when the business hours are and how to get ahold of them.</p><p>CMS’s have been getting a bad rep for not being flexible enough to handle all these different Content Patterns. They generally are regarded as this single box that you throw content into. For those of us who have a deeper understanding of what’s possible and actually very obtainable without a ton of extra effort. WordPress has — built into it — custom post types &amp; custom fields. These two features are exactly what you need to handle Content Patterns effectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AQ4d8VtFTC5-s3xQUbsS-g.png" /></figure><h4>Moving Beyond Pages &amp; Posts</h4><p><a href="http://www.wpbeginner.com/wp-tutorials/how-to-create-custom-post-types-in-wordpress/"><strong>Custom post types</strong></a> provide a way to identify and group each <strong>Content Pattern</strong>. If you’ve ever used a plugin to manage events, a portfolio of work, points on a map… you name it, it’s probably been done. This is all possible thanks to custom post types. And in many cases, you need a way to group these lil’ nuggets of joy into subsections. For this, we’ll look to <strong>custom taxonomies</strong>. And while it pays to be a PHP wiz, you don’t need to have any magic powers to take advantage of these handy features. The awesome team at <a href="https://webdevstudios.com/">WebDevStudios</a> have created a badass plugin called <a href="https://wordpress.org/plugins/custom-post-type-ui/">CPT UI</a> to make it easy for anyone to build these out.</p><h4>Custom Fields</h4><p>In order to create an authoring process that aligns with the structure of your content, you need the right kind of inputs for each attribute. That’s what custom fields are for. Sure, you can <a href="https://codex.wordpress.org/Custom_Fields">code these by hand</a>, but why go through that hassle, when Elliot Condon has made our lives sooo much easier with <a href="http://www.advancedcustomfields.com/pro/">Advanced Custom Fields (PRO)</a> ❤. ACF Pro’s Flexible Content field enables us to break out of the rigidity of templates and enter into a powerful mode of building pages in a modular way.</p><h3>Here’s how it works</h3><p>For each field group that you designate for your post type, you can define your own ‘layout’. A layout let you define your own post-type-specific modules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/296/1*344XRLvEHVSwhd1xeLtloA.png" /></figure><p>Each module(“layout”) has a set of fields that you define.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h2JX1YcCN4_NYmIBXmaUZQ.png" /></figure><p>For each field, you have a number of formats to choose from.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M25j3ju6GnzVRwdlt3vHLQ.png" /></figure><p>The ‘Flexible Content’ field allows you have build one modular after another.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EPVXscLChXesivYLQjdv8g.jpeg" /></figure><p>Resulting in a very <em>flexible</em> process for building pages for any kind of content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*holfpAWCo24tbz7Jftixhw.png" /></figure><h4>Theming with Advanced Custom Fields</h4><p>To connect this back to the front-end, you’ll need to follow the excellent <a href="http://www.advancedcustomfields.com/resources/">ACF Documentation</a> to build these fields into your templates.</p><p>This example checks for a value in the field and if the field is populated, it then renders the content from the field.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f49e02731e81270a89244f4e28db754c/href">https://medium.com/media/f49e02731e81270a89244f4e28db754c/href</a></iframe><p>Through a handful of nested conditionals, you can build out a more complex page builder. See the <a href="https://github.com/pstonier/rapid-springs/blob/master/page-sections-flex.php">full example</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6b7ba7d04264835e56db738a883403b0/href">https://medium.com/media/6b7ba7d04264835e56db738a883403b0/href</a></iframe><p>This is only one of many methods to build a webpage in a modular way, but it’s become my favorite. I hope that you can take this and riff on it, tear it apart and make something cool. Let me know where you land and let’s build something.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c262dc87dbc0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up and using Pattern Lab]]></title>
            <link>https://medium.com/@pstonier/setting-up-and-using-patternlab-4b2d8ccd9558?source=rss-6fd6f1a93b63------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b2d8ccd9558</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[atomic-design]]></category>
            <dc:creator><![CDATA[Paul Stonier]]></dc:creator>
            <pubDate>Sun, 09 Aug 2015 12:16:02 GMT</pubDate>
            <atom:updated>2015-08-09T12:19:37.684Z</atom:updated>
            <content:encoded><![CDATA[<p>As a way to help out the development community, I’ve put together a video of setting up Pattern Lab and how to use it. Trying to get started was initially daunting as the documentation isn’t 100% straightforward, but once you get it, it’s a nice little system. One thing that I didn’t explicitly mention in the video is that you’ll want to work in the ‘source’ folder and then that will generate an updated ‘public’ folder from which you’ll use as your Pattern Lab.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FL4Xm8y2hd_s%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DL4Xm8y2hd_s&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FL4Xm8y2hd_s%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7819730bafd8db3bea48a227147d9574/href">https://medium.com/media/7819730bafd8db3bea48a227147d9574/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b2d8ccd9558" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up Bourbon, Neat and Bitters along with some troubleshooting]]></title>
            <link>https://medium.com/@pstonier/setting-up-bourbon-neat-and-bitters-along-with-some-troubleshooting-139e801c98a?source=rss-6fd6f1a93b63------2</link>
            <guid isPermaLink="false">https://medium.com/p/139e801c98a</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[sass]]></category>
            <dc:creator><![CDATA[Paul Stonier]]></dc:creator>
            <pubDate>Sun, 09 Aug 2015 10:30:26 GMT</pubDate>
            <atom:updated>2015-08-09T10:30:26.412Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a follow-up from my <a href="https://medium.com/@pstonier/using-bourbon-neat-for-css-grid-structure-with-semantic-markup-cd1b13d48dc1">previous post</a>; giving a demonstration of what I was explaining. This video walks you through the initial set up and workflow of using Neat as a responsive grid for your web projects. Enjoy.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FEDP-iUd5ZPI%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DEDP-iUd5ZPI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FEDP-iUd5ZPI%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d792df3820fa30fa5516595f10f891cd/href">https://medium.com/media/d792df3820fa30fa5516595f10f891cd/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=139e801c98a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Bourbon Neat for CSS Grid Structure with Semantic Markup]]></title>
            <link>https://medium.com/@pstonier/using-bourbon-neat-for-css-grid-structure-with-semantic-markup-cd1b13d48dc1?source=rss-6fd6f1a93b63------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd1b13d48dc1</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[sass]]></category>
            <dc:creator><![CDATA[Paul Stonier]]></dc:creator>
            <pubDate>Wed, 13 May 2015 08:38:59 GMT</pubDate>
            <atom:updated>2016-03-23T22:37:38.088Z</atom:updated>
            <content:encoded><![CDATA[<p>Semantic markup makes me happy.</p><p><a href="http://neat.bourbon.io/">Bourbon Neat</a> gives me a way to use a grid structure on my web page AND be happy. When we look at the most widely adopted grid systems — such as Bootstrap, Foundation, 960 Grid System, Skeleton — there is an inherent problem with the standard way it’s used.</p><h4>The Problem: Presentation Classes</h4><p>Each of these systems involve applying classes to elements in your markup that look something like this:</p><pre>&lt;section id=”content” class=”row”&gt;<br>   &lt;article class=”<strong>small-12 medium-10 large-8 columns</strong>”&gt;<br>      &lt;h1&gt;…&lt;/h1&gt;<br>      &lt;p&gt;…&lt;/p&gt;<br>   &lt;/article&gt;<br>   &lt;aside class=”<strong>small-12 medium-2 large-4 columns</strong>”&gt;…&lt;/aside&gt;<br>&lt;/section&gt;</pre><p>This means that if I want to adjust how the content is displayed, I have to change my markup.</p><h4>Keeping things where they belong</h4><p>When your HTML is describing how something looks. Something is broken.</p><p><strong>The Content Layer:<br></strong>Your content should be able to be understood independent of the rules on how it looks. This ends up being rendered as HTML, but could start in a number of different forms (JSON, XML, markdown, etc).</p><p><strong>The Presentation Layer:</strong><br>It’s hard to talk about the separation of content and presentation without going back to the <a href="http://www.csszengarden.com/">CSS Zen Garden</a>. It’s a beautiful demonstration of CSS’s role in providing a home for presentation, while the content resides in the markup.</p><p><strong>Behavior Layer:</strong><br>This is where stuff happens based on events. Generally speaking, this is JavaScript’s home.</p><p>By maintaining these lines of separation, you’re positioning yourself for a better workflow in which someone responsible for the layout or style of the content of the page only needs to work in the CSS of the project. If you were able to apply these column spans from your grid system to your elements in the project’s CSS rather the HTML, you elimate the need for these darn presentation classes.</p><p>It could look something like this:</p><pre>&lt;section id=”content”&gt;<br>   &lt;article&gt;<br>      &lt;h1&gt;…&lt;/h1&gt;<br>      &lt;p&gt;…&lt;/p&gt;<br>   &lt;/article&gt;<br>   &lt;aside&gt;…&lt;/aside&gt;<br>&lt;/section&gt;</pre><p>Ahhhh. Now doesn’t that feel nice? Our markup is semantically telling us about our content and nothing more. So, how do we get the same effect of a grid system without junking up our HTML? That’s where <a href="http://neat.bourbon.io/">Bourbon Neat</a> comes in.</p><h4>What is Bourbon Neat?</h4><p>Neat is a set of SASS mixins that build on top of Bourbon, which builds on top of SASS. It gives us the ability to apply those column spans in your SASS, to then be outputted into your compiled CSS. Thus, giving you the end result of a functioning grid system while keeping our HTML nice and tidy.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FEDP-iUd5ZPI%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DEDP-iUd5ZPI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FEDP-iUd5ZPI%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d792df3820fa30fa5516595f10f891cd/href">https://medium.com/media/d792df3820fa30fa5516595f10f891cd/href</a></iframe><p>Here’s what that would look like (based on a standard 12 column grid):</p><pre>#content {<br>   @include outer-container;<br> <br>   article {<br>      @include span-columns(8);<br> <br>      @include media($medium-screen) {<br>         @include span-columns(10);<br>      }<br>      @include media($small-screen) {<br>         @include span-columns(12); <br>      }</pre><pre>   }<br>   aside {<br>      @include span-columns(4); </pre><pre>      @include media($medium-screen) {<br>         @include span-columns(2);<br>      }<br>      @include media($small-screen) {<br>         @include span-columns(12);<br>      }<br>      <br>   }<br>}</pre><p>This is a nice place to start, but Neat actually offers some additional control that is pretty…well…neat.</p><h4>The Grid Settings (_grid_settings.scss)</h4><p>Using Neat, you can change the number of columns in your grid at each breakpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*Q7Q3PGXRIApd-GyH_hGbBQ.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/09505ba86a99a14aed1e22c6fd58ec57/href">https://medium.com/media/09505ba86a99a14aed1e22c6fd58ec57/href</a></iframe><p>Let’s breakdown what’s happening here. If we look at the $small-screen line, you’ll see some simple math happening $first-breakpoint (defined above as 400px) – 1 = 399px which is then converted to ems. Then, the number at the end of the line defines the number of columns in the grid at that breakpoint. If that number is blank, the default number of $grid-columns is applied.</p><p>The reason for the math here is used here is to scaffold the media queries rather than cascading them over each other. This will come in handy when getting into the omega mixin.</p><p>If I want to set up a group of content — let’s say an image gallery — where I want each image to take up 1/4 of the page on the desktop. I’ll write it like this:</p><pre>.gallery .item {<br>    @include span-columns(3);<br>    @include omega(4n);<br>}</pre><p>In this case, each ‘.item’ is going to span 3 of my 12 columns — fitting 4 across. However, without the omega, the margin-right used to establish the gutter would make the 4th-child being too wide for the container, which will result in that object getting bumped down below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AZaUKzVMjFmy6R1sND7U7g.png" /></figure><h4>What Omega Does</h4><pre>.gallery .item:nth-child(4n) { margin-right: 0; }<br>.gallery .item:nth-child(4n+1) { clear: left; }</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UcGcwJB1Od7b5kS462J4Jg.png" /></figure><h4>Using Media Queries with Omega</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fc14a01ffb0cd42d3814f163f516f091/href">https://medium.com/media/fc14a01ffb0cd42d3814f163f516f091/href</a></iframe><p>Because the media queries set up above do not overlap, we avoid running into having omega(1n) AND omega(2n) AND omega(4n) being applied to the content simultaneously.</p><h4>Extending to Make it more DRY</h4><p>Web content frequently takes up a general proportion of the page width based on the size of the screen. For example: one-third on a desktop, then 100% on tablets and phones. We can turn each common distribution of space into their own mixin.</p><p>I’ve put together the following mixins.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/322993fbbb96615a41d0c4a511e035d7/href">https://medium.com/media/322993fbbb96615a41d0c4a511e035d7/href</a></iframe><p>This gives me a reusable way to handle a block of content responsively with a single line of SASS.</p><pre>.gallery .item { @include one-quarter; }</pre><p>The -nom suffix is a convention for “no omega”. Leaving omega out in this case, makes them a little more versatile in situations such as a one-third/two-thirds distribution. Leaving the omega out of the mixin allows you to put the sidebar(one-third) on either side. Then add the omega to the object.</p><pre>#content {<br>    @include outer-container;<br> <br>    article {<br>       @include two-thirds-nom;<br>    }<br>    aside {<br>       @include one-third-nom;<br>       @include omega;<br>    }<br>}</pre><h4>Added Bonuses</h4><p><strong>Partial Columns:</strong> By using SASS for my column-spans, you can use partial columns for you widths. For example: two-thirds of an 8 column grid would be @include span-columns(5.33);</p><p><strong>Visual Grid:</strong> In the grid settings file, you can set $visual-grid to true to see an overlay of the grid on top or below your content. This is helpful with debugging what’s going on if things are lining up correctly. You can even adjust the color and opacity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XJMtNsvvWzdk7ygXZslXgQ.png" /><figcaption>Visual Grid</figcaption></figure><p>There are a number of other grid systems taking on this same type of practice. <a href="http://susy.oddbird.net/">Susy</a> is quite comparable. Some people are doing the same thing with <a href="https://www.ostraining.com/blog/coding/bootstrap-right-way/">Bootstrap using LESS and .make-lg-columns(3);</a> <a href="https://zurb.com/expo/lessons/get-real-with-a-semantic-grid">ZURB even has a document covering thi</a>s. This is just the solution that I’ve adopted and it’s working quite beautifully. Let me know what you find works for you.</p><h4>Additional Resources</h4><p><a href="https://www.youtube.com/watch?v=8ItNE_DX6Cc">How to make your CSS awesome with Bourbon, Neat, Bitters and Refills!</a></p><p><a href="https://www.youtube.com/watch?v=EDP-iUd5ZPI">https://www.youtube.com/watch?v=EDP-iUd5ZPI</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd1b13d48dc1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>