{"id":1635,"date":"2016-03-13T20:06:08","date_gmt":"2016-03-13T20:06:08","guid":{"rendered":"http:\/\/www.nathankowald.com\/blog\/?p=1635"},"modified":"2017-03-11T11:33:19","modified_gmt":"2017-03-11T11:33:19","slug":"responsive-utility-classes","status":"publish","type":"post","link":"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/","title":{"rendered":"Responsive utility classes"},"content":{"rendered":"<p>Utility classes serve a single purpose.<br \/>\nExamples of utility classes: <tt class=\"code\">.align-left, .float-left, .clearfix<\/tt><br \/>\n<em>Responsive<\/em> utility classes allow you to create very flexible responsive websites.<\/p>\n<p><strong>This post is about what makes a great responsive utility class.<\/strong><\/p>\n<p>I&#8217;ll talk about: <a href=\"#naming\">naming<\/a> and <a href=\"#inclusive-and-exclusive-pattern\">a useful pattern<\/a>.<\/p>\n<p><em>For a good introduction to utility classes I suggest David Clark&#8217;s excellent article <a href=\"http:\/\/davidtheclark.com\/on-utility-classes\/\" target=\"_blank\">here<\/a>.<\/em><\/p>\n<h2 id=\"naming\">Naming<\/h2>\n<p>I don&#8217;t like namespaced or aliased utility classes.<br \/>\nI don&#8217;t like them because they are <a href=\"http:\/\/www.boston.com\/bostonglobe\/ideas\/articles\/2010\/01\/31\/easy__true\/\" target=\"_blank\">harder to think about<\/a>.<\/p>\n<p>An example of a bad utility class is: <tt class=\"code\">.u-mt-10@md<\/tt><\/p>\n<p><strong>Why is this bad?<\/strong><br \/>\nYou must know that <tt class=\"code\">.u<\/tt> is a convention for utility classes.<br \/>\nYou must know that <tt class=\"code\">mt<\/tt> refers to margin-top.<br \/>\nYou must know that <tt class=\"code\">@md<\/tt> means this utility class targets &#8220;Medium&#8221; sized devices.<\/p>\n<p><strong>What&#8217;s an alternative?<\/strong><\/p>\n<blockquote><p>Utility classes should use CSS property names and values: <tt class=\"code\">.<strong>margin-top<\/strong>-10-xs<\/tt><\/p><\/blockquote>\n<p>It is clear that this utility class adds 10 pixels of top margin.<br \/>\nUsers familiar with Bootstrap&#8217;s grid system may guess that this targets &#8220;Extra small&#8221; viewports and greater.<\/p>\n<h2 id=\"inclusive-and-exclusive-pattern\">Pattern: Inclusives and Exclusives<\/h2>\n<p>Two types of responsive utility classes are needed when building layouts: inclusives and exclusives.<\/p>\n<ol>\n<li><strong>Inclusive<\/strong>: You need a utility class to target a specific device size and everything greater than it (most common)<\/li>\n<li><strong>Exclusive<\/strong>: You need a utility class to only target a specific device size<\/li>\n<\/ol>\n<blockquote><p>Separate responsive utility classes into two categories: inclusives and exclusives.<\/p><\/blockquote>\n<p>A simple naming convention in your utility class tells you how it will behave.<\/p>\n<h3>Inclusives<\/h3>\n<p><strong>Inclusive classes include the named device size and device sizes greater than itself.<\/strong><\/p>\n<p>When you use Bootstrap&#8217;s responsive grid you only have to define an element as <tt class=\"code\">.col-xs-12<\/tt> and you get 12 columns on mobiles, tablets and desktops.<\/p>\n<p>Noticing that this simple pattern results in less classes showed me that by default all responsive utility classes should behave this way.<\/p>\n<blockquote><p>Responsive utility classes are inclusives by default.<\/p><\/blockquote>\n<p>Every utility class that uses the convention of <tt class=\"code\">.property-value-deviceSize<\/tt> is an inclusive class.<\/p>\n<p>You may have noticed our utility classes follow a different convention to Bootstrap&#8217;s columns.<\/p>\n<p>Bootstrap uses: <tt class=\"code\">.property-<strong>deviceSize<\/strong>-value<\/tt><br \/>\nWe use: <tt class=\"code\">.property-value-<strong>deviceSize<\/strong><\/tt><\/p>\n<p>This was intentional because it&#8217;s easier to think about.<\/p>\n<p>When creating an element I know I want to apply 10 pixels of top margin to an element. The targeted device is a detail.<\/p>\n<blockquote><p>In my head I&#8217;ll say &#8220;margin top 10 on mobiles and greater&#8221;, not &#8220;margin top on mobiles and greater, of 10 pixels&#8221;.<\/p><\/blockquote>\n<p>How inclusives look in code<\/p>\n<pre class=\"prettyprint lang-scss\" data-start-line=\"1\" data-visibility=\"visible\" data-highlight=\"\" data-caption=\"\">\r\n\/* Inclusives *\/\r\n\r\n\/\/ Mobile and >\r\n.margin-top-10-xs {\r\n    margin-top: 10px;\r\n}\r\n\/\/ Tablet and >\r\n@media screen and (min-width: $screen-sm-min) {\r\n    .margin-top-10-sm {\r\n        margin-top: 10px;\r\n    }\r\n}\r\n\/\/ Desktop and >\r\n@media screen and (min-width: $screen-md-min) {\r\n    .margin-top-10-md {\r\n        margin-top: 10px;\r\n    }\r\n}<\/pre>\n<h3>Exclusives<\/h3>\n<p><strong>Exclusives target the named device size only.<\/strong><\/p>\n<p>They follow this convention: <tt class=\"code\">.property-value-<strong>only<\/strong>-deviceSize<\/tt><br \/>\nA margin top of 10 pixels applied to only mobiles looks like: <tt class=\"code\">.margin-top-10-<strong>only<\/strong>-xs<\/tt><\/p>\n<p>How exclusives look in code.<\/p>\n<pre class=\"prettyprint lang-scss\" data-start-line=\"1\" data-visibility=\"visible\" data-highlight=\"\" data-caption=\"\">\r\n\/* Exclusives *\/\r\n\r\n\/\/ Mobile - max-width used\r\n@media screen and (max-width: $screen-xs-max) {\r\n    .margin-top-10-only-xs {\r\n         margin-top: 10px;\r\n     }\r\n}\r\n\/\/ Tablet\r\n@media screen and (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {\r\n    .margin-top-10-only-sm {\r\n        margin-top: 10px;\r\n    }\r\n}\r\n\/\/ Desktop\r\n@media screen and (min-width: $screen-md-min) {\r\n    .margin-top-10-only-md {\r\n        margin-top: 10px;\r\n    }\r\n}<\/pre>\n<p>Distinguishing between inclusive and exclusive classes leads to incredibly flexible responsive utility classes.<\/p>\n<h2>Structural responsive utility classes<\/h2>\n<p>Copy this pattern for other structural properties.<\/p>\n<blockquote><p>Responsive utility classes are almost always used on structural CSS.<\/p><\/blockquote>\n<p>&#8211; Margin<br \/>\n&#8211; Padding<br \/>\n&#8211; <a href=\"https:\/\/github.com\/n8kowald\/sass-setup\/blob\/master\/utilities\/_line-breaks.scss\" target=\"_blank\">Line breaks<\/a><\/p>\n<h2>Utility classes should be imported last<\/h2>\n<p>Adding utility classes last helps you avoid specificity issues.<br \/>\nUsing Sass or Less simply import your utility classes last.<br \/>\nBy including our utilities last, I&#8217;ve not had to use !important yet.<\/p>\n<pre class=\"prettyprint lang-scss\" data-start-line=\"1\" data-visibility=\"visible\" data-highlight=\"\" data-caption=\"\">\r\n@import base\/reset.scss;\r\n@import layout\/layout.scss\r\n@import module\/headers.scss;\r\n@import page\/homepage.scss;\r\n@import utilities\/utilities.scss;<\/pre>\n<h2>tl;dr<\/h2>\n<p>By naming our responsive utility classes with valid CSS property names and values we have created clear, easy to use utility classes that don&#8217;t require education &#8211; if you are familiar with CSS properties already.<\/p>\n<p>By breaking responsive utility classes into inclusives and exclusives by <tt class=\"code\">-xs<\/tt> being inclusives and <tt class=\"code\">-only-xs<\/tt> being exclusives, our responsive utility classes are very flexible.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Utility classes serve a single purpose. Examples of utility classes: .align-left, .float-left, .clearfix Responsive utility classes allow you to create very flexible responsive websites. This post is about what makes a great responsive utility class. I&#8217;ll talk about: naming and a useful pattern. For a good introduction to utility classes I suggest David Clark&#8217;s excellent [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[27,28,7],"tags":[],"class_list":["post-1635","post","type-post","status-publish","format-standard","hentry","category-css","category-responsive-design","category-web-development"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Utility classes serve a single purpose. Examples of utility classes: .align-left, .float-left, .clearfix Responsive utility classes allow you to create very flexible responsive websites. This post is about what makes a great responsive utility class. I&#039;ll talk about: naming and a useful pattern. For a good introduction to utility classes I suggest David Clark&#039;s excellent\" \/>\n\t<meta name=\"robots\" content=\"noarchive, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n\t<meta name=\"author\" content=\"Nathan Kowald\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Nathan&#039;s Blog | Web development and useful information\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Responsive utility classes \u2014 Nathan&#039;s Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Utility classes serve a single purpose. Examples of utility classes: .align-left, .float-left, .clearfix Responsive utility classes allow you to create very flexible responsive websites. This post is about what makes a great responsive utility class. I&#039;ll talk about: naming and a useful pattern. For a good introduction to utility classes I suggest David Clark&#039;s excellent\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2016-03-13T20:06:08+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2017-03-11T11:33:19+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Responsive utility classes \u2014 Nathan&#039;s Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Utility classes serve a single purpose. Examples of utility classes: .align-left, .float-left, .clearfix Responsive utility classes allow you to create very flexible responsive websites. This post is about what makes a great responsive utility class. I&#039;ll talk about: naming and a useful pattern. For a good introduction to utility classes I suggest David Clark&#039;s excellent\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/2016\\\/03\\\/responsive-utility-classes\\\/#article\",\"name\":\"Responsive utility classes \\u2014 Nathan's Blog\",\"headline\":\"Responsive utility classes\",\"author\":{\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/author\\\/ozymandias\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/2016\\\/03\\\/responsive-utility-classes\\\/#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/854acd146177108a75d95bc5fe67d244ccd1cd444eb62abe806923d3113f4319?s=96&d=mm&r=pg\",\"width\":96,\"height\":96,\"caption\":\"Nathan Kowald\"},\"datePublished\":\"2016-03-13T20:06:08+10:30\",\"dateModified\":\"2017-03-11T11:33:19+10:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/2016\\\/03\\\/responsive-utility-classes\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/2016\\\/03\\\/responsive-utility-classes\\\/#webpage\"},\"articleSection\":\"CSS, Responsive design, Web Development\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/2016\\\/03\\\/responsive-utility-classes\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/category\\\/web-development\\\/#listItem\",\"name\":\"Web Development\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/category\\\/web-development\\\/#listItem\",\"position\":2,\"name\":\"Web Development\",\"item\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/category\\\/web-development\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/category\\\/web-development\\\/css\\\/#listItem\",\"name\":\"CSS\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/category\\\/web-development\\\/css\\\/#listItem\",\"position\":3,\"name\":\"CSS\",\"item\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/category\\\/web-development\\\/css\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/2016\\\/03\\\/responsive-utility-classes\\\/#listItem\",\"name\":\"Responsive utility classes\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/category\\\/web-development\\\/#listItem\",\"name\":\"Web Development\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/2016\\\/03\\\/responsive-utility-classes\\\/#listItem\",\"position\":4,\"name\":\"Responsive utility classes\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/category\\\/web-development\\\/css\\\/#listItem\",\"name\":\"CSS\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/#person\",\"name\":\"Nathan Kowald\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/2016\\\/03\\\/responsive-utility-classes\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/854acd146177108a75d95bc5fe67d244ccd1cd444eb62abe806923d3113f4319?s=96&d=mm&r=pg\",\"width\":96,\"height\":96,\"caption\":\"Nathan Kowald\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/author\\\/ozymandias\\\/#author\",\"url\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/author\\\/ozymandias\\\/\",\"name\":\"Nathan Kowald\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/2016\\\/03\\\/responsive-utility-classes\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/854acd146177108a75d95bc5fe67d244ccd1cd444eb62abe806923d3113f4319?s=96&d=mm&r=pg\",\"width\":96,\"height\":96,\"caption\":\"Nathan Kowald\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/2016\\\/03\\\/responsive-utility-classes\\\/#webpage\",\"url\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/2016\\\/03\\\/responsive-utility-classes\\\/\",\"name\":\"Responsive utility classes \\u2014 Nathan's Blog\",\"description\":\"Utility classes serve a single purpose. Examples of utility classes: .align-left, .float-left, .clearfix Responsive utility classes allow you to create very flexible responsive websites. This post is about what makes a great responsive utility class. I'll talk about: naming and a useful pattern. For a good introduction to utility classes I suggest David Clark's excellent\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/2016\\\/03\\\/responsive-utility-classes\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/author\\\/ozymandias\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/author\\\/ozymandias\\\/#author\"},\"datePublished\":\"2016-03-13T20:06:08+10:30\",\"dateModified\":\"2017-03-11T11:33:19+10:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/\",\"name\":\"Nathan's Blog\",\"description\":\"Web development and useful information\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.nathankowald.com\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Responsive utility classes \u2014 Nathan's Blog","description":"Utility classes serve a single purpose. Examples of utility classes: .align-left, .float-left, .clearfix Responsive utility classes allow you to create very flexible responsive websites. This post is about what makes a great responsive utility class. I'll talk about: naming and a useful pattern. For a good introduction to utility classes I suggest David Clark's excellent","canonical_url":"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/","robots":"noarchive, max-snippet:-1, max-image-preview:large, max-video-preview:-1","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/#article","name":"Responsive utility classes \u2014 Nathan's Blog","headline":"Responsive utility classes","author":{"@id":"https:\/\/www.nathankowald.com\/blog\/author\/ozymandias\/#author"},"publisher":{"@id":"https:\/\/www.nathankowald.com\/blog\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/854acd146177108a75d95bc5fe67d244ccd1cd444eb62abe806923d3113f4319?s=96&d=mm&r=pg","width":96,"height":96,"caption":"Nathan Kowald"},"datePublished":"2016-03-13T20:06:08+10:30","dateModified":"2017-03-11T11:33:19+10:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/#webpage"},"isPartOf":{"@id":"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/#webpage"},"articleSection":"CSS, Responsive design, Web Development"},{"@type":"BreadcrumbList","@id":"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.nathankowald.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.nathankowald.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.nathankowald.com\/blog\/category\/web-development\/#listItem","name":"Web Development"}},{"@type":"ListItem","@id":"https:\/\/www.nathankowald.com\/blog\/category\/web-development\/#listItem","position":2,"name":"Web Development","item":"https:\/\/www.nathankowald.com\/blog\/category\/web-development\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.nathankowald.com\/blog\/category\/web-development\/css\/#listItem","name":"CSS"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.nathankowald.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.nathankowald.com\/blog\/category\/web-development\/css\/#listItem","position":3,"name":"CSS","item":"https:\/\/www.nathankowald.com\/blog\/category\/web-development\/css\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/#listItem","name":"Responsive utility classes"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.nathankowald.com\/blog\/category\/web-development\/#listItem","name":"Web Development"}},{"@type":"ListItem","@id":"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/#listItem","position":4,"name":"Responsive utility classes","previousItem":{"@type":"ListItem","@id":"https:\/\/www.nathankowald.com\/blog\/category\/web-development\/css\/#listItem","name":"CSS"}}]},{"@type":"Person","@id":"https:\/\/www.nathankowald.com\/blog\/#person","name":"Nathan Kowald","image":{"@type":"ImageObject","@id":"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/854acd146177108a75d95bc5fe67d244ccd1cd444eb62abe806923d3113f4319?s=96&d=mm&r=pg","width":96,"height":96,"caption":"Nathan Kowald"}},{"@type":"Person","@id":"https:\/\/www.nathankowald.com\/blog\/author\/ozymandias\/#author","url":"https:\/\/www.nathankowald.com\/blog\/author\/ozymandias\/","name":"Nathan Kowald","image":{"@type":"ImageObject","@id":"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/854acd146177108a75d95bc5fe67d244ccd1cd444eb62abe806923d3113f4319?s=96&d=mm&r=pg","width":96,"height":96,"caption":"Nathan Kowald"}},{"@type":"WebPage","@id":"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/#webpage","url":"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/","name":"Responsive utility classes \u2014 Nathan's Blog","description":"Utility classes serve a single purpose. Examples of utility classes: .align-left, .float-left, .clearfix Responsive utility classes allow you to create very flexible responsive websites. This post is about what makes a great responsive utility class. I'll talk about: naming and a useful pattern. For a good introduction to utility classes I suggest David Clark's excellent","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.nathankowald.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/#breadcrumblist"},"author":{"@id":"https:\/\/www.nathankowald.com\/blog\/author\/ozymandias\/#author"},"creator":{"@id":"https:\/\/www.nathankowald.com\/blog\/author\/ozymandias\/#author"},"datePublished":"2016-03-13T20:06:08+10:30","dateModified":"2017-03-11T11:33:19+10:30"},{"@type":"WebSite","@id":"https:\/\/www.nathankowald.com\/blog\/#website","url":"https:\/\/www.nathankowald.com\/blog\/","name":"Nathan's Blog","description":"Web development and useful information","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.nathankowald.com\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"Nathan's Blog | Web development and useful information","og:type":"article","og:title":"Responsive utility classes \u2014 Nathan's Blog","og:description":"Utility classes serve a single purpose. Examples of utility classes: .align-left, .float-left, .clearfix Responsive utility classes allow you to create very flexible responsive websites. This post is about what makes a great responsive utility class. I'll talk about: naming and a useful pattern. For a good introduction to utility classes I suggest David Clark's excellent","og:url":"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/","article:published_time":"2016-03-13T20:06:08+00:00","article:modified_time":"2017-03-11T11:33:19+00:00","twitter:card":"summary","twitter:title":"Responsive utility classes \u2014 Nathan's Blog","twitter:description":"Utility classes serve a single purpose. Examples of utility classes: .align-left, .float-left, .clearfix Responsive utility classes allow you to create very flexible responsive websites. This post is about what makes a great responsive utility class. I'll talk about: naming and a useful pattern. For a good introduction to utility classes I suggest David Clark's excellent"},"aioseo_meta_data":{"post_id":"1635","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-20 21:50:51","updated":"2025-09-13 06:13:17","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.nathankowald.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.nathankowald.com\/blog\/category\/web-development\/\" title=\"Web Development\">Web Development<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.nathankowald.com\/blog\/category\/web-development\/css\/\" title=\"CSS\">CSS<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tResponsive utility classes\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.nathankowald.com\/blog"},{"label":"Web Development","link":"https:\/\/www.nathankowald.com\/blog\/category\/web-development\/"},{"label":"CSS","link":"https:\/\/www.nathankowald.com\/blog\/category\/web-development\/css\/"},{"label":"Responsive utility classes","link":"https:\/\/www.nathankowald.com\/blog\/2016\/03\/responsive-utility-classes\/"}],"_links":{"self":[{"href":"https:\/\/www.nathankowald.com\/blog\/wp-json\/wp\/v2\/posts\/1635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nathankowald.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nathankowald.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nathankowald.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nathankowald.com\/blog\/wp-json\/wp\/v2\/comments?post=1635"}],"version-history":[{"count":96,"href":"https:\/\/www.nathankowald.com\/blog\/wp-json\/wp\/v2\/posts\/1635\/revisions"}],"predecessor-version":[{"id":1823,"href":"https:\/\/www.nathankowald.com\/blog\/wp-json\/wp\/v2\/posts\/1635\/revisions\/1823"}],"wp:attachment":[{"href":"https:\/\/www.nathankowald.com\/blog\/wp-json\/wp\/v2\/media?parent=1635"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nathankowald.com\/blog\/wp-json\/wp\/v2\/categories?post=1635"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nathankowald.com\/blog\/wp-json\/wp\/v2\/tags?post=1635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}