<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	 xmlns:dc="http://purl.org/dc/elements/1.1/"
	 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	 xmlns:admin="http://webns.net/mvcb/"
	 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	 xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title><![CDATA[Web Standards Sherpa Reviews ]]></title>
		<link>http://webstandardssherpa.com/reviews/</link>
		<description></description>
		<dc:language>en</dc:language>
		<dc:creator>admin@webstandardssherpa.com</dc:creator>
		<dc:rights>Copyright 2014</dc:rights>
		<dc:date>2014-12-16T17:00:00+00:00</dc:date>
		<admin:generatorAgent rdf:resource="http://expressionengine.com/" />
	
		<item>
			<title><![CDATA[Sass for Big Sites, Part 2]]></title>
			<dc:creator>Jackie Balzer</dc:creator>
			<description><![CDATA[
					
				
					<figure id="figure-38-1"> <img src="http://webstandardssherpa.com/r/37-1.png" alt="Screenshots of Behance on different devices, including desktop, tablet and smartphone" /> </figure>
<p>In <a href="http://webstandardssherpa.com/reviews/sass-for-big-sites-part-1/">part 1</a> of this series, I detailed how <a href="https://www.behance.net/">Behance</a> maintains the CSS for our giant codebase (over 130 pages large!). I shared how we use Sass and Compass to organize, modularize and streamline code, as well as how we keep code consistent. In this part 2, I'm going to focus on the general &ldquo;care and feeding&rdquo; of your Sass codebase: how to use your modular Sass to create style guides, other tools to maintain code consistency, and ways to keep your team up-to-date on coding standards and guidelines.</p>
<h2>Living Style Guide</h2>
<p>As I described in part 1, Behance utilizes <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#partials">partials</a> for every repeatable module, making it easy to include the styles for a component with just one line of Sass. We rely on the <a href="http://mustache.github.io/">mustache</a> template engine to create small blocks of markup that can be imported and reused in other templates (just like Sass partials). Having our styles and markup split into partials not only makes it easy to manage discrete sections of code, but also makes it easier for us to maintain consistency. Since we only have to update code in one place at a time, there is less danger of breaking or forgetting other parts of the site.</p>
<p>Not only do we use partials to make styling components across the site easy, we also use them to make a living style guide of these components. The style guide serves a purpose for both the designers and the developers by giving us a central place to see what modules already exist and what they look like. The Behance style guide is only available internally, but <a href="http://ux.mailchimp.com/patterns/">MailChimp</a> and <a href="http://www.starbucks.com/static/reference/styleguide/">Starbucks</a> have public ones that are great examples.</p>
<p>Here's an abbreviated look at the markup and Sass for our styleguide:</p>
<h3>styleguide.mustache</h3>
<pre><code>&lt;section&gt;
  &lt;h1&gt;Buttons&lt;/h1&gt;
  {{#buttons}}
    {{&gt; form/button}}
  {{/buttons}}
&lt;/section&gt;

&lt;section&gt;
  &lt;h1&gt;Inputs&lt;/h1&gt;
  &lt;h2&gt;Text&lt;/h2&gt;
  {{#texts}}
    {{&gt; form/text}}
  {{/texts}}

&lt;h2&gt;Checkboxes&lt;/h2&gt;
{{#checkboxes}}
{{&gt; form/checkbox}}
{{/checkboxes}}
&lt;/section&gt;

&lt;section&gt;
  &lt;h1&gt;Multiple Owners&lt;/h1&gt;
  {{&gt; components/_multiple-owners}}
&lt;/section&gt;
&hellip;</code></pre>
<h3>styleguide.scss</h3>
<pre><code>@import '_global/*.scss';
@import '<em></em>partials/multiple-owners.scss';

// styleguide-specific styles
section {
  margin-bottom: 50px;
}</code></pre>
<p>Since the style guide is built using the same exact partials as the rest of the site, any changes made to the individual pieces are reflected immediately in both the front-end of the website and the style guide.</p>
<h2>Documentation</h2>
<p>Let's say you joined Behance as a front-end developer today. How would you find out how we write our Sass? If one of our developers were abducted by aliens in the night, how easy would it be for another person to take over an existing feature or pick up where someone else left off? These are things we've spent a lot of time considering, since it's not just our website that grows, but our team as well.</p>
<h3>Inline Sass Comments</h3>
<p>To reduce the potential for problems, we document everything. We use a documentation style very similar to <a href="http://tomdoc.org/">TomDoc</a> and start every mixin, function and extend with a block of documentation (colloquially, &ldquo;doc block&rdquo;) explaining:</p>
<ul>
<li>what the following piece of code does</li>
<li>what arguments it accepts (if any)</li>
<li>an example for how to use it</li>
</ul>
<p>We write them all in <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#comments">single-line Sass comments</a> so that they do not get compiled into the generated CSS, allowing us to have documentation without worrying about bloating our code with unnecessary comments.</p>
<pre><code>//
// Prints out the width and height of an element.
//
// $width - String or number representation of the element width
// $height - String or number representation of the element height
// false if it is the same as the width
//
// Examples
// @include size(10px);
// @include size(10px, 30px);
//

@mixin size($width, $height: false) {
  width: $width;
  height: if($height, $height, $width);
}</code></pre>
<p>Having documentation inline in our Sass makes it easy to see at a glance what things do as we're working with our code. Although we mainly focus on commenting mixins and functions, it can also be very helpful to have doc blocks for classes, extends and anything else!</p>
<p>There are also third-party tools you can use to generate style guides based on comments like these. <a href="http://warpspire.com/kss/">Knyle Style Sheets</a> (KSS) is a human-readable documentation syntax that uses Ruby to parse these comments and generate a style guide. This makes it easy to show your markup, styles and documentation together in one place. <a href="https://github.com/trulia/hologram">Hologram</a> is a similar tool with a different documentation syntax. No matter what route you go, any documentation is better than none.</p>
<h3>GitHub Wiki</h3>
<p>We also keep a wiki on GitHub containing information that doesn't fit into our style guide or inline comments. It contains information about our Sass that might also extend into our PHP or JavaScript, such as:</p>
<ul>
<li>how to enable or disable the responsive layout and different site footers</li>
<li>how to customize the look and feel of various page headers</li>
<li>If you use Sublime Text, use the <a href="https://packagecontrol.io/packages/Dependents">Dependents package</a> to easily navigate through Sass @import dependencies for any given file.</li>
</ul>
<p>Where the style guide is meant to provide a visualization of different components &mdash; and inline comments are intended to provide information about how a small piece of code works &mdash; the wiki is used as a higher-level utility to provide more robust information about how all the pieces fit together, making it especially useful for new team members to jump into Sass and start using existing components.</p>
<h2>Code Consistency</h2>
<p>For as much as we are the keepers of consistency for the UI of the website, we are also the keepers of consistency for our code. But what does &ldquo;code consistency&rdquo; really mean? It's all about coding style and, at Behance, we place a high value on code consistency and cleanliness. Coding style encompasses many aspects of writing code, such as:</p>
<ul>
<li>how and when to use comments</li>
<li>how and when to use whitespace</li>
<li>naming conventions for variables, functions and mixins</li>
<li>code grouping and organization</li>
</ul>
<p>The list could <a href="http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml">go on</a> <a href="http://contribute.jquery.org/style-guide/js/">and on</a> <a href="https://github.com/necolas/idiomatic-css">and on</a>. Every programmer has their own natural coding style, formed by any number of factors from how they learned to code originally to the editor they like to code in. But these individual styles are less important than consistency, <a href="http://www.smashingmagazine.com/2012/10/25/why-coding-style-matters/">explains Nicholas Zakas</a>:</p>
<blockquote>
<p>&ldquo;I liken the situation to a group of musicians trying to form a band. Each one comes in believing that their way of doing things is best (their "method&rdquo; or &ldquo;process&rdquo;). The band will struggle so long as everyone is trying to do their own thing. It&rsquo;s impossible to create good music unless everyone in the band agrees on the tempo, the style and who should take lead during a song. Anyone who has ever heard a high school band perform knows this to be true. Unless everyone is on the same page, you aren&rsquo;t going to accomplish much.&rdquo;</p>
</blockquote>
<p>We maintain a living wiki in Github of all the coding style standards that our team has agreed on for all of the languages we use (PHP, Sass/CSS, JavaScript and more). Since our standards grow and change over time as we acclimate to new tools, best practices, etc., everyone is a contributor to the coding style guide, and we discuss all changes or additions as a team.</p>
<p>We've set up hooks in Github to run <a href="https://github.com/causes/scss-lint">scss-lint</a> on any Sass code we push before it can go to <code>master</code>, which runs checks on our coding style (or &ldquo;lints&rdquo; it) to make sure the code abides by our standards. There are many other popular linting and code quality tools for other languages (such as <a href="http://www.jshint.com/">JSHint</a>, <a href="https://github.com/mdevils/node-jscs">JSCS</a> and <a href="http://pear.php.net/package/PHP_CodeSniffer/">PHPCS</a> &mdash; all of which we use. And for &ldquo;vanilla&rdquo; CSS, there is <a href="http://csslint.net/">CSS Lint</a>.</p>
<p>These tools mean that our pull request reviews &mdash; the process by which a team member gets their code into <code>master</code> in Git &mdash; are more meaningful, since we can focus on the integrity of the functionality and ideas behind the code, rather than on code style.</p>
<figure id="figure-38-2"> <img src="http://webstandardssherpa.com/r/38-1.png" alt="Linting output from Scss-lint" /> <figcaption>Output from scss-lint lets you know the style problems in your code, which helps unify code style and leads to more meaningful code reviews by others later on.</figcaption> </figure>
<h2>Onwards to Scalable Sass!</h2>
<p>If you've read <a href="http://webstandardssherpa.com/reviews/sass-for-big-sites-part-1/">part 1</a>, you now know how to use Sass to organize and optimize your code using partials, how to utilize powerful Sass and Compass features, and how to create your own custom frameworks. With this part 2, you learned various ways to document and share knowledge of your codebase with other developers, maintain style guides for consistency and transparency, and how to keep code healthy with coding standards and tools. Using these starting points, you and your team can be writing and maintaining healthy code for a big website in no time!</p>
				

				
				<section id="takeaways">			
								<section id="pitfalls" class="takeaway">

					<h1>Pitfalls to Avoid</h1>

					<ul>
<li>Don’t over-fragment your code – you should come up with a system that makes your modular components neatly packaged and easy to&nbsp;understand.</li>
<li>Don’t be afraid to experiment with different documentation styles and tools to find the one that works best for you and your&nbsp;team.</li>
<li>Don’t put off documenting your code. Why do tomorrow what you can do&nbsp;today?</li>
</ul>
				</section>
								<section id="todos" class="takeaway">

					<h1>Things to Do</h1>

					<ul>
<li>Have a set of coding standards that you and your team&nbsp;follow.</li>
<li>Use linting tools to make sure your code is maintaining code style&nbsp;standards.</li>
<li>Keep it simple! The more straightforward your code is, the easier it is to&nbsp;understand.</li>
</ul>
				</section>
				</section>

				

								<section id="further-reading">
					<h1>Further Reading</h1>
					<ul>
				
					
						<li class="article">Hugo Giraudel, &#8220;<a href="https://123.writeboard.com/msjhj3y4do239qa7gh5zo787/v/show/www.sitepoint.com/sassdoc-documentation-tool-sass/">SassDoc: A Documentation Tool for Sass</a>&#8221;, <cite>Sitepoint</cite>, 2 July 2014</li>
				
					
						<li class="tool">Mark Otto, &#8220;<a href="http://codeguide.co/">Code Guide by @mdo</a>&#8221;, Mark Otto, 24 December 2014</li>
				
					
						<li class="article">Chris Coyier, &#8220;<a href="http://codepen.io/chriscoyier/blog/codepens-css">CodePen&#8217;s CSS</a>&#8221;, <cite>CodePen</cite>, 30 July 2014</li>
				
					</ul>
				</section>
							
		]]></description>
					<link>http://webstandardssherpa.com/reviews/sass-for-big-sites-part-2</link>
			<guid>http://webstandardssherpa.com/reviews/sass-for-big-sites-part-2</guid>
			<dc:date>2015-02-10T11:00:00+00:00</dc:date>
		</item>
	
		<item>
			<title><![CDATA[Sass for Big Sites, Part 1]]></title>
			<dc:creator>Jackie Balzer</dc:creator>
			<description><![CDATA[
					
				
					<figure id="figure-37-1"> <img src="http://webstandardssherpa.com/r/37-1.png" alt="Screenshots of Behance on different devices, including desktop, tablet and smartphone" /> </figure>
<p>Writing CSS for a giant, expanding, ever-evolving website is hard. Writing maintainable CSS that is consistent, easy to understand, simple to reuse and hard to break is even harder! At <a href="https://www.behance.net/">Behance</a>, our website reaches over 130 pages, many of which exist in multiple states (e.g. logged in or out) and in a wide range of ages (some pages are brand new, some are over a year old, and one or two persist from over 3 years ago!). We&rsquo;re continuously adding, changing or even slimming down features. And with the constant evolution of the site &mdash; and the team that builds it &mdash; we face many challenges in keeping the site and its codebase organized. Over the years, our process has changed and grown, and Sass has made a tremendous impact on our workflow, how we write code, and how we tackle all of the challenges of maintaining a huge codebase.</p>
<h1>Keepers of Consistency</h1>
<p>As front-end developers, I like to say that we are the &ldquo;keepers of consistency&rdquo; &mdash; the ones responsible for making sure shared UI elements and components are consistent across the entire site for a cohesive look and feel. <a href="http://sass-lang.com/">Sass</a> aids us in ensuring consistency in several ways:</p>
<ul>
<li>We maintain a list of variables for global values, mixins, and functions that are reusable across the site.</li>
<li>We use partials for file management and code organization.</li>
<li>We use some extra techniques for boosting our responsive code</li>
</ul>
<h1>Defaults and Overrides</h1>
<p><a href="http://lesscss.org">All popular</a> <a href="http://learnboost.github.io/stylus/">CSS pre-processors</a> today let you use variables out of the box, something CSS developers dreamed of for years! For this, we keep a <em>_variables.scss</em> file in our root <em>/sass</em> folder which gets <a href="http://sass-lang.com/guide">imported</a> into every Sass file (along with a <em>_mixins.scss</em> and a <em>_functions.scss</em>).</p>
<p>Additionally, sometimes we create smaller <em>_variables.scss</em> files inside page-specific folders if a section of the site needs to share a set of variables that the other parts of the site don&rsquo;t care about. For example, our root <em>_variables.scss</em> contains stuff like this:</p>
<pre><code>// colors
$brand-color: #005cff;
$base-color: #3d3d3d;
$alt-color: #ededed;

// input dimensions
$input-height-small: 25px;
$input-height-normal: 31px;
$input-height-large: 34px;

// general-use breakpoints
$medium-upper-limit: 1024px !default;
$small-upper-limit: 603px !default;

$break-large: ($medium-upper-limit + 1);
$break-medium: ($small-upper-limit + 1) $medium-upper-limit;
$break-small: 0 $small-upper-limit;
$break-small-and-medium: 0 $medium-upper-limit;</code></pre>
<p>The <code>!default</code> flag on some of our variables lets us <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#variable_defaults_">define default values</a>. That is, if the variable has already been assigned, it won&rsquo;t be reassigned. But if it doesn&rsquo;t have a value yet, it will be given one. We sometimes use this to override global values that we want to modify for specific situations.</p>
<p>Many of our reusable components calculate dimensions based on these global variables. For example, one of our reusable components is a grouping of project covers that can appear 1, 2 or 3 images wide depending on our breakpoint values. The reusable component&rsquo;s partial, <em>_gallery_projects.scss</em> automatically outputs the styles needed for the breakpoints defined above.</p>
<figure id="figure-37-2"> <img src="http://webstandardssherpa.com/r/37-2.png" alt="Behance home page on large viewport" /> <figcaption>On a large display, our home page can be sorted by &ldquo;People&rdquo;, where each row includes a preview of each user&rsquo;s three latest projects.</figcaption> </figure> <figure id="figure-37-3"> <img src="http://webstandardssherpa.com/r/37-3.png" alt="Behance home page on an iPad" /> <figcaption>When viewing a list of a user&rsquo;s collections on a smaller device like an iPad, you can see a preview of the two most recently added projects. On a bigger screen, it expands so you can see three.</figcaption> </figure> <figure id="figure-37-4"> <img src="http://webstandardssherpa.com/r/37-4.png" alt="Behance home page on an iPhone" /> <figcaption>On a small device like an iPhone, the layout adjusts so you can see three project covers at a time.</figcaption> </figure>
<p>Any time we want to change the breakpoints for this component, we need to override the global values that the mixin is using like so:</p>
<pre><code>$medium-upper-limit 1200px;
$small-upper-limit: 0 699px;
@include '_variables.scss';
@include '_gallery_projects.scss';</code></pre>
<p>Since the <code>$medium-upper-limit</code> and <code>$small-upper-limit</code> variables are defined with the <code>!default</code> flag, the <code>$break-medium</code> and <code>$break-small</code> variables are calculated using the new values. and the Sass will compile using the newly defined variables.</p>
<h1>Managing Files</h1>
<p>The first major impact Sass has for us is in terms of the structure and management of our CSS (Sass, that is) files and folders. There are two components to this:</p>
<ul>
<li>How we structure top-level files</li>
<li>How we structure and use smaller reusable chunks of code</li>
</ul>
<p>Our top-level Sass files compile directly into CSS and are loaded on the page via a normal <code>link</code> element, and our modular code lives within partials. Here&rsquo;s an abbreviated look at what our folder structure looks like:</p>
<figure id="figure-37-5"> <img src="http://webstandardssherpa.com/r/37-5.png" alt="Behance Sass and compiled CSS file structure" /> <figcaption>A top-level look at how our Sass and compiled CSS files and folders look</figcaption> </figure>
<h2>Top-level Files</h2>
<p>Our top-level files all sit in the <em>/sass</em> folder root. Every page loads our base files, <em>normalize.css</em> and <em>global.css</em>, and then each individual page additionally loads its own CSS file(s). Here&rsquo;s an example snippet of what the <code>head</code> of a user&rsquo;s profile page:</p>
<pre><code>&lt;link rel="stylesheet" href="http://webstandardssherpa.com/normalize.css" /&gt;
&lt;link rel="stylesheet" href="http://webstandardssherpa.com/global.css" /&gt;
&lt;link rel="stylesheet" href="http://webstandardssherpa.com/profile.css" /&gt;</code></pre>
<p>In production, we minify and concatenate our CSS files so they are as small and as few as possible. Our build scripts and PHP framework handles this for us.</p>
<h2>Smaller Chunks of Code</h2>
<p>The second way we use Sass for file management deals with smaller chunks of code. We use <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#partials">Sass partials</a>, files that do not compile directly to a CSS file on their own, in two ways:</p>
<ul>
<li>Reusable components</li>
<li>General code organization</li>
</ul>
<p>We often split up particularly large page-specific Sass files into into smaller partials, even if they will not be re-used, to help clearly delineate where code is. Here&rsquo;s our abbreviated view of our file structure, with the folders from the previous example expanded:</p>
<figure id="figure-37-6"> <img src="http://webstandardssherpa.com/r/37-6.png" alt="Behance Sass and compiled CSS file structure with expanded folder" /> <figcaption>Sass and compiled CSS directory structure, with the folders expanded</figcaption> </figure>
<h3>Global and Reusable Components</h3>
<p>Our <em>global.scss</em> file contains Sass for standard things like the site background color, font stacks, etc. We use partials to compartmentalize the code for global elements such as buttons, dialogs, tooltips, icons and much more, which are in a folder called <em>/_global</em>. Then, in our <em>global.scss</em> file, we use the <a href="https://github.com/chriseppstein/sass-globbing">sass-globbing</a> extension to import them all at once:</p>
<pre><code>@import '_global/*.scss';</code></pre>
<p>The sass-globbing extension lets us import everything in our <em>/_global</em> folder in one line, and the contents of each partial end up in the compiled <em>global.css</em> file. Using this technique, we are free from having to manage a long list of imports, avoiding something like:</p>
<pre><code>@import '_global/_buttons.scss';
@import '_global/_dialogs.scss';
@import '_global/_icons.scss';
@import '_global/_tooltip.scss';
@import '_global/_warnings.scss';
...</code></pre>
<p>In addition to the <em>/_global</em> folder, we keep a top-level <em>/_components</em> folder for components that can be used on any page, but that are not used on <strong>every</strong> page. The difference here is that the partials in the <em>/_global</em> folder are automatically included in our <em>global.scss</em> file, and the files in the <em>/_components</em> folder can be imported by any individual file that needs it. Having two separate folders make it easy to know at a glance which ones are okay to cherry-pick and which ones are already available on every page. The underscore in the folder name makes it clear that those folders only contain partials.</p>
<h3>Partials for Code Organization</h3>
<p>For page-specific partials (things that will not be re-used and are only for code organization), they live within a folder named for that page. For example, the imports in our <em>project.scss</em> file look like so:</p>
<pre><code>@import '_components/_multiple-owners.scss';
@import 'project/_comments.scss';
@import 'project/_sidebar.scss';</code></pre>
<p>The <em>_comments.scss</em> and <em>_sidebar.scss</em> partials style specific parts of the project page, so they live inside the <em>/project</em> folder. Though they are not re-used on other pages, the code is complex or lengthy enough to warrant a separation from the main <em>project.scss</em> file to make the code is easier to navigate. (Our <em>project.scss</em> file would be over 600 lines long if we didn&rsquo;t split it into smaller pieces!)</p>
<p>Overall, we have over 40 general-use partials in our <em>/_components</em> folder, each one used in two or more places around the site. We also have at least 15 global partials in our <em>/_global</em> folder. Sass partials and the sass-globbing extension help us structure our code in a way that makes managing and using it infinitely easier and more clear than if we tried to attempt this in vanilla CSS. In fact, I can hardly even imagine a vanilla CSS solution to this! Without partials, our giant CSS code base would be much bulkier and incredibly difficult to manage.</p>
<h2>Responsive Breakpoints</h2>
<p>In the same way that our CSS is responsive, our JavaScript must be as well. Some interfaces and interactions change depending on browser size, so both sides of the code must use the same breakpoint values in order for the user experience to be seamless. To prevent having to hard-code values in two separate parts of the code, we use <a href="https://gist.github.com/jackie/5976398">a technique</a> that allows us to store our breakpoints in a JSON file and retrieve them from both the Sass and the JavaScript side.</p>
<p>For example, we can define our breakpoints in a JSON file:</p>
<pre><code>{
  "phone"  : "all and (max-width: 603px)",
  "desktop": "all and (min-width: 1025px)",
  "tablet" : "all and (min-width: 604px) and (max-width: 1024px)"
}</code></pre>
<p>Then, using a custom Ruby function to load and parse the JSON file, we can access those values in our Sass:</p>
<pre><code>$break-desktop: get_breakpoint(desktop);
$break-tablet: get_breakpoint(tablet);
$break-phone: get_breakpoint(phone);
 
@media #{$break-desktop} {
  body {
    background: red;
  } 
}</code></pre>
<p>Since the breakpoints are stored in JSON, you can use something like <a href="http://requirejs.org/">require.js</a> to load the JSON file into your JavaScript and use those values there as well.</p>
<p>Similarly, <a href="https://github.com/vigetlabs">Viget Labs</a> created a simple JSON importer to <code>@import</code> a <em>.json</em> file directly into your Sass, translating JSON objects into variables. When Sass 3.3 was released, a new data type called <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#maps">maps</a> was introduced, which has a structure similar to JSON objects.</p>
<p>The <a href="https://github.com/vigetlabs/sass-json-vars">Sass JSON Vars</a> plugin will translate your JSON object into a Sass <code>map</code> if your version of Sass is high enough, or just standard variables if not. This technique can be useful for any number of other things in addition to responsive breakpoints!</p>
<h1>Special Sass Peripherals</h1>
<p>In addition to built-in Sass features, we also use some external libraries to supercharge our code. We&rsquo;ve already mentioned sass-globbing, but one that has made the biggest impact on us is <a href="http://compass-style.org/">Compass</a>. It&rsquo;s popular for its utility mixins that generate verbose code like gradients or remove the need for you to type vendor prefixes, which we often make use of. Compass also has very powerful <a href="http://compass-style.org/help/tutorials/spriting/">sprite generation tools</a> that have made a huge impact on how we create and use sprites on our website.</p>
<h2>Sprites</h2>
<p>Behance makes use of many icons throughout the site, and although we recently converted many to use an <a href="http://icomoon.io/">icon font</a>, there are still a large number that come from a sprite sheet. In the past, these sprite sheets were built manually by organizing many small images into one big image by a designer. Then, a developer would closely inspect the image to determine coordinates and dimensions for every image, and then manually type all that information into a CSS file &hellip; a process very time consuming for everyone involved.</p>
<figure id="figure-37-7"> <img src="http://webstandardssherpa.com/r/37-7.png" alt="Screenshot of Behance page with icons highlighted" /> <figcaption>Our project editor uses a sprite for icons, including the ones seen here, plus additional states of the ones pictured, as well as many additional ones inside editor dialogs.</figcaption> </figure>
<p>But Compass sprite generation makes the process about a billion times easier. Just drop your individual images into a folder, write a few specific lines of Sass, and Compass will stitch your images together into one sprite file and generate all the CSS for you: classes, dimensions, coordinates and all. You can even choose to take a more hands-on approach and use Compass&rsquo; sprite helpers for more fine-grained control over how your sprite CSS is generated.</p>
<p>In just a few short lines you can make a sprite with CSS for each icon&rsquo;s class, background position and dimension:</p>
<pre><code>$icons-layout: horizontal;
$icons-sprite-dimensions: true;

@import "compass/utilities/sprites/base";
@import "../images/icons/*.png";
@include all-icons-sprites;</code></pre>
<p>&ldquo;Magic&rdquo; variables exist to set various options for the sprite. They&rsquo;re called &ldquo;magic&rdquo; because they exist based on the name of the folder holding your individual images, which in this example is <em>/icons</em>. The last three lines of code generate the sprite and CSS based on a combination of <a href="http://compass-style.org/help/tutorials/spriting/customization-options/">default options</a> and the ones defined above.</p>
<p>These tools also make it very easy to create and use <a href="http://en.wikipedia.org/wiki/Pixel_density">high pixels-per-inch</a>, or high pixel density, sprites. By separating your 1x and 2x sprites into separate folders and setting the orientation of both sprites to be the same, only a few lines of Sass are needed to define high PPI sprite:</p>
<pre><code>$icons: "icons/*.png";
$icons-2x: "icons-2x/*.png";

$icons-sprite-dimensions: true;

$icons-sprite: sprite-map($icons, $layout: horizontal);
$icons-2x-sprite: sprite-map($icons-2x, $layout: horizontal);

.icon {
  background: sprite-url($icons-sprite);
}

@include pixel-ratio {
  .icon {
    background-image: sprite-url($icons-2x-sprite);
    background-size: image-width(sprite-path($icons-sprite)) image-height(sprite-path($icons-sprite));
  }
}</code></pre>
<p>In this example, our 1x icons are in the folder <em>/icons</em> and the 2x icons are in <em>/icons-2x</em>. We set our 1x sprite as the background image for the <code>.icon</code> class. The <code>pixel-ratio</code> mixin prints out a <code>pixel-ratio</code> media query that overrides the <code>.icon</code> class&rsquo; background with the 2x image. The use of <code>background-size</code> shrinks the 2x image down to the dimensions of the 1x sprite, giving it a higher pixel density.</p>
<p>As an added bonus, the Photoshop plugin <a href="http://macrabbit.com/slicy/">Slicy</a> quickly exports assets from a single PSD into individual images, simplfying the initial process of saving images out of mockups too. If you are using the latest version of Photoshop CC, the built-in <a href="http://helpx.adobe.com/photoshop/using/generate-assets-layers.html">export assets</a> feature can help with this, too.</p>
<p>Overall, Compass sprite generation has been invaluable in its ease of use and the amount of time it has saved us.</p>
<h1>Coming Next</h1>
<p>In <a href="http://webstandardssherpa.com/reviews/sass-for-big-sites-part-2/">part 2</a>, we&rsquo;ll explore the knowledge sharing aspect of writing Sass for a huge website. We&rsquo;ll go over living style guides, documentation and tools to keep all your developers on the same page and make onboarding new team members to your codebase easy.</p>
				

								<section id="extra-mile">
					<h1>Going the Extra Mile</h1>
					
						<p><a href="http://compass-style.org/">Compass</a>, aside from being a great resource for useful mixins and functions, is also a meta-framework: a framework for creating frameworks. You can use it to create <a href="http://chriseppstein.github.io/blog/2010/08/01/building-a-personal-framework/">your own custom CSS framework</a> to make variables, mixins, functions and more reusable across projects.</p>
					
				</section>
				
				<section id="takeaways">			
								<section id="pitfalls" class="takeaway">

					<h1>Pitfalls to Avoid</h1>

					<ul>
<li>Don’t use extra tools, frameworks or techniques unless they provide a clear, tangible benefit. They can easily add bloat and unnecessarily complicate your&nbsp;code.</li>
<li>Avoid using <code>@extend</code> on classes, as the behavior can be unexpected when the extended classes are used throughout your code. Use placeholder selectors&nbsp;instead.</li>
<li>Don’t hard-code vendor prefixes, use a mixin or other tool to handle them for&nbsp;you.</li>
<li>Don’t use filename shorthand for importing partials, as this can make it harder to search for all the places that a generically-named partial is being&nbsp;included.</li>
</ul>
				</section>
								<section id="todos" class="takeaway">

					<h1>Things to Do</h1>

					<ul>
<li>Keep it simple! The more straightforward your code, the easier it is to&nbsp;understand.</li>
<li>Organize your code in a clear, consistent way that makes it easy to&nbsp;read.</li>
<li>Familiarize yourself with Sass’ built-in functions. There are tons of them and they can be very&nbsp;useful!</li>
<li>Use Sass source maps so that your browser’s web inspector shows the line numbers and file locations for the Sass files rather than the compiled <span class="caps">CSS.</span></li>
</ul>
				</section>
				</section>

				

								<section id="further-reading">
					<h1>Further Reading</h1>
					<ul>
				
					
						<li class="tool">RIZN Media, &#8220;<a href="http://thesassway.com/">The Sass Way</a>&#8221;, RIZN Media, 18 November 2014</li>
				
					
						<li class="tool">Hugo Giraudel, &#8220;<a href="http://hugogiraudel.com">HugoGiraudel.com</a>&#8221;, Hugo Giraudel, 18 November 2014</li>
				
					</ul>
				</section>
							
		]]></description>
					<link>http://webstandardssherpa.com/reviews/sass-for-big-sites-part-1</link>
			<guid>http://webstandardssherpa.com/reviews/sass-for-big-sites-part-1</guid>
			<dc:date>2014-12-16T17:00:00+00:00</dc:date>
		</item>
	
		<item>
			<title><![CDATA[Responsive Discovery]]></title>
			<dc:creator>Emily Gray</dc:creator>
			<description><![CDATA[
					
				
					<figure id="figure-36-1"> <img src="http://webstandardssherpa.com/r/36-1.jpg" alt="Illustration of teamwork" /> </figure>
<p>Every design process starts with &ldquo;discovery&rdquo; or something to that effect. For web builders, discovery allows us to dive into the waters of our client&rsquo;s new world to observe, study and understand as much as we can before proceeding with solutions.</p>
<p>How do we decide where and how to explore, set our course, and move forward? And how does a new responsive web, without constraints of device widths, affect that exploration? These are the tricky questions that need to be answered at the <em>beginning</em> of a project.</p>
<h2>Before You Weigh Anchor, Consider Your Charter</h2>
<p>The first task is to discuss the true problem your client is trying to solve. Of course, this may or may not be the problem they originally state. Essentially, &ldquo;what you want to discover&rdquo; is one of the earliest &mdash; and most critical &mdash; activities of the project. At <a href="http://seesparkbox.com/">Sparkbox</a>, we prefer to do this with initial engagements. We offer clients small, introductory projects to establish our charter. The entire goal is to explore the problem, identify limits and opportunities, and map out a course.</p>
<p>Discovering the true problem <em>together</em> shows a client how powerful a <a href="http://webstandardssherpa.com/reviews/facilitating-collaboration/">collaborative relationship</a> can be for the project moving forward. The path to truly meaningful work requires the voice and perspective of <em>all</em> relevant project players and relies on collaboration to guide a team through project twists and turns.</p>
<h2>Set Your Course</h2>
<p>Once we know the overarching problem we are trying to solve, we can begin to explore the space and factors around the problem.</p>
<p>Below are tools we use to set course on projects, but keep in mind that this is not a one-size-fits-all list. You have to pick and choose what makes sense for a project. Client size, budget, timeline, experience and personality all must be considered. Choose tools that will allow you and the client to dig directly into the core problem and take informed steps toward a solution. It doesn&rsquo;t have to all come from one activity, and it doesn&rsquo;t have to be super formal. It all comes back to <a href="http://seesparkbox.com/foundry/group_improvisation">improving it as you go</a>.</p>
<h3>Tool #1: Content Audits</h3>
<p>This is nothing more than an exhaustive look at all of the information that exists on a site today. You then evaluate that content and propose what content should exist on the site going forward. There are a million types of content audits out there. Just <a href="https://www.google.com/search?q=content+audit&amp;es_sm=91&amp;source=lnms&amp;tbm=isch&amp;sa=X&amp;ei=hDAjVJ_0H8y2yASz34DgCg&amp;ved=0CAgQ_AUoAQ">look at this &ldquo;content audit&rdquo; Google image search</a> which shows just some of the approaches you could take:</p>
<ul>
<li>You can include the Audience(s)</li>
<li>You can rank it based on Voice &amp; Tone, Usefulness, Clarity, Engagement, and Findability</li>
<li>Say whether you should Keep, Edit or Delete</li>
</ul>
<p>The best approach is to start with the basics and add when you see something relevant to track for a particular client.</p>
<h3>Tool #2: Discovering the Brand</h3>
<p>Kate Kiefer Lee came up with the idea for a brand voice and tone guide, and shared <a href="http://voiceandtone.com/">MailChimp&rsquo;s Voice &amp; Tone Guide</a> publicly. The guide is intended for all the people who are talking and writing on behalf of your brand to keep things consistent, but it&rsquo;s great for even more than that. A simple voice and tone guide is a great way to not only help your client write copy later, but also to make sure you and your client are on the same page about who they are. FORGE also offers a free brand workbook that is a great discovery tool for <a href="http://forgeideas.com/">understanding your client&rsquo;s brand</a>. This step is often most useful for smaller clients who don&rsquo;t already have very detailed brand documents.</p>
<h3>Tool #3: Design Comparisons</h3>
<p>Dan Mall came up with a great exercise to help capture the essence of what a site should look like. <a href="http://danielmall.com/articles/the-post-psd-era/">Design Comparisons</a> are a presentation of opposite design options (light or dark, modern or traditional, etc.) that you show your clients, and have them pick which style is more appropriate and share <em>why</em> that choice is more appropriate.</p>
<figure id="figure-36-2"> <img src="http://webstandardssherpa.com/r/36-2.png" alt="Example comparison of dark and light site designs" /> <figcaption>Would a dark site or a light site be better for your brand online?</figcaption> </figure> <figure id="figure-36-3"> <img src="http://webstandardssherpa.com/r/36-3.png" alt="Example comparison of flat and textured site designs" /> <figcaption>How about a flat look or a textured look?</figcaption> </figure> <figure id="figure-36-4"> <img src="http://webstandardssherpa.com/r/36-4.png" alt="Example comparison of illustrated and photographic site designs" /> <figcaption>Would an illustrated style or photographic style work better?</figcaption> </figure>
<h3>Tool #4: Style Prototypes</h3>
<p>Samantha Warren created <a href="http://styletil.es/">Style Tiles</a>, which she describes as:</p>
<blockquote>
<p>A design deliverable consisting of fonts, colors and interface elements that communicate the essence of a visual brand for the web.</p>
</blockquote>
<p>While Style Tiles are a static design tool, we&rsquo;ve adapted the idea to create <a href="http://seesparkbox.com/foundry/our_new_responsive_design_deliverable_the_style_prototype">Style Prototypes</a>, which have all the same elements as Style Tiles, but live in the browser. Moving these early design elements into the browser means your client can review in multiple devices and browsers, which allows you to remind them (early and often) of the realities of responsive web design: There is no <em>one</em> site experience.</p>
<p>Ben Callahan has a detailed post that covers <a href="http://seesparkbox.com/foundry/dissecting_design">how we work through design</a> in more detail.</p>
<h3>Tool #5: Content Priority Guides</h3>
<p>Working through a full content audit helps you identify what pages will need to exist on a new site and which of those require unique templates. Our <a href="http://seesparkbox.com/foundry/content_priority_guide">Content Priority Guide</a> takes the unique pages of a site and breaks them down into what content will need to appear on those pages <em>in priority order</em>. This step gives us a really good understanding of the content on the site and how it all lives together (awesome for both design and development). And it gives whoever is writing copy a great guide to get moving early. It can even get you most of what you need to plan the content management system, as well.</p>
<h3>Tool #6: Visual Priority Guides and Wireframes</h3>
<p>Our <a href="http://www.smashingmagazine.com/2012/05/30/design-process-responsive-age/">Visual Priority Guide</a> is a single deliverable that provides direction for content-focused design and mobile-first development in something resembling a wireframe. It is similar to the content priorities mentioned previously but a bit more visual. For content-heavy pages without much functionality, a content priority guide can typically replace the need for a visual priority guide/wireframe. However, these are a great enhancement of the content priorities when you start to get into interactions, such as special filtering and searching.</p>
<h2>Be Willing to Adjust Course and Revisit Scope</h2>
<p>Remember to be humble and adjust as you need to. Budget, timeline and personalities might force you to change course or tools during discovery. That&rsquo;s okay &mdash; it&rsquo;s honestly <em>the point</em> of this project stage. Having a toolkit and project plan to pull from is great, but you will still have to make it up as you go in order to serve your client well. And don&rsquo;t be afraid when you spot something that needs to change as you navigate the project. New discoveries are not bad things.</p>
<p>Corrections should be a welcomed sign that you are visiting the right places, and getting honest feedback and details to improve the project. Don&rsquo;t hide them out of embarrassment that you weren&rsquo;t able to predict the future (or read the collective mind of your client&rsquo;s organization). State the facts and make your case for a project shift. Good clients crave partners who legitimately have their best interest in mind &mdash; not just &ldquo;yes men.&rdquo;</p>
<p>Being rigid to an initial plan will hurt you. Because even a successfully executed project can become a business failure if it only achieves the goals of an out-of-date and less-informed hypothesis.</p>
<h2>Get Moving</h2>
<p>The goal in discovery is to get a project moving, <em>not</em> to outline the entirety of the project. Instead, discovery should establish a cadence that echoes throughout every client meeting and line of code. Real discovery reveals itself throughout each step of the process, so move forward as soon as possible &mdash; and keep moving.</p>
				

				
				<section id="takeaways">			
								<section id="pitfalls" class="takeaway">

					<h1>Pitfalls to Avoid</h1>

					<ul>
<li>Don’t expect to get it all right on the first try. You <strong>will</strong> understand the project needs better each&nbsp;day.</li>
<li>You can research and strategize your budget right down the toilet if you let it get out of hand. Make sure you keep yourself in check. Establishing guideposts of how long you think a step will take is helpful, especially if you find you have trouble moving&nbsp;forward.</li>
<li>As people who often love beautiful, polished work, it can be very difficult to not want to pretty-ify each and every thing you put in front of a client. But be warned that giving a client something that looks amazingly polished usually locks them up from feeling like they have room to interject and play an important part. Well thought out, but somewhat visually unpolished work that is easy to change sends the message that nothing is right without the client’s input… and nothing is ever&nbsp;final.</li>
</ul>
				</section>
								<section id="todos" class="takeaway">

					<h1>Things to Do</h1>

					<ul>
<li>Determine who the <em>real</em> decision-makers are. Discovery is as much about the people in the project as it is the&nbsp;scope.</li>
<li>Smaller, iterative deliverables tend to be more effective and elicit collaboration more than big, shiny, appear-to-be-set-in-stone&nbsp;deliverables.</li>
<li>Be okay being uncomfortable. Your client is being forced to be uncomfortable, and you should be pushing yourself enough that you are&nbsp;too.</li>
</ul>
				</section>
				</section>

				

								<section id="further-reading">
					<h1>Further Reading</h1>
					<ul>
				
					
						<li class="article">Ben Callahan, &#8220;<a href="http://seesparkbox.com/foundry/the_sum_of_the_parts">The Sum of the Parts</a>&#8221;, <cite>Sparkbox</cite>, 1 December 2013</li>
				
					
						<li class="article">Matt Griffin, &#8220;<a href="http://alistapart.com/article/client-relationships-and-the-multi-device-web">Client Relationships and the Multi-Device Web</a>&#8221;, <cite>A List Apart</cite>, 23 July 2013</li>
				
					
						<li class="article">Rob Harr, &#8220;<a href="http://seesparkbox.com/foundry/managing_client_expectations">Managing Client Expectations</a>&#8221;, <cite>Sparkbox</cite>, 29 May 2013</li>
				
					
						<li class="book">Erika Hall, <cite><a href="http://www.abookapart.com/products/just-enough-research">Just Enough Research</a></cite>, A Book Apart, 2013</li>
				
					</ul>
				</section>
							
		]]></description>
					<link>http://webstandardssherpa.com/reviews/responsive-discovery</link>
			<guid>http://webstandardssherpa.com/reviews/responsive-discovery</guid>
			<dc:date>2014-12-10T17:00:00+00:00</dc:date>
		</item>
	
		<item>
			<title><![CDATA[Facilitating Collaboration]]></title>
			<dc:creator>Ben Callahan</dc:creator>
			<description><![CDATA[
					
				
					<figure id="figure-35-1"> <img src="http://webstandardssherpa.com/r/35-1.jpg" alt="Illustration of teamwork" /> </figure>
<h2>Flexibility Is the New Norm</h2>
<p>In case you haven't heard, the web is not fixed width. While most of us have accepted this as truth for a while now, we haven't really figured out how to embrace this flexibility in <em>the way</em> we work. <a href="http://seesparkbox.com/foundry/dissecting_design">Our workflows should be as flexible as the stuff we're trying to build.</a> In order to do this, we need to start building collaboration into our culture. We need to inspire our people to prove this idea in their everyday work with each other and with our clients.</p>
<p>Over the past few years, this thinking has infiltrated almost every part of how I work in my role as President of <a href="http://seesparkbox.com">Sparkbox</a> &mdash; from writing estimates to writing code. It requires approaching everything with an eye toward collaboration, inviting others into the conversation and demonstrating that the sum of the parts is truly greater than the whole. In this piece, I hope to share a glimpse of how we encourage these ideals at Sparkbox.</p>
<h2>Why Collaboration?</h2>
<p>Every project, every timeline, every budget, every client, every team member, every unforeseen factor combine to create a unique set of constraints within which you are expected to do amazing work. Trust me when I tell you that <strong>there is no one way to do this stuff</strong>.</p>
<p>In order to build great stuff in an ever-changing environment, we need to start investing in our people instead of our process. Thinking in this way has allowed my team to build better products, spread critical knowledge throughout our team, and encourage great increases in individual skill and confidence. Who doesn't want that?</p>
<h2>A Collaborative Environment</h2>
<p>Truly timeless work can only be created when individuals relinquish their egos and are willing to put the good of the group above themselves. It also requires an environment where teams are encouraged and expected to find a better way. Here are some concepts that have stuck with me as I push to make our environment more collaborative.</p>
<h3>The Rigidity of Your Process</h3>
<p>There was a time when I spent a solid three weeks writing a 15-page explanation of my web design and development process. I thought I had it all figured out. Each step had specific deliverables that my client would approve, and each step moved us a little closer to the end goal. My customers loved it &mdash; I was very proud.</p>
<p>What I learned, very quickly, is that each new project I tackled required changes to this &ldquo;perfect process.&rdquo;; Each project was different. So different that, eventually, I stopped trying to force my 15-pager onto innocent, unsuspecting clients. Instead, I embraced the idea that I would know more about the project tomorrow than I do today. I started letting the evolution of learning carry the project forward, always focusing on the <em>actual</em> deliverable.</p>
<p>Because I tend to be a guy with a fairly extreme personality, I took this pretty far pretty fast. I've been speaking and writing about this idea of <a href="http://seesparkbox.com/foundry/group_improvisation">Group Improvisation,</a> with the hope that people will let go of their rigid process and start to trust their people. Here's the thing, it's not quite so simple. Consider this diagram:</p>
<figure id="figure-35-2"> <img src="http://webstandardssherpa.com/r/35-2.jpg" alt="Charting rigid process and team experience" /> <figcaption>A team's experience and rigidity of process.</figcaption> </figure>
<p>Moving from left to right on the x-axis, it charts your team's growth of experience. Moving from the bottom to the top, it charts the rigidity of your process, from very rigid to improvisational.</p>
<p>I believe the goal is to reach the top right quadrant, where your team is highly experienced and the process very fluid. This helps cultivate a culture of trust where regular innovation is happening and excellent work is created. Allowing an inexperienced team to work in an improvisational way results in terrible work and missed deadlines and budgets. You can see this illustrated in the top left quadrant.</p>
<p>In order to take your team from the top left to the top right, you need to first put a somewhat rigid process in place, which moves you to the bottom left quadrant. It's a more structured process which allows your team to gain experience. Only then can you slowly remove some of the structure &mdash; forcing more collaboration &mdash; and allow your team to truly flourish.</p>
<figure id="figure-35-3"> <img src="http://webstandardssherpa.com/r/35-3.jpg" alt="U Progression" /> <figcaption>The path a team must take to achieve timeless work.</figcaption> </figure>
<p>It's important to note that teams working in that top right quadrant <strong>do</strong> have processes. The major difference is that they don't have something prescribed to them. Instead, they're allowed to experiment and decide &mdash; as a group &mdash; what the best approach is. It's this level of trust that empowers them to do great work and allows them to feel the ownership needed to truly put the project above themselves.</p>
<p>This model requires the leadership of an organization to keep a pulse on the experience of the team and adjust expectations around the rigidity of the process accordingly. This presents some challenges. For example, if your organization struggles with employee retention, they may never gain the experience together needed to reach that top right quadrant.</p>
<h3>Writing and Speaking</h3>
<p>When I first started to be more intentional about writing and speaking, it dawned on me how much I personally benefitted from the teaching experience. If I'm going to put something out there in an attempt to share my knowledge, I want to make sure I've read other writings on the topic. I need a very good awareness of what's currently happening around the subject matter in the community. For every article I write, I read 20.</p>
<p>It didn't take long for me to begin encouraging the same with my team. At first, this was very difficult for some &mdash; it's human nature to feel you don't have much to offer. The truth is, there's always someone smarter than you, and there's always someone a little behind you.</p>
<p>From a policy standpoint, this requires putting your money where your mouth is. At Sparkbox, we lowered our expectation about the amount of time our employees do billable work in an effort to provide them with the time to learn. We also give our employees time off for events where they are speaking. And, to continue encouraging the culture of learning, we have a &ldquo;Send a Friend&rdquo; policy. This means we will send another Sparkboxer to an event where one of our team members is speaking.</p>
<p>While policies and procedures can help, I believe this kind of approach requires leading by example. And, don't expect it to be easy. Even now, we struggle with it. Trust me when I tell you, creating a policy that everyone writes is <em>not</em> enough. In fact, I would suggest that you <strong>not</strong> force your team to do this stuff. Instead, let your people find the ways <em>they</em> are willing to contribute back to the community. For some, that may be open source side projects, for others it may be in-depth case studies. All of this is valuable &mdash; the point is to allow your team time to learn.</p>
<h3>Mentoring and Apprenticeships</h3>
<p>In the same way that writing and speaking can make you smarter, teaching in a more intimate setting is a great way to question your previous assumptions. To provide more teaching opportunities to our team, we run a six-month apprenticeship each year. This brings motivated, hungry, passionate people into our space for an extended time where their primary goal is to learn. We provide a curriculum for them to dig into, and a large part of their time is spent pairing with our full-time people. This one-on-one time is an incredibly powerful way for both student and teacher to grow. If you've ever had the opportunity to teach, you know that teaching truly makes you better understand your subject matter.</p>
<p>In addition to the apprenticeship program, we also look for opportunities to cross-pollinate inside our own team. This happens in many ways, but the most common occurs when a natural leader emerges and collaborates with those on her team to help them improve. This works best when it happens organically, but we occasionally take a more structured approach. Typically this is when there's a specific need for one individual to grow in an area where someone else has great experience. Simply encouraging them to work together on something is usually enough.</p>
<p>Regardless of how it happens, there's no arguing that teaching makes you smarter. I can't express enough how helpful this has been for our team in creating a collaborative environment.</p>
<h3>Tooling and Workflows</h3>
<p>There are also plenty of ways to incorporate more collaborative tooling into your team's daily work. While these things alone won't create collaboration, they can certainly make it easier.</p>
<h4>Google FTW</h4>
<p>We use <a href="https://www.google.com/drive/index.html">Google Drive</a> extensively because of the real-time collaboration it allows. All content documentation is either done <a href="http://seesparkbox.com/foundry/content_priority_guide">in Drive</a> or <a href="http://www.smashingmagazine.com/2011/09/26/content-prototyping-in-responsive-web-design/">in HTML</a>. The ability for our clients to directly edit, suggest, comment on the priorities of content and functionality makes this an invaluable part of our tooling. Additionally, most clients completely understand how to use these tools, whereas more industry-specific tools (<a href="https://www.omnigroup.com/omnigraffle">Omnigraffel</a>, <a href="http://office.microsoft.com/en-us/visio/">Visio</a>, <a href="http://balsamiq.com/">Balsamiq</a>, etc.) create a barrier to entry for your customer.</p>
<h4>Opt-In, Whole-Team Communication</h4>
<p>We recently made the switch to using <a href="http://slack.com">Slack</a> for real-time communication. It allows for channels (think, &ldquo;topics&rdquo;) which our team can opt in or out of, private groups (invite-only), direct messaging, and (most importantly) custom emoji. It also has some excellent integration with tools like <a href="https://plus.google.com/hangouts">Google Hangouts</a> and <a href="https://screenhero.com/">Screen Hero</a> and it is all archive-able and searchable. Our team lives in Slack all day, every day.</p>
<h4>Source Control and Issue Tracking</h4>
<p>I would be incredibly remiss if I didn't mention <a href="https://github.com/about">Github</a> here. <em>All</em> of our people use Git on pretty much <em>every</em> project. We rely heavily on the issue tracking, often times even inviting our clients to participate. We also follow a very simple collaborative workflow which employs git branching and pull-requesting.</p>
<p>Almost any task is created as an issue on the repository. An individual creates a branch from master to work locally. When the task is complete, they push to github and pull request their branch. Another team member reviews the code, tests it locally, and makes comments. Once the branch is in good shape, it's merged into master and work continues.</p>
<p>This branch/pull-request/merge workflow builds <a href="http://seesparkbox.com/foundry/code_review">collaborative code review</a> into our development process. Rarely does a pull request get merged into master without changes. Many times, we catch simple issues before they're ever merged and deployed. Another great benefit of a workflow like this is that more people understand more of the code. Spreading the knowledge around the team only makes us all smarter, and better prepares the team for inevitable time off, etc.</p>
<p>We've also been experimenting with <a href="https://huboard.com/">Huboard</a> lately as a way to better organize and see progress on Github issues. This tool provides an excellent dashboard view of the work currently in progress and next to be tackled.</p>
<h3>Collaborative Space</h3>
<p>We've tried a lot of things to encourage collaboration in our space. Firstly, we have a lot of different kinds of space available for people to use. A good portion of what we offer is a large open room with three long desks. These desks are capable of seating six people each (three per side), but we generally have four people at each, leaving the middle seat on each side open for pairing.</p>
<figure id="figure-35-4"> <img src="http://webstandardssherpa.com/r/35-4.jpg" alt="The big room at Sparkbox" /> <figcaption>Our big room, where the magic happens.</figcaption> </figure>
<p>At the end of each of these desks, and in various other places through the office, we have televisions mounted to the wall, each with an Apple TV. This allows all of us to quickly and easily Air Display their our screen to any TV in the building. Newer version of iOS allow us to send mobile device output to these as well. It makes for great demos and keeps the barrier of entry for getting feedback on something very low.</p>
<figure id="figure-35-5"> <img src="http://webstandardssherpa.com/r/35-5.jpg" alt="TVs through our office" /> <figcaption>TVs distributed throughout the office, each with an Apple TV, allow us to AirPlay for easy collaboration.</figcaption> </figure>
<p>Because of the amount of people in our space, we decided to remove phones from the big room. Instead, we created some small phone booths with sound absorbent materials just off the main room. These, combined with a small conference room and video conference room, give ample options for communicating with remote teams, employees or clients.</p>
<figure id="figure-35-6"> <img src="http://webstandardssherpa.com/r/35-6.jpg" alt="Phone booths" /> <figcaption>Removing phones from the big room helps with distraction and lets private conversation be private.</figcaption> </figure>
<p>We're also huge fans of whiteboards. Almost every wall in our space has been painted with whiteboard paint. It's not cheap, but it's much less expensive than buying whiteboards to cover the space. We also chose conference room tables that are glass with a white frosting on the bottom. This means we can write on all of our meeting room tables as well &mdash; something that happens in just about every meeting.</p>
<figure id="figure-35-7"> <img src="http://webstandardssherpa.com/r/35-7.jpg" alt="White board mania" /> <figcaption>White boards can be used for both highly productive, and not-so-productive activities.</figcaption> </figure>
<p>Our space also offers a full kitchen and an area where we can all sit to eat together. It may sound trite, but enjoying food together is one way we try to create a comfortable environment. I believe it's critical to know your co-workers in more than just a working context. We find cooking and eating together each Friday is a great way to encourage this.</p>
<figure id="figure-35-8"> <img src="http://webstandardssherpa.com/r/35-8.jpg" alt="Friday lunch" /> <figcaption>We like to eat. Our space has a full kitchen and a social area where we can all eat together.</figcaption> </figure>
<h3>Collaborative Org Chart</h3>
<p>A lot has been written about the benefits and challenges of a flat organizational structure. I'm not here to tell you that flattening the org chart is the only way to foster collaboration, but I do believe that our flat structure encourages it.</p>
<p>Flat org charts only work if your team understands <em>why</em> you make the decisions you do. When that happens, individuals are empowered to lead organically in a way that aligns with the vision of the company. <em>Empowered people aren't threatened by collaboration.</em> There's no competition to climb the ladder, instead there's a true desire to improve the whole. This is what I want from my team and what benefits our clients the most.</p>
<p>Our org chart has two boxes: one is the people who work <em>on</em> the business and the other is the people who work <em>in</em> the business. Most folks are working 100% of their time <em>in</em> the business. Inside this box, leaders emerge and naturally take on more responsibility. Again, this may not work for everyone, but it seems to be working well for us.</p>
<h2>The Ever-Changing Way</h2>
<p>For us, these concepts have been almost accidental. We didn't start out to build a place where collaboration and learning were the &ldquo;secret ingredients.&rdquo; Instead, we simply wanted to build things the right way. What we've landed on, at least for now, is the only way we know how to operate at the level we desire given the constant curve balls this industry throws.</p>
<p>I am certain we're far from done. So far, I can tell you that this approach requires a strong belief in your people and a demonstration of humility from the top down. It takes a long time, and it's not something you can fake. However, I believe it's necessary to stay relevant in this ever-changing industry.</p>
				

								<section id="extra-mile">
					<h1>Going the Extra Mile</h1>
					
						<p>Almost every customer you come across these days has been through the process of creating for the web. Chances are, it wasn&rsquo;t a super collaborative process. That means they are going to bring a set of expectations into the project.</p>
<p>For us at Sparkbox, this means finding ways earlier and earlier in the process to begin bringing our clients into the conversation. Now, when a customer reaches out for the first time, we begin the conversation with them and quickly invite them to a Google Spreadsheet that we call a &ldquo;Collaborative Estimate.&rdquo;</p>
<p>The idea is simple: have them help you determine the budget for the project. Clients love the transparency this offers, but I love that we get an opportunity to work &mdash; to collaborate &mdash; <em>with</em> a potential client right away. We&rsquo;re re-establishing expectations in our very first interactions, letting them know we truly believe we&rsquo;ll do better work if we do it <strong>with</strong> them, rather than <strong>for</strong> them.</p>
					
				</section>
				
				<section id="takeaways">			
								<section id="pitfalls" class="takeaway">

					<h1>Pitfalls to Avoid</h1>

					<ul>
<li>Avoid a more linear deliverable-based workflow where one discipline “hands-off” to the&nbsp;next.</li>
<li>Don&rsquo;t do process for the sake of process — make sure there’s real value added for each hour you&nbsp;spend.</li>
<li>Try not to allow super-stars with big egos to dominate a project. This kind of environment will squelch innovation from the whole team in favor of accepting a bright&nbsp;individual
				</section>
								<section id="todos" class="takeaway">

					<h1>Things to Do</h1>

					<ul>
<li>Make sure your team understands why you exist — this enables them to make decisions that align with the purpose of your&nbsp;organization.</li>
<li>Encourage writing and speaking, but be ready to back this up with the time to do&nbsp;it.</li>
<li>Explore tools that allow easier&nbsp;collaboration.</li>
<li>Try to avoid putting people on an island to work — consider a process that encourages review and&nbsp;collaboration.</li>
</ul>
				</section>
				</section>

				

								<section id="further-reading">
					<h1>Further Reading</h1>
					<ul>
				
					
						<li class="article">Rosie Manning, &#8220;<a href="http://alistapart.com/article/structuring-a-new-collaborative-culture">Structuring a New Collaborative Culture</a>&#8221;, <cite>A List Apart</cite>, 1 July 2014</li>
				
					
						<li class="article">Amy Marquez, &#8220;<a href="http://www.creativebloq.com/why-pairing-can-improve-your-design-work-8134179">Why Pairing can Improve your Design Work</a>&#8221;, <cite>Creative Bloq</cite>, 6 March 2014</li>
				
					</ul>
				</section>
							
		]]></description>
					<link>http://webstandardssherpa.com/reviews/facilitating-collaboration</link>
			<guid>http://webstandardssherpa.com/reviews/facilitating-collaboration</guid>
			<dc:date>2014-11-11T10:00:00+00:00</dc:date>
		</item>
	
		<item>
			<title><![CDATA[Reflecting on the Revamped Sherpa]]></title>
			<dc:creator>Aaron Gustafson</dc:creator>
			<description><![CDATA[
					
				
					<figure id="figure-34-1"> <img src="http://webstandardssherpa.com/r/34-1.png" alt="Web Standards Sherpa homepage" /> </figure>
<p>Every now and then, it's good to take a critical eye to the work you've done and look for ways to improve it, so this review is going to turn the microscope around and focus on the Web Standards Sherpa site. It's a tough thing to make time for on a largely volunteer project when your team is pretty much flat-out on client work, but we carved out some time in the first few months of this year to revisit this site and make some changes that would help our content go further.</p>
<h2 id="best-practices-change">Best Practices Change</h2>
<p><a href="http://www.webstandards.org/2011/03/13/the-sherpas-are-here/">We launched Web Standards Sherpa</a> on March 13, 2011. At the time, CSS Media Queries were relatively new and, though we put a lot of thought into how we <em>could</em> use them, we hadn't really put much collective thought into how we <em>should</em> use them.</p>
<p>As such, our approach for this project ended up tracking Ethan Marcotte's concept of <a href="http://alistapart.com/article/responsive-web-design/">Responsive Web Design</a> (RWD) &mdash; fluid grids, flexible media, and media queries &mdash; but it did so from a &rdquo;desktop-first&ldquo; perspective, using primarily max-width-based media queries:</p>
<pre class="css"><code>@media screen {
    /* Desktop Rule Sets (universal) */
}
@media screen and (max-device-width:480px) { 
      /* Small Screen Rule Sets */
}
@media screen and (min-device-width:481px) and (max-device-width:1024px) {
    /* The Squishy Middle Rule Sets */
}</code></pre>
<p>At the time, it just made sense to take that approach: We had been designing, prototyping, and building the site for several months before media queries even became a viable option, and we had no interest in maintaining a separate mobile site. So we added RWD into the project in the final month and made it work.</p>
<p>The result was decent. If you used it on mobile, the site worked, but it was clear that the mobile experience was an afterthought. You could use the site in all the then state-of-the-art mobile browsers &mdash; Safari, Android, Dolphin, Opera Mini, and Opera Mobile &mdash; but interactions were more than a little clunky.</p>
<figure id="figure-34-2"> <img src="http://webstandardssherpa.com/r/34-2.png" alt="Comparison of how the Sherpa site looked in Opera Mini before and after the responsive retrofit" /> <figcaption>A screenshot comparison of how the old site looked in the current Opera Mini incarnation (left) versus how the current site looks (right). Obviously, the new site is far more usable. Part of the reason the old version didn't age well was the shift from use of the &ldquo;viewport&rdquo; meta tag to CSS-based rules around how browsers should determine width for media queries.</figcaption> </figure>
<p>Fast-forward two years and the mobile experience was falling apart. Browsers had gotten a little more savvy &mdash; or picky, depending on how you look at it &mdash; in how they were handling media queries and viewport-sizing instructions, and Web Standards Sherpa just looked haggard. It needed a makeover.</p>
<h2 id="from-mobile-friendly-to-mobile-first-">From "Mobile Friendly" to "Mobile First"</h2>
<p>Design-wise, the site is still pretty amazing: Dan Cederholm crafted a timeless look and feel for the site and Steph Troeth's and Kelly McCarthy's information architecture was still quite solid. All we needed to do was make mobile a first-rate experience from a styling and interaction perspective.</p>
<p>I wrote on the Easy Designs Blog about <a href="http://blog.easy-designs.net/archives/from-mobile-friendly-to-mobile-first">making the switch from a &ldquo;mobile-friendly,&rdquo; desktop-first site to a &ldquo;mobile first&rdquo; one</a>. In it, I discussed how looking at a site from the mobile perspective first is a great way to integrate <a href="http://en.wikipedia.org/wiki/Progressive_enhancement">progressive enhancement</a>:</p>
<blockquote>
<p>&ldquo;[Y]ou optimize your site for use in a mobile context, and then layer on extra styles, JavaScript and content as you find you have more real estate to work with or a more capable device.&rdquo;</p>
</blockquote>
<p>In practice, that lead to quite a few changes:</p>
<h3 id="we-swapped-pixels-for-ems">We Swapped Pixels for Ems</h3>
<p>We adjusted our media queries to use <a href="http://en.wikipedia.org/wiki/Em_(typography">em units</a>) instead of pixels to provide the most appropriate reading experience based on the user's font-size preference. That means if my aunt has her font size increased to 2x, but is on a larger screen, she will get a more linear layout more akin to a tablet view at 1x.</p>
<h3 id="min-width-instead-of-max-width">Min-width Instead of Max-width</h3>
<p>We migrated most of our media queries to reference <code>min-width</code> rather than <code>max-width</code> so that they would start with the smallest screen first and build up from there:</p>
<pre class="css"><code>/* Mobile-first Base Rule Sets */

@media only screen and (min-width:20em) {
    /* 20em and up media query-aware browsers */
}

@media only screen and (min-width:30em) {
    /* 30em and up media query-aware browsers */
}

/* And so on&hellip; */</code></pre>
<p>We did not throw out a lot of the original CSS, but instead broke it apart and moved rule sets (or parts of them) into the new queries as appropriate. That saved us a lot of time.</p>
<h3 id="we-have-lots-of-breakpoints-now">We Have Lots of Breakpoints Now</h3>
<p>Whereas the original site only had three breakpoints, the current incarnation has a whopping nine. Some follow somewhat typical conventions (20em, 30em, 48em), but others are pretty site-specific (34.375em, 42.5em, 51.25em, 61.25em). The reason for the change is pretty simple: we wanted to provide a solid reading experience across the board. We tweak the design a fair bit in the squishy middle between small screens and large ones.</p>
<figure id="figure-34-3"> <img src="http://webstandardssherpa.com/r/34-3.jpg" alt="The nine breakpoints of the new Web Standards Sherpa site" /> <figcaption>An &ldquo;onionskin&rdquo; representation of the nine breakpoints employed on the refresh of Web Standards Sherpa.</figcaption> </figure>
<h3 id="we-are-more-touch-friendly-now">We are More Touch Friendly Now</h3>
<p>Dan's original design had some pretty chunky buttons, so they were quite easy to tap with your finger. Links, however, not so much. We needed to increase the tappable size of the links and the spacing around many of the navigational links to improve tap accuracy. In particular, the links in the footer are quite small and narrowly spaced on desktop. We corrected that on smaller screens where tapping is the more likely interaction model.</p>
<figure id="figure-34-4"> <img src="http://webstandardssherpa.com/r/34-4.jpg" alt="Comparison of links on larger screens vs. smaller screens" /> <figcaption>A close-up look at how we enlarged our links to make them larger and more touch-friendly on smaller screens. On the left is the large-screen view, on the right is the small-screen view.</figcaption> </figure>
<h3 id="we-put-css-and-javascript-on-the-same-page">We Put CSS and JavaScript on the Same Page</h3>
<p>A major headache in most responsive designs is getting CSS and JavaScript to work together. It's easy to swap styles using media queries, but adjusting JavaScript-based functionality is a little more complicated.</p>
<p>Sure, you could use <a href="http://docs.webplatform.org/wiki/css/media_queries/apis/matchMedia"><code>matchMedia</code></a> to determine if certain conditions are met before generating or destroying a given JavaScript-based user interface. However, doing that requires that you duplicate your media queries in your JavaScript code, and keep them updated along with any CSS changes you make. To avoid that potential maintenance headache we chose a different solution.</p>
<p>Back in 2012, I had written a little JavaScript called <a href="https://gist.github.com/aarongustafson/4157402"><code>watchResize</code></a> to track the browser window dimensions (and changes to them) to simplify the authoring of screen-size dependent JavaScript. A few months later, taking a cue from <a href="http://adactio.com/journal/5429/">Jeremy Keith's post about using clever CSS to inform JavaScript of breakpoints</a>, I built a little jQuery-based helper called <code>getActiveMQ</code> to generate a hidden <code>div</code> and then track the <code>font-family</code> CSS property that was set on it. That meant that on the CSS end, all we needed to do was assign each breakpoint a name:</p>
<pre class="css"><code>#getActiveMQ-watcher {
      font-family: &amp;quot;break-0&amp;quot;;
}
@media only screen and (min-width: 20em) {
      #getActiveMQ-watcher {
            font-family: "break-1";
    }
}
/* And so on&hellip; */</code></pre>
<p>And we could get the currently applied value back via JavaScript:</p>
<pre class="js"><code>var current_mq = window.getActiveMQ(); // break-X</code></pre>
<p>Combining <code>watchResize</code> with <code>getActiveMQ</code>, it became simple to track the current media query in a global variable that any JavaScript in the site could reference:</p>
<pre class="js"><code>// Create a global Sherpa JS Object
if ( !( 'WSS' in window ) ) { window.WSS = {}; }

// capture the current breakpoint to WSS.screen_size
window.watchResize(function(){
    window.WSS.screen_size = window.getActiveMQ();
});

// Use that value in a lazy-loading images script
window.watchResize(function(){

    var $img = $( '<img alt="" />' ),
        $els = $( '[data-image]:not([data-imaged])' ),
        curr_break = window.WSS.screen_size.replace( 'break-', '' );

    // loop through all elements with a data-image attr
    $els.each(function(){

        var $el = $(this),
            // do they have a min-breakpoint set?
            // if not, use break-4
            bp = $el.data('image-min-breakpoint') || 'break-4';

        bp = bp.replace( 'break-', '' );

        // if the current breakpoint is &gt;= the one
        // we are testing for, lazy-load the image
        if ( curr_break &gt;= bp )
        {
            $img.clone()
                .attr( 'src', $el.data('image') )
                .prependTo(
                    $el.attr( 'data-imaged', '' )
                 );
        }

    });

});</code></pre>
<p>Done and done.</p>
<h2 id="getting-serious-about-performance">Getting Serious About Performance</h2>
<p>With our styles working a bit better and our JavaScripts able to follow CSS' lead on the breakpoints, we focused our attention on download speeds.</p>
<p>As I'm sure you can guess, most of our page weight comes from image content. We optimize every image on the site before it even get onto the server, but each one adds up. We didn't want to sacrifice the rich visual design of the site or the helpful screenshots in the articles, so we looked for other ways to speed things up.</p>
<h3 id="we-migrated-to-sass">We Migrated to SASS</h3>
<p>In the years since we built this site, our team has moved over to using <a href="http://sass-lang.com/">SASS</a> to speed up our CSS authoring. On smaller, less complicated sites like Sherpa, we've found <a href="http://jakearchibald.github.io/sass-ie/">Jake Archibald's <code>respond-min</code>/<code>respond-max</code> mixin set</a> quite useful.</p>
<p>Jake's mixin allows us to identify media query blocks but also gives us the ability to strip the rules out of the media queries for older browser that don't understand media queries (like IE 8 and below). We combined those mixins with a set of variables that defined our breakpoints to ensure consistency across our CSS. Here's a sample of what that looks like:</p>
<pre class="css"><code>$break-1: 20em;
$break-2: 30em;
/* And so on&hellip; */

#getActiveMQ-watcher {

    font-family: "break-0";

    @include respond-min($break-1) {
        font-family: "break-1";
    }

    @include respond-min($break-2) {
        font-family: "break-2";
    }

    /* And so on&hellip; */

}</code></pre>
<p>We were using a similar technique for concatenating JavaScript files via the CMS, so we opted to abandon that as well. With the move to SASS, we'd become pretty familiar with running build commands via the command line, so we decided to use <a href="https://github.com/mishoo/UglifyJS2/">Uglify</a> to perform the concatenation and minification. And we employed <a href="http://gruntjs.com/">Grunt</a> to orchestrate all of that and to bring our other build step &mdash; image optimization &mdash; under one roof.</p>
<h3 id="we-moved-our-css-and-javascript-into-the-cdn">We Moved our CSS and JavaScript into the CDN</h3>
<p>With actual static CSS and JavaScript files, we finally had the opportunity to move these files into the CDN (which we were already using for article images). That meant users around the globe would get these files faster.</p>
<p>If you are not familiar with CDNs, they are a great way to skirt <a href="http://www.stevesouders.com/blog/2008/03/20/roundup-on-parallel-connections/">browser limits on parallel connections</a>.</p>
<h3 id="we-got-lazier">We Got Lazier</h3>
<p>In the original version of the site, we were using a technique called <a href="http://en.wikipedia.org/wiki/Lazy_loading">&ldquo;lazy loading&rdquo;</a> to inject the markup for the homepage carousel only when the user was using a large screen and had JavaScript support. We opted to take that route because, while we wanted the carousel to enable a user to move backward and forward in time to see every article, we didn't think the carousel would provide a good experience on small screens, we knew loading all of that content would not be very bandwidth-friendly, and we also knew that without JavaScript the carousel would not actually work.</p>
<p>In the interest of being more bandwidth friendly throughout the site, we opted to use lazy loading for more pieces of content.</p>
<p>We rolled article comments, which were once in their own section of the site, into the article pages themselves to provide a more integrated experience. As supplementary content, though, they were a great candidate for lazy loading. We did want to keep the comments available to non-Javascript users too though, so we used a slightly customized version of <a href="https://gist.github.com/scottjehl/d0e4918cf5e97edf99f3">Scott Jehl's anchor-include pattern</a> to turn a direct link to an actual, separate comments page into a trigger for loading the comments asynchronously:</p>
<pre class="html"><code>&lt;a href="http://webstandardssherpa.com/reviews/curing-the-jetblues/comments/#comments"
    data-include-on-tap
    data-replace="http://webstandardssherpa.com/comments/curing-the-jetblues/"
    data-include-size="5"&gt;View comments on 
    this entry and add your own&lt;/a&gt;</code></pre>
<p>The <code>data-*</code> attribute-based instructions here tell JavaScript to replace this link with the HTML retrieved from /comments/curing-the-jetblues/ if the breakpoint is &ldquo;5&rdquo; or larger <em>or</em> if the user is on a smaller screen and taps on the link.</p>
<p>We chose a slightly different tactic for managing images. Since article images are fairly useful for illustrating points made in the prose, we felt they were first-rate content important enough to have available to users even if JavaScript was not available. For that reason, we chose to implement Sebastiano Armeli's <a href="http://sebarmeli.github.io/JAIL/">jQuery Asynchronous Image Loader (JAIL)</a>.</p>
<p>The JAIL markup pattern is pretty simple:</p>
<pre class="html"><code>&lt;img class="jail"
    src="data:image/gif;base64&hellip;"
    data-src="http://webstandardssherpa.com/r/5-3.png" alt=""/&gt;
&lt;noscript&gt;&lt;img src="http://webstandardssherpa.com/r/5-3.png" alt=""/&gt;&lt;/noscript&gt;</code></pre>
<p>The markup includes the data URI version of a 1x1 alpha-transparent GIF with a <code>data-*</code> attribute indicating the location of the real image. JavaScript will load that image asynchronously when they user scrolls to within a certain (configurable) distance of it in the flow of the document. This means you don't actually download an image unless we're pretty sure you're going to see it.</p>
<p>The <code>noscript</code> is there to provide a non-JavaScript alternative.</p>
<h3 id="we-removed-the-share-widgets">We Removed the Share Widgets</h3>
<p>Well, that's not totally accurate. We didn't remove links to share our content on your favorite social and professional networks, but we did jettison the JavaScript code provided by these networks and went with good old fashioned links instead. We did so for a two primary reasons:</p>
<ol>
<li>Using third party widgets allows those third parties to track your users and regardless of whether they admit to doing anything with the knowledge that you are viewing our content, we don't like the fact that they could.</li>
<li>Even though CDNs deliver these widgets, they are an additional resource to download and, moreover, an additional JavaScript to execute. Numerous sites have seen <a href="http://www.websiteoptimization.com/speed/tweak/localize-external-resources/">third party widgets drastically slow page rendering</a> and we wouldn't want that.</li>
</ol>
<h3 id="the-numbers">The Numbers</h3>
<p>You're probably wondering the overall impact of these changes. <a href="#figure-34-5">The table below has the details</a>, but the changes generally dropped the page size by a third or more.</p>
<figure id="figure-34-5"> 
<table>
<caption>A Comparison of Page Weights on WebStandardsSherpa.com Before the Overhaul and After</caption> <thead> 
<tr>
<th scope="col">Page</th><th scope="col">Screen Size</th><th scope="col">JavaScript?</th><th scope="col">Original Size</th><th scope="col">New Size</th><th scope="col">Savings</th>
</tr>
</thead> 
<tbody>
<tr class="rowspan">
<th rowspan="4" scope="row">Homepage</th>
<td rowspan="2">Small</td>
<td>No</td>
<td>313 kb</td>
<td>181 kb</td>
<td>42%</td>
</tr>
<tr class="rowspaned">
<td>Yes</td>
<td>376 kb</td>
<td>259 kb</td>
<td>31%</td>
</tr>
<tr class="rowspaned">
<td rowspan="2">Large</td>
<td>No</td>
<td>313 kb</td>
<td>189 kb</td>
<td>40%</td>
</tr>
<tr class="rowspaned">
<td>Yes</td>
<td>810 kb</td>
<td>470 kb</td>
<td>41%</td>
</tr>
<tr class="rowspan">
<th rowspan="4" scope="row">Curing the Jet Blues</th>
<td rowspan="2">Small</td>
<td>No</td>
<td>532 kb</td>
<td>258 kb</td>
<td>52%</td>
</tr>
<tr class="rowspaned">
<td>Yes</td>
<td>720 kb</td>
<td>515 kb</td>
<td>28%</td>
</tr>
<tr class="rowspaned">
<td rowspan="2">Large</td>
<td>No</td>
<td>532 kb</td>
<td>189 kb</td>
<td>50%</td>
</tr>
<tr class="rowspaned">
<td>Yes</td>
<td>756 kb</td>
<td>263 kb</td>
<td>28%</td>
</tr>
</tbody>
</table>
</figure>
<p>And then there's the added benefits of fewer asset requests overall and better use of the CDN and caching. So in addition to better serving mobile users from a visual design standpoint, we are also improving things when it comes to experience design. And we're making it cheaper to read our content for those of you on a metered internet connection.</p>
<p><em>Author's Note: Credit where credit is due, Jeff Bridgforth implemented the vast majority of these changes. Thanks for all your hard work Jeff!</em></p>
				

								<section id="extra-mile">
					<h1>Going the Extra Mile</h1>
					
						<p>As with any project, there&rsquo;s always more ways to improve the experience. We can (and probably should) do more to decrease our overall page weight through use of sprites and SVG. Additionally, I&rsquo;m sure there is more content we could inject asynchronously. And, on the server side, we could be far more aggressive with caching to improve the speed of server responses.</p>
<p>The truth is that no matter how good you get at optimizing performance, there&rsquo;s always more you can do.</p>
					
				</section>
				
				<section id="takeaways">			
								<section id="pitfalls" class="takeaway">

					<h1>Pitfalls to Avoid</h1>

					<ul>
<li>Don’t wait until the end of a project to consider the experience of users on small screens and devices on mobile&nbsp;networks.</li>
<li>Don’t structure your media queries desktop-first. If you go mobile-first, you can greatly reduce the download for small screen devices since most browsers will not download any background images that reside in media queries they aren’t&nbsp;applying</li>
<li>Don’t use <code>display: none</code> to hide images on small screens; they will still load the images, the user just won’t be able to see&nbsp;them.</li>
<li>If you’re using multiple style sheets or JavaScript files, consider concatenating the crucial bits into single files and then lazy-load the&nbsp;rest.</li>
</ul>
				</section>
								<section id="todos" class="takeaway">

					<h1>Things to Do</h1>

					<ul>
<li>Follow the philosophy of progressive enhancement: star with a solid, universally usable experience and layer on usability and design improvements for larger screens and more capable&nbsp;devices.</li>
<li>Use lazy loading to asynchronously inject any supplementary content (including&nbsp;images).</li>
<li>Minify&nbsp;everything!</li>
<li>Banish 3rd party widget&nbsp;code.</li>
</ul>
				</section>
				</section>

				

								<section id="further-reading">
					<h1>Further Reading</h1>
					<ul>
				
					
						<li class="blog">Aaron Gustafson, &#8220;<a href="http://blog.easy-designs.net/archives/from-mobile-friendly-to-mobile-first">From “Mobile Friendly” to “Mobile First”</a>&#8221;, Easy Designs, 12 October 2011</li>
				
					
						<li class="blog">Nicholas Zakas, &#8220;<a href="http://www.nczonline.net/blog/2011/11/29/how-content-delivery-networks-cdns-work/">How content delivery networks (CDNs) work</a>&#8221;, Nicholas Zakas, 29 November 2011</li>
				
					
						<li class="blog">Steve Souders, &#8220;<a href="http://www.stevesouders.com/blog/2008/03/20/roundup-on-parallel-connections/">Roundup on Parallel Connections</a>&#8221;, Steve Souders, 20 March 2008</li>
				
					
						<li class="blog">Jeremy Keith, &#8220;<a href="http://adactio.com/journal/5429/">Conditional CSS</a>&#8221;, Jeremy Keith, 27 May 2012</li>
				
					
						<li class="blog">Aaron Gustafson, &#8220;<a href="http://blog.easy-designs.net/archives/dont-sell-out-your-users/">Don’t Sell Out Your Users</a>&#8221;, Easy Designs, 24 May 2012</li>
				
					
						<li class="article">Vitaly Friedman, &#8220;<a href="http://www.smashingmagazine.com/2014/09/08/improving-smashing-magazine-performance-case-study/">Improving Smashing Magazine’s Performance: A Case Study</a>&#8221;, <cite>Smashing Magazine</cite>, 8 September 2014</li>
				
					
						<li class="blog">Scott Jehl, &#8220;<a href="http://filamentgroup.com/lab/performance-rwd.html">How we make RWD sites load fast as heck</a>&#8221;, Filament Group, 30 July 2014</li>
				
					</ul>
				</section>
							
		]]></description>
					<link>http://webstandardssherpa.com/reviews/reflecting-on-the-revamped-sherpa</link>
			<guid>http://webstandardssherpa.com/reviews/reflecting-on-the-revamped-sherpa</guid>
			<dc:date>2014-10-28T10:00:00+00:00</dc:date>
		</item>
	
		<item>
			<title><![CDATA[Getting Started with Sass, Part 3]]></title>
			<dc:creator>Laura Kalbag</dc:creator>
			<description><![CDATA[
					
				
					<figure id="figure-30-1"> <img src="http://webstandardssherpa.com/r/30-1.jpg" alt="Web Talk Dog Walk" /> </figure>
<p>In <a href="http://webstandardssherpa.com/reviews/getting-started-with-sass-part-1">Part 1</a> of this series, I introduced you to CodeKit and Sass basics like partials, variables, comments and errors. In <a href="http://webstandardssherpa.com/reviews/getting-started-with-sass-part-2">Part 2</a>, I showed you how to achieve vertical rhythm using variables and math operators, and demonstrated how the Sass nesting syntax makes media queries easier to maintain.</p>
<p>In this Part 3, I'm going to explore mixins and placeholders, and demonstrate how to use frameworks to import useful mixins and make development faster.</p>
<h2>Mixins</h2>
<p>Mixins are another key element of Sass, and they can be very powerful. Mixins are essentially formulas of different CSS or Sass rules grouped together. The same mixin can be used in multiple places throughout a stylesheet. If the mixin rules are changed, the output CSS will be changed wherever that mixin is used, which can save a lot of time and repetition.</p>
<p>You define a mixin with the <code>@mixin</code> directive, followed by a unique name of your choice. The curly brackets contain the style declarations for that mixin:</p>
<pre><code>@mixin mixin-name {
  margin: 0;
  padding: 0;
}</code></pre>
<p>You can then reference the mixin in your Sass by including it in a rule:</p>
<pre><code>ul {
  @include mixin-name;
}</code></pre>
<p>Which compiles to the CSS:</p>
<pre><code>ul {
  margin: 0;
  padding: 0;
}</code></pre>
<h3>Mixins with Variables</h3>
<p>You can use variables in mixins to create reusable chunks of CSS that can vary slightly each time they appear. Consider these navigation buttons, which share some fundamental styles with a few variations:</p>
<figure id="figure-33-1"> <img src="http://webstandardssherpa.com/r/33-1.png" alt="Buttons on Web Talk Dog Walk site" /> <figcaption>These buttons are similar in style, but with different text and background colors</figcaption> </figure>
<p>With traditional CSS, the button rules might look something like this:</p>
<pre><code>.button {
  border-radius: 10px;
  padding: 0 15px;
  text-decoration: none;
  text-transform: uppercase;
}

.active-button {
  background: #637a3d;
  color: #c0d0aa
}

.inactive-button {
  background: #3f5526;
  color: #f9f9f9;
}
</code></pre>
<p>And the HTML would reference <em>two classes</em> in order to have both the base and variant styles:</p>
<pre><code>&lt;a class="button active-button" href=""&gt;Button&lt;/a&gt;</code></pre>
<p>With Sass mixins, you can bring these common rules together in one mixin, specifying their different text and background colors using variables. First, define the mixin with a name, then list the variables that the mixin will use, separated by commas, inside parenthesis:</p>
<pre><code>@mixin button($text, $background) {
}</code></pre>
<p>Next, within the curly braces for the mixin rule, add the common properties and values:</p>
<pre><code>@mixin button($text, $background) {
<mark>  border-radius: 10px;</mark>
<mark>  padding: 0 15px;</mark>
<mark>  text-decoration: none;</mark>
<mark>  text-transform: uppercase;</mark>
}
</code></pre>
<p>For the styles that will vary, use variables for the property values:</p>
<pre><code>@mixin button($text, $background) {
<mark>  background: $background;</mark>
  border-radius: 10px;
<mark>  color: $text;</mark>
  padding: 0 15px;
  text-decoration: none;
  text-transform: uppercase;
}
</code></pre>
<p>Then apply the mixin to each unique button rule using the <code>@include</code> directive<code>,</code> replacing the <code>$text</code> and <code>$background</code> variable names with the actual values you'd like to use, which can themselves be variables defined elsewhere in your Sass. Here I'm using the color variables I defined in <a href="http://webstandardssherpa.com/reviews/getting-started-with-sass-part-1">Part 1</a>:</p>
<pre><code>.active-button {
<mark>  @include button($green-mid, $green-light);</mark>
}</code></pre>
<p>The values must occur in the same order as they are defined in the mixin so Sass can apply them in the proper order when it compiles the CSS. Here, the first value is for the text color and the second value is the background color. Our two button variations can now use the same mixin with different color values:</p>
<pre><code>.active-button {
  @include button($green-mid, $green-light);
}

.inactive-button {
  @include button($grey-light, $green-dark);
}</code></pre>
<p>Which compiles to:</p>
<pre><code>.active-button {
  border-radius: 10px;
  background: #637a3d;
  color: #c0d0aa
  padding: 0 15px;
  text-decoration: none;
  text-transform: uppercase;
}

.inactive-button {
  border-radius: 10px;
  background: #3f5526;
  color: #f9f9f9;
  padding: 0 15px;
  text-decoration: none;
  text-transform: uppercase;
}</code></pre>
<h2>Mixins vs. Placeholders</h2>
<p>In the Web Talk Dog Walk site, I might use a mixin to hide content  visually but allow screen readers to access it (screen readers won&rsquo;t  read content hidden with <code>display:none</code>):</p>
<pre><code>@mixin hide {
  height: 0;
  margin: 0;
  overflow: hidden;
  padding: 0;
}</code></pre>
<p>The <code>hide</code> mixin is a handy set of rules, and not specific to any HTML element. This means I could use it for many elements on the site:</p>
<pre><code>.site-title {
<mark>  @include hide;</mark>
}

.skip-link {
<mark>  @include hide;</mark>
}</code></pre>
<p>Unfortunately, this results in the same set of declarations output twice:</p>
<pre><code>.site-title {
  height: 0;
  margin: 0;
  overflow: hidden;
  padding: 0;
}

.skip-link {
  height: 0;
  margin: 0;
  overflow: hidden;
  padding: 0;
}</code></pre>
<p>Not only is this is unnecessarily repetitive, it adds bloat to the CSS file. This is where placeholders come in handy.</p>
<h3>Placeholders</h3>
<p>Placeholders are much like mixins, but they don't work with variables. Most importantly, placeholder output is grouped together into one rule in the compiled CSS. Define a placeholder with a <code>%</code> followed by a unique name. The curly braces contain the style declarations for that placeholder:</p>
<pre><code>%hide {
  height: 0;
  margin: 0;
  overflow: hidden;
  padding: 0;
}</code></pre>
<p>To include the placeholder's styles within a rule, use the<code> @extend</code> directive:</p>
<pre><code>.site-title {
<mark>  @extend %hide;</mark>
}</code></pre>
<pre><code>.skip-link {
<mark>  @extend %hide;</mark>
}</code></pre>
<p>This approach is very similar to including the mixin, but the difference is that the <code>%hide</code> placeholder CSS will be compiled as <em>one rule</em>:</p>
<pre><code>.site-title, <br />.skip-link {
  height: 0;
  margin: 0;
  overflow: hidden;
  padding: 0;
}</code></pre>
<p>Sass collects all the selectors for every rule where the placeholder appears and puts them into one rule, applying the placeholder's styling to all of those elements. This results in less repetition than using a mixin, giving you a smaller, faster stylesheet.</p>
<h2>Using Mixins for Prefix Support</h2>
<p>One popular use of mixins is to automatically include <a href="http://www.sitepoint.com/web-foundations/vendor-specific-properties/" title="Vendor Specific Properties explained on Sitepoint">vendor prefixes</a>. There are many properties in CSS3 that will only work in some browsers with the correct prefix. CSS transitions, for example:</p>
<pre><code>a&nbsp;{
  background-color: #ff3000;
<mark>  -webkit-transition: background-color 1s ease;</mark>
<mark>  -moz-transition: background-color 1s ease;</mark>
<mark>  -ms-transition: background-color 1s ease;</mark>
<mark>  -o-transition: background-color 1s ease;</mark>
  transition: background-color 1s ease;
}

a:hover {
  background-color: #ff9500;
}</code></pre>
<p>Staying up-to-date with the changes in all modern browsers is a lot of work. There's loads of prefixes to remember, subtle differences in the prefix syntax, and a lot of repetition. Luckily there are Sass frameworks and libraries that keep up with the changes browsers are making. Sass libraries are collections of mixins that you can use in your stylesheets. Two of the most well-known Sass libraries are <a href="http://compass-style.org">Compass</a> and <a href="http://bourbon.io">Bourbon</a>.</p>
<h3>Adding Bourbon to a Project</h3>
<p>You can install Bourbon as a Ruby gem with a few commands, but if you&rsquo;re using CodeKit it&rsquo;s already included. It's easiest to add Bourbon to a project in CodeKit; all you need to do is import it:</p>
<p><code>@import "bourbon";</code></p>
<p>I usually include Bourbon above my partials in my main Sass file:</p>
<pre><code><mark>@import "bourbon";</mark>
@import "mixins.scss";
@import "variables.scss";
@import "reset.scss";
@import "fonts.scss";
@import "base.scss";
@import "header.scss";
@import "illustration.scss";
@import "layout.scss";</code></pre>
<p>When Bourbon is imported, you can make use of all the mixins found in the <a href="http://bourbon.io/docs/">Bourbon Docs</a>, such as CSS transitions:</p>
<pre><code>a&nbsp;{
  background-color: #ff3000;
<mark>  @include transition (background-color 1.0s ease);</mark>

  &amp;a:hover {
    background-color: #ff9500;
  }
}</code></pre>
<p>Which compiles to:</p>
<pre><code>a&nbsp;{
  background-color: #ff3000;
<mark>  -webkit-transition: background-color 1s ease;</mark>
<mark>  -moz-transition: background-color 1s ease;</mark>
<mark>  -ms-transition: background-color 1s ease;</mark>
<mark>  -o-transition: background-color 1s ease;</mark>
<mark>  transition: background-color 1s ease;</mark>
}

a:hover {
  background-color: #ff9500;
}</code></pre>
<h2>Start Small, But Start!</h2>
<p>Sass is very powerful, and there are new features being added frequently. But it's very easy to start small and get used to how it works, before exploring more complex functions and features. I recommend that you start by adding color variables (<a href="http://webstandardssherpa.com/reviews/getting-started-with-sass-part-1">Part 1</a>) or nesting your media queries to make your styles easier to read (<a href="http://webstandardssherpa.com/reviews/getting-started-with-sass-part-2">Part 2</a>). Soon you'll be writing your own mixins like a pro.</p>
				

								<section id="extra-mile">
					<h1>Going the Extra Mile</h1>
					
						<p>Sass allows you to write your own custom functions. These can be useful for integrating Sass into other languages and technologies, and the syntax is straight-forward for those with programming experience. However I don't use custom functions in my work, as I find the programming abstracts the readability out of the stylesheets. I primarily use Sass to prevent repetition and make stylesheets easier to maintain, so adding complexity seems to defeat the point!</p>
<p>However, there are many smart people creating custom functions if you want to dive deeper into Sass. One of those people is Hugo Giraudel, who has a <a href="https://gist.github.com/HugoGiraudel/8332582">huge list of his Sass-related links on Github</a>.</p>
					
				</section>
				
				<section id="takeaways">			
								<section id="pitfalls" class="takeaway">

					<h1>Pitfalls to Avoid</h1>

					<ul>
<li>Avoid using mixins where placeholders could be used. Repetitive use of the same mixin with the same variables will result in very long and bloated <span class="caps">CSS.</span></li>
</ul>
				</section>
								<section id="todos" class="takeaway">

					<h1>Things to Do</h1>

					<ul>
<li>Use a framework such as Compass or Bourbon for ready-made&nbsp;mixins.</li>
<li>Understand the difference between mixins and placeholders to prevent unnecessary repetition and bloat in your&nbsp;stylesheets.</li>
</ul>
				</section>
				</section>

				

								<section id="further-reading">
					<h1>Further Reading</h1>
					<ul>
				
					
						<li class="tool">Phil LaPier, &#8220;<a href="http://bourbon.io/">Bourbon</a>&#8221;, thoughtbot, 18 July 2014</li>
				
					
						<li class="article">Hugo Giraudel, &#8220;<a href="http://www.sitepoint.com/sass-mixin-placeholder/">Sass: Mixin or Placeholder</a>&#8221;, <cite>Sitepoint</cite>, 18 July 2014</li>
				
					
						<li class="article">Roy Tomeij, &#8220;<a href="http://roytomeij.com/blog/2013/should-you-use-a-sass-mixin-or-extend.html">Should you use a Sass mixin or @extend?</a>&#8221;, <cite>Roy Tomeij</cite>, 18 July 2014</li>
				
					
						<li class="article">Mason Wendell, &#8220;<a href="http://thesassway.com/advanced/pure-sass-functions">Using pure Sass functions to make reusable logic more useful</a>&#8221;, <cite>The Sass Way</cite>, 18 July 2014</li>
				
					</ul>
				</section>
							
		]]></description>
					<link>http://webstandardssherpa.com/reviews/getting-started-with-sass-part-3</link>
			<guid>http://webstandardssherpa.com/reviews/getting-started-with-sass-part-3</guid>
			<dc:date>2014-10-13T10:00:00+00:00</dc:date>
		</item>
	
		<item>
			<title><![CDATA[Writing for Global Audiences]]></title>
			<dc:creator>Nicole Fenton</dc:creator>
			<description><![CDATA[
					
				
					<figure id="figure-32-1"> <img src="http://webstandardssherpa.com/r/32-1.png" alt="The Internet Archive" /> </figure>
<p>By the end of this year, there will be almost <a href="http://www.itu.int/en/ITU-D/Statistics/Documents/facts/ICTFactsFigures2014-e.pdf">three billion people using the Internet</a>, with two-thirds of them in developing countries. It&rsquo;s time for us to look outside ourselves and our borders, because we really are writing for the worldwide web.</p>
<p>So if we&rsquo;re writing in English, how do we prepare our content for international readers? How can we make sure our friends and neighbors from around the world can read our work? We can start by honing our language and sentences so they&rsquo;re easy to translate. Then we can focus on the localization process itself and refine our content to suit different audiences.</p>
<h2>Case Study: The Internet Archive</h2>
<p>Let&rsquo;s work through these concepts with a proper example: <a href="http://archive.org/">The Internet Archive</a>, a nonprofit digital library. Their mission is to provide universal access to all knowledge &mdash; to archive everything on the Internet and everything that <em>should be</em> on the Internet. Founded in 1996, the Archive provides free and open access to a huge collection of websites, videos, audio files, books and texts, educational resources, and software (including old <a href="https://archive.org/details/historicalsoftware">Atari games</a>, if you're interested). They also have a wide variety of <a href="http://en.wikipedia.org/wiki/Internet_Archive#Number_of_texts_for_each_language">content in other languages</a> like French, German, Spanish, Chinese, and Arabic.</p>
<p>Between their universal mission and their multilingual content, the Archive is a good example of a site that should be written for global readers. But they&rsquo;re a nonprofit with limited resources, so how might they go about that?</p>
<h2>Set the Stage for Translation</h2>
<p><a href="http://theatacompass.org/2013/11/04/hello-world-quality-website-translation-is-your-entry-pass-to-a-global-market/">Michael Shubert</a>, a certified translator, says:</p>
<blockquote>
<p>The single best thing your business can do to make the translation process smooth and successful is to lovingly craft and refine your text before sending it out for translation.</p>
</blockquote>
<p>If your content is clear, brief and accessible, you&rsquo;re already doing most of the work of preparing it for translation. But we all forget to use plain English from time to time, so let&rsquo;s examine a few changes the Archive could make to prepare their content for international readers.</p>
<h3>Use Short, Complete Sentences</h3>
<p>Pay attention to the <a href="http://en.wikipedia.org/wiki/Sentence_clause_structure">structure</a> and length of your sentences. Are they all the same length? Is anything longer than it needs to be?</p>
<p>These rules of thumb may help you keep your sentences short and sweet:</p>
<ul>
<li>Aim for about 20 words or less. If you find your sentences going over that, read them aloud to keep them as brief as possible.</li>
<li>Adverbs and adjectives are optional, and best used sparingly.</li>
<li>Try to find the simplest way to express each idea.</li>
</ul>
<p>Consider this example from the Archive:</p>
<blockquote>
<p>Thank you for your interest in the Internet Archive. We would love to host your digital artifacts. In order to access this page, you will need to [log in] to our website. (https://archive.org/create/)</p>
</blockquote>
<p>To make this more suitable for a global audience, the Archive could cut the unnecessary words and repetition, and focus on what the reader needs:</p>
<blockquote>
<p>Thanks for your interest in the Internet Archive. To upload a digital artifact, please [log in] or [create an account].</p>
</blockquote>
<h3>Check the Basics</h3>
<p>Once your sentences are appropriately concise, make sure everything makes sense and reads well in English. Each sentence should have a subject, a verb and appropriate punctuation.</p>
<p>Also, be sure to proofread your copy before you send to your translator. Spelling and grammar mistakes may cost you extra time and money.</p>
<h3>Avoid Idioms, Colloquialisms &amp; Regional Metaphors</h3>
<p>Different people have different ways of seeing the world. Don&rsquo;t assume lingo or pop culture references will work for everyone. For example, 311 and 911 make sense for Americans, but most countries use their own system for emergency services, so any reference to those numbers may be lost on international readers.</p>
<p>Whenever possible, choose common words to say what you mean. Avoid jargon, fancy phrases and Latin abbreviations. The Archive does a nice job of using plain language on their <a href="https://archive.org/donate/index.php">donation page</a>.</p>
<h3>Be Careful with Icons &amp; Colors</h3>
<p>Along with jargon and regional phrases, be careful with <a href="http://blog.globalizationpartners.com/culturally-customized-website.aspx">symbols and imagery</a>. For example, you may need to localize mailbox, magnifying glass or shopping cart icons, because those visual metaphors don&rsquo;t always translate. This is also true for photography.</p>
<p>Color can also make a difference. For example, <a href="http://en.wikipedia.org/wiki/Red#In_different_cultures_and_traditions">red</a> means life in some places, and death or danger in others.</p>
<h3>Be Consistent with Spelling &amp; Capitalization</h3>
<p>It&rsquo;s also important to use the same spelling and capitalization as you write. This not only makes it easier for your readers to follow along, but also minimizes translation costs because your linguist can reuse the phrasing in their software. As a quick example, the Archive uses American English, so they should avoid British counterparts like <em>colour</em>, <em>behaviour</em>, and <em>neighbour</em>.</p>
<p>A simple style guide can help you standardize spelling and terminology. And if you have voice and tone guidelines, share those with your translation team so they understand your brand guidelines and higher level goals for the content.</p>
<h3>Make a List of Common Words</h3>
<p>If you have unique product or feature names, list those out for your translation team so they&rsquo;re reflected correctly. You may also want to include specifics about the meaning of each phrase or even associations you want to avoid. As a minor example, the Archive has several names for <a href="https://archive.org/details/movies">videos</a> including movies, moving images and films. While I personally appreciate the language choices there, having multiple terms for the same thing can cause confusion and cost you money.</p>
<p>Keep in mind that some names won&rsquo;t translate well, so be ready to talk with your linguist and your marketing team about alternatives.</p>
<h3>Format Numbers Correctly</h3>
<p>Numbers are a small detail that make a big difference for your readers. Whether you&rsquo;re writing about an event or sharing contact information, you can show how much you care by using the appropriate formatting and spelling for:</p>
<ul>
<li><a href="http://www.w3.org/International/questions/qa-personal-names">Names</a></li>
<li><a href="http://en.wikipedia.org/wiki/Date_format_by_country">Dates</a> (e.g., MM/DD/YYYY, DD/MM/YYYY)</li>
<li>Times and <a href="http://everytimezone.com">timezones</a></li>
<li><a href="http://en.wikipedia.org/wiki/National_conventions_for_writing_telephone_numbers">Phone numbers</a></li>
<li>Prices and <a href="http://en.wikipedia.org/wiki/List_of_circulating_currencies">currencies</a> (e.g., USD vs. AUD)</li>
</ul>
<p>These details are especially important for retail sites and corporate contact pages.</p>
<h3>Make Sure It Fits</h3>
<p>English phrases are often shorter than their global counterparts, so you should avoid truncating your text as much as possible. If your design template has character limits for descriptions, titles or navigational elements, keep those length limits in mind. This is especially important for mobile readers.</p>
<p>It may be tempting to chop long descriptions off to a specific character or word count, but that creates confusion for readers in any language. For example, the main modules on the Archive's homepage (Web, Video, Live Music, Audio and Texts) highlight a curator&rsquo;s choice piece and a recent review:</p>
<figure id="figure-32-2"> <img src="http://webstandardssherpa.com/r/32-2.png" alt="The Internet Archive's homepage modules" /> </figure>
<p>The description text is interrupted halfway, leaving the content behind that click up to the reader&rsquo;s imagination. While the description on the left is clear and easy to read, it doesn&rsquo;t match the formatting of the description on the right. And the one in the middle is in Arabic, so it&rsquo;s lost on an English reader like me.</p>
<p>This is a great example of a design opportunity: the Archive could make minor adjustments to their description modules to accommodate longer text. If you&rsquo;re facing a similar challenge, work with your design team to make your content fit within your templates in a logical way, both before and after translation. As a general note, if something is hard to follow before translation, it will only be more confusing after.</p>
<h3>Don&rsquo;t Bury Important Information</h3>
<p>When you&rsquo;re designing your site, make sure your navigation supports your global readers. Too many sites hide their localized content in a PDF or bury it behind several clicks. But <a href="http://www.wikipedia.org">Wikipedia</a> does a great job of featuring language links on the homepage and their sidebars. Give your global audiences the same level of attention and respect that you give your primary audience.</p>
<h2>Build a Global Practice</h2>
<p>After you've done the foundational work of cleaning up your content, you&rsquo;re almost ready to translate it. But translation may not be what you need. <em>Localization</em> and <em>translation</em> are often used interchangeably, but they&rsquo;re different processes and yield different results.</p>
<p>Web translations, like the output from Google Translate, are typically word-for-word text replacements. By contrast, a professional translator will take your content, analyze it and revise it to fit a particular market. Localization (or <em>L10n</em>) requires time and consideration from someone who understands the implications of your writing and the cultural needs of a particular place. Take some time to learn about the differences <a href="http://www.w3.org/International/questions/qa-i18n.en">between translation and localization</a> to decide what&rsquo;s right for your project.</p>
<h3>Find a Localization Specialist</h3>
<p>When you're ready to localize your content, do your research. Unions and translation associations like the <a href="http://www.atanet.org/onlinedirectories/">American Translators Association</a> often publish a directory of licensed translators and linguists. <a href="https://www.odesk.com/o/profiles/browse/skill/translation/">oDesk</a> also has a community of freelance translators available for hire. Since the Internet Archive is based in San Francisco, they could find a translator through one of these services or the <a href="http://www.ncta.org">Northern California Translators Association</a>.</p>
<p>Look for a translator that's familiar with the types of content you write. You wouldn&rsquo;t want to hire a fiction translator to revise your terms of service. Most linguists specify which content types and subjects they&rsquo;re familiar with, like legal documents, marketing, software, and patents. And much like hiring a lawyer or designer, you may find it useful to ask people you know for referrals.</p>
<h3>Plan Your Budget &amp; Workflow</h3>
<p>Along with finding a localization specialist, you&rsquo;ll need a budget for paying them (unless you find volunteers) and system for managing your files. For smaller projects, it may be as simple as emailing HTML back and forth to each other and then mailing a check.</p>
<p>For hefty sites, you may want to plan out different phases and use a localization platform to keep everything in order. Check into <a href="http://www.smartling.com">Smartling</a> and <a href="http://useshuttle.com">Shuttle</a> to see if they&rsquo;re worth your time.</p>
<h3>Make Time for Translations</h3>
<p>When you&rsquo;re planning a project, factor in translation time. A lot of companies put off translations until weeks or months after a launch. But this work should be part of your writing and design process:</p>
<ul>
<li>Keep your global readers in mind as you make design decisions.</li>
<li>Coordinate with your localization specialist regularly so they have time to ask you questions.</li>
<li>Factor translation time into your launch schedule.</li>
<li>Don&rsquo;t forget about content after the launch.</li>
</ul>
<p>Incorporate time and resources for that work into your editorial calendar and publishing workflow.</p>
<ul>
</ul>
<h3>Start with Your Largest Secondary Audience</h3>
<p>Another part of your workflow planning is prioritizing languages. If you already have hundreds of pieces of content like the Archive, you may want to pick <strong>one</strong> secondary audience to design the process around. The Archive could start with French, Spanish, or Chinese, because those three languages are common in both their content and the city of San Francisco, where the Archive is based.</p>
<p>After cleaning up the English content and working to translate it into one other language, the Archive could take that same approach and introduce new languages over time.</p>
<h3>Keep Your Localized Content Up-to-Date</h3>
<p>Lastly, localization is an <em>ongoing</em> process because your content will change from time to time. When you make edits in English or add new English pages, remember to get those translated too. Check in with your localization expert periodically and consider including translation time in your editorial calendar.</p>
<h2>Start with Your Foundation</h2>
<p>Translation and localization are great investments for your readers. But you can start with the basics, especially if your resources are limited. As you can see from the Archive examples, there are a number of simple changes you can make to your own content to prepare it for international audiences.</p>
<p>Focusing on clear, concise and user-focused content will get you more than halfway to your goal. Here again is the classic editorial challenge of keeping things updated and consistent. Give yourself a solid foundation of good content. When you&rsquo;re ready to invest in translations and broaden your readership, everyone will get the most from that investment.</p>
				

								<section id="extra-mile">
					<h1>Going the Extra Mile</h1>
					
						<p>Once you have the tools and resources to localize your content, take it a step further and test variations of copy in different regions. Some regions or countries will respond to the same message differently, so you should try a few ideas before pushing them out everywhere.</p>
<p>Whenever you&rsquo;re testing copy, keep these things in mind:</p>
<ul>
<li><strong>Write 3-7 different variations.</strong> Play with the meaning and structure of each one. If two variations are too similar, you may not be able to tell why it&rsquo;s working in Japan, but not in Germany.</li>
<li><strong>Don&rsquo;t test anything you wouldn&rsquo;t publish.</strong> Your readers don&rsquo;t know the difference between a test and a final piece of copy. Keep those variations within your brand guidelines.</li>
<li><strong>Stay in sync.</strong> Let your localization specialist know that you&rsquo;re testing copy variations and be sure to include them in the planning process. They often know more about global readers than the data can tell you, and they may even have ideas for the content.</li>
</ul>
					
				</section>
				
				<section id="takeaways">			
								<section id="pitfalls" class="takeaway">

					<h1>Pitfalls to Avoid</h1>

					<ul>
<li>Don’t assume everyone in your audience speaks or reads in English, even if they’re in your home&nbsp;country.</li>
<li>Don’t think of localization as a hurdle or an excuse to dumb down your content. Clear, friendly writing benefits all of your&nbsp;readers.</li>
<li>Don’t hide your localized content in PDFs or dusty corners of your website. Make it easy for people to find what they&nbsp;need.</li>
</ul>
				</section>
								<section id="todos" class="takeaway">

					<h1>Things to Do</h1>

					<ul>
<li>Read through your content on the screen, aloud, and on paper to check for understanding and conciseness. Make sure it fits within your design&nbsp;too.</li>
<li>Work with a specialist to translate and improve your content for global audiences. Share your voice and tone guidelines with them&nbsp;too.</li>
<li>Keep at it! Treat localization as a larger part of your iterative writing&nbsp;process.</li>
</ul>
				</section>
				</section>

				

								<section id="further-reading">
					<h1>Further Reading</h1>
					<ul>
				
					
						<li class="tool">American Translators Association, &#8220;<a href="http://theatacompass.org/">The American Translators Association Compass</a>&#8221;, American Translators Association, 14 August 2014</li>
				
					
						<li class="tool">Translate House, &#8220;<a href="http://docs.translatehouse.org/projects/localization-guide/en/latest/guide/start.html">Localization Guide</a>&#8221;, Translate House, 1 January 2013</li>
				
					
						<li class="book">Bert Esselink, <cite>A Practical Guide to Localization</cite>, John Benjamins Publishing Company, 2000</li>
				
					
						<li class="book">John Kohl, <cite>The Global English Style Guide: Writing Clear, Translatable Documentation for a Global Market</cite>, SAS Publishing, 2008</li>
				
					
						<li class="book">John Yunker, <cite>Beyond Borders: Web Globalization Strategies</cite>, New Riders, 2002</li>
				
					</ul>
				</section>
							
		]]></description>
					<link>http://webstandardssherpa.com/reviews/writing-for-global-audiences</link>
			<guid>http://webstandardssherpa.com/reviews/writing-for-global-audiences</guid>
			<dc:date>2014-09-30T10:00:00+00:00</dc:date>
		</item>
	
		<item>
			<title><![CDATA[Getting Started with Sass, Part 2]]></title>
			<dc:creator>Laura Kalbag</dc:creator>
			<description><![CDATA[
					
				
					<figure id="figure-30-1"> <img src="http://webstandardssherpa.com/r/30-1.jpg" alt="Web Talk Dog Walk" /> </figure>
<p>In <a href="http://webstandardssherpa.com/reviews/getting-started-with-sass-part-1">Part 1</a> of this series, I introduced you to Sass, a CSS pre-processor. I showed you how to set up a project using Codekit to compile Sass files, and got started on the basics of the Sass syntax with partials, variables, comments and errors.</p>
<p>In this, Part 2, I'm going to take a deeper look at variables and using maths with variable operations to achieve vertical rhythm. I'll also discuss Sass nesting syntax to make CSS easier to read and maintain.</p>
<h2>Vertical Rhythm with Variables</h2>
<p>The text and layout elements in my design align to a 10px base grid that I&rsquo;ve set in <a href="http://bohemiancoding.com/sketch/">Sketch</a>. Ideally, I want to replicate the grid alignment in my CSS to establish a vertical rhythm that creates a consistent pattern down the page.</p>
<figure id="figure-31-1"> <img src="http://webstandardssherpa.com/r/31-1.png" alt="Mockup with base grid overlay" /> <figcaption>If you work with grids in your design, chances are you'll work with a base grid like this in your work.</figcaption> </figure>
<p>I can achieve this type of consistency with Sass variables, which can contain numbers, not just the text-based values detailed in Part 1. By creating a variable base unit of 10px, I can align all elements to a 10px grid:</p>
<pre><code>$unit: 10px;</code></pre>
<p>Then I can apply this in my paragraph selector to give all paragraphs a bottom margin of 10px:</p>
<pre><code>p {
  margin-bottom: $unit;
}</code></pre>
<p>Which compiles to the CSS:</p>
<pre><code>p {
  margin-bottom: 10px;
}</code></pre>
<h3>Math Operators</h3>
<p>To make the most of my new base <code>$unit</code> variable, I can use math operators to specify all sizes I may need. For example, the body text font size on Web Talk Dog Walk is 15px, which is the 10px base unit multiplied by 1.5.</p>
<p>The syntax includes the variable, the multiplication symbol <code>*</code> and the value to multiply the unit by:</p>
<pre><code>font-size: $unit*1.5;
</code></pre>
<p>Which compiles to the CSS:</p>
<pre><code>body {
  font-size: 15px;
}</code></pre>
<p>Addition (<code>+</code>), subtraction (<code>-</code>), division (<code>/</code>) and percentage (<code>%</code>) operators can also be used on variables to convert units in Sass.</p>
<p>This base <code>$unit</code> variable with math operators can then be applied to a whole load of selector rules. Any rule with a measurement can take a variable, including margins, padding, font-size and line-height:</p>
<pre><code>body {
  background: $grey-mid-light;
  color: $grey-dark;
  font-family: "Adelle Sans", Helvetica, Arial, sans-serif;
<mark>  font-size: $unit*1.5;</mark>
<mark>  line-height: $unit*2.5;</mark>
}

h1,
h1 a {
  color: $green-bright;
<mark>  font-size: $unit*2.4;</mark>
<mark>  line-height: $unit*3;</mark>
<mark>  margin: $unit 0 $unit*2 0;</mark>
}

&hellip;</code></pre>
<p>Which compiles to the CSS:</p>
<pre><code>body {
  background: #eee;
  color: #474747;
  font-family: "Adelle Sans", Helvetica, Arial, sans-serif;
<mark>  font-size: 15px;</mark>
<mark>  line-height: 25px;</mark>
}

h1,
h1 a {
  color: #97C459;
<mark>  font-size: 24px;</mark>
<mark>  line-height: 30px;</mark>
<mark>  margin: 10px 0 20px 0;</mark>
}

&hellip;</code></pre>
<p>In these examples, the font-size and the line-height are being defined together. Many web developers prefer to use a unitless line-height on the <code>body</code>, ensuring the line-height scales proportionally to the font-sizes declared throughout the style sheet. <a href="http://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/">Eric Meyer explains the benefits in his post on Unitless line-heights</a>. I want to keep tight control over the vertical rhythm, so I'm defining both the font-size and the line-height wherever I change the font-size. When declaring line-heights with a fixed unit like px, you'll need to adjust the line-height every time you change the font-size. Otherwise there's a risk of ending up with a dispropotionately large or small line-height compared to the font-size.</p>
<h3>Changing Many Rules Across the Stylesheet</h3>
<p>Though my mockup used a 10px grid, text inevitably renders slightly different in browsers than in mockups:</p>
<figure id="figure-31-2"> <img src="http://webstandardssherpa.com/r/31-2.jpg" alt="Styled text in the browser with 10px baseline" /> </figure>
<p>I want to increase the font-size globally while retaining the vertical rhythm and consistency I've already established. This is where my base unit variable is magic.</p>
<p>By simply changing the <code>$unit</code> variable to 11px, every instance of <code>$unit</code> will be updated across the Sass files. Where math operators are used, it will be compiled again using 11px as the variable unit:</p>
<pre><code>$unit: 11px;</code></pre>
<p>When the Sass is recompiled, we get:</p>
<pre><code>body {
  background: #eee;
  color: #474747;
  font-family: "Adelle Sans", Helvetica, Arial, sans-serif;
<mark>  font-size: 16.5px;</mark>
<mark>  line-height: 27.5px;</mark>
}

h1,
h1 a {
  color: #97C459;
<mark>  font-size: 26.4px;</mark>
<mark>  line-height: 33px;</mark>
<mark>  margin: 11px 0 22px 0;</mark>
}

&hellip;</code></pre>
<p>With just a single variable change, everything updates and scales together, not just the font-size. This keeps the relative proportions of the design intact.</p>
<h2>Nesting Syntax</h2>
<p>Sass offers a number of ways to keep your CSS organized, including nesting. Web Talk Dog Walk's navigation:</p>
<figure id="figure-31-3"> <img src="http://webstandardssherpa.com/r/31-3.png" alt="Web Talk Dog Walk's horizontal navigation" /> </figure>
<p>With ordinary CSS, the rules for this navigation might look something like this, with the rules in order of specificity:</p>
<pre><code>.site-navigation {
  &hellip;
}

.site-navigation ul {
  &hellip;
}

.site-navigation ul li {
  &hellip;
}

.site-navigation ul li a {
  &hellip;
}</code></pre>
<p>You might indent your CSS to make it easier to understand the parent-child hierarchy at a glance:</p>
<pre><code>.site-navigation {
  &hellip;
}

  .site-navigation ul {
    &hellip;
  }

    .site-navigation ul li {
      &hellip;
    }

      .site-navigation ul li a {
        &hellip;
      }</code></pre>
<p>But Sass takes this even further. Rules can be nested <em>inside</em> the parent selector. This means the <code>.site-navigation</code> class doesn't have to be repeated for every selector:</p>
<pre><code>.site-navigation {
  &hellip;

  ul {
    &hellip;
    
    li {
      &hellip;

      a {
        &hellip;
      }
    }
  }
}</code></pre>
<p>Sass knows <code>.site-navigation</code> is the parent because the <code>ul</code> rule is nested inside <code>.site-navigation</code>'s curly brackets. It&rsquo;s much easier to read, less repetitive and outputs exactly the same CSS:</p>
<pre><code>.site-navigation {
  &hellip;
}
.site-navigation ul {
  &hellip;
}
.site-navigation ul li {
  &hellip;
}
.site-navigation ul li a {
  &hellip;
}</code></pre>
<p>The CSS output from the Sass in this example makes the Sass easier to read, but has exactly the same results as the ordinary CSS. It unnecessarily repeats the &lt;ul&gt; and &lt;li&gt; selectors, even though it's unlikely there'll be different &lt;ul&gt;s and &lt;li&gt;s in the site navigation that requires different rules. This results in overly specific descendent selectors that can be harder to override with more CSS in the future. When nesting selectors in this way, try to avoid unnecessarily nesting selectors. The ideal Sass and CSS for this example would look something like:</p>
<pre><code>.site-navigation {
&hellip;
  ul {
    &hellip;
  }
  li {
    &hellip;
  }
  a {
    &hellip;
  }
}</code></pre>
<p>Which would result in the CSS:</p>
<pre><code>.site-navigation {
  &hellip;
}
.site-navigation ul {
  &hellip;
}
.site-navigation li {
  &hellip;
}
.site-navigation a {
  &hellip;
}</code></pre>
<h2>Nesting with Parent Selectors</h2>
<p>For this navigation, I want the selected link to stand out from the other links, to help the user understand where they are on the site:</p>
<figure id="figure-31-4"> <img src="http://webstandardssherpa.com/r/31-4.png" alt="Selected link in Web Talk Dog Walk's navigation" /> </figure>
<p>Fortunately, the nesting syntax allows you to specify a combined selector <em>within</em> the hierarchy by prefixing the nested selector with an ampersand (<code>&amp;</code>). The ampersand represents the nested rule's immediate parent, so this nested rule generates a selector combined with its parent rule rather than descending from it.</p>
<p>On Web Talk Dog Walk, the <code>.selected</code> class is added to the <code>li</code> element. So in the Sass, the <code>&amp;.selected</code> rule is nested inside the <code>li</code> selector:</p>
<pre><code>.site-navigation {
  &hellip;

  ul {
    &hellip;

    li {
      &hellip;

<mark>      &amp;.selected {
        a {
          background: $green-dark;
          color: $grey-light;
        }
      }</mark>

      a {
        &hellip;
      }
    }
  }
}</code></pre>
<p>Which compiles to:</p>
<pre><code>.site-navigation {
  &hellip;
}

.site-navigation ul {
  &hellip;
}

.site-navigation li {
  &hellip;
}

<mark>.site-navigation li.selected a {
  background: #3F5526;
  color: #f9f9f9;
}</mark>

.site-navigation li a {
  &hellip;
}</code></pre>
<h3>Nesting with Pseudo Selectors</h3>
<p>You can also use <code>&amp;</code> to include pseudo classes and elements in nested Sass:</p>
<ul>
<li><code>&amp;:hover</code></li>
<li><code>&amp;:active</code></li>
<li><code>&amp;:focus</code></li>
<li><code>&amp;:before</code></li>
<li><code>&amp;:after</code></li>
</ul>
<p>I used this approach for the hover and active states of the Web Talk Dog Walk navigation:</p>
<figure id="figure-31-5"> <img src="http://webstandardssherpa.com/r/31-5.png" alt="Hover and active styles in Web Talk Dog Walk navigation" /> </figure>
<pre><code>a {
  &hellip;

<mark>  &amp;:hover, &amp;:active {
    background: $green-bright;
    color: $green-dark;
  }</mark>
}</code></pre>
<p>Which compiles to the CSS:</p>
<pre><code>
a {
  &hellip;
}

<mark>a:hover, a:active {
  background: #97C459;
  color: #3F5526;
}</mark>
</code></pre>
<h3>Nesting and Media Queries</h3>
<p>In a narrow viewport, Web Talk Dog Walk's &ldquo;Brighton&rdquo; header text and navigation sit neatly one above the other. But when the viewport is about 530px wide, the navigation doesn't line up with the &ldquo;Brighton&rdquo; header text:</p>
<figure id="figure-31-6"> <img src="http://webstandardssherpa.com/r/31-6.png" alt="Mockup with base grid overlay" /> </figure>
<p>Media queries can change the layout depending on the width of the viewport, and Sass nesting makes writing (and reading) media queries so much easier than traditional CSS. In ordinary CSS, the media query would need to go after the base styling with a new rule for the modified styling, repeating the entire selector:</p>
<pre><code>.site-header h2 {
  margin: 0 11px;
}

@media only screen and (min-width: 530px) {
  .site-header h2 {
    margin-top: 16.5px;
  }
}</code></pre>
<p>With Sass media query nesting, the media query can be nested <em>inside</em> the selector without duplicating the entire rule, simply adding the new property and value (once again using our <code>$unit</code> variable):</p>
<pre><code>.site-header {
  h2 {
    margin: 0 $unit;

<mark>    @media only screen and (min-width: 530px) {
      margin-top: $unit*1.5;
    }</mark>
  }
}</code></pre>
<p>This compiles to:</p>
<pre><code>.site-header h2 {
  margin: 0 11px;
}

@media only screen and (min-width: 530px) {
  .site-header h2 {
    margin-top: 16.5px;
  }
}</code></pre>
<p>Sass writes out the repetative CSS we've avoided in our source file. Nesting media queries makes it much easier to make little breakpoint tweaks to different selectors. It can be less repetitive and takes up less room, too, making it far more readable.</p>
<h2>Coming in Part 3!</h2>
<p>In <a href="http://webstandardssherpa.com/reviews/getting-started-with-sass-part-3/">Part 3</a>, we're going to look at <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#mixins">mixins</a>, including using variables in mixins. To become power users of Sass, we'll understand the difference between mixins and placeholders, and how to use other people's frameworks to import useful mixins that make our development faster.</p>
				

								<section id="extra-mile">
					<h1>Going the Extra Mile</h1>
					
						<p>Unit variables can also be used on media queries, keeping the breakpoints relative to the text and margin sizes:</p>
<pre><code>@media only screen and (min-width: <strong>$unit*53</strong>) {
  &hellip;
}</code></pre>
<p>Compiles to the CSS:</p>
<pre><code>@media only screen and (min-width: <strong>583px</strong>) {
  &hellip;
}</code></pre>
					
				</section>
				
				<section id="takeaways">			
								<section id="pitfalls" class="takeaway">

					<h1>Pitfalls to Avoid</h1>

					<ul>
<li>Give your variables meaningful names so they’re easy to read, and use comments to explain what the variable&nbsp;does.</li>
<li>Don’t nest parent and child selectors where you could use a class&nbsp;instead.</li>
</ul>
				</section>
								<section id="todos" class="takeaway">

					<h1>Things to Do</h1>

					<ul>
<li>Nest your media queries to make your stylesheets easier to&nbsp;read.</li>
<li>Use color functions to tweak your colors&nbsp;slightly.</li>
</ul>
				</section>
				</section>

				

								<section id="further-reading">
					<h1>Further Reading</h1>
					<ul>
				
					
						<li class="tool">Jackie Balzer, &#8220;<a href="http://jackiebalzer.com/color">A Visual Guide to Sass &amp; Compass Color Functions</a>&#8221;, Jackie Balzer, 17 July 2014</li>
				
					
						<li class="tool">Jed Foster and Dale Sande, &#8220;<a href="http://sassmeister.com/">Sassmeister: a playground for Sass, Compass and LibSass</a>&#8221;, SassMeister, 17 July 2014</li>
				
					</ul>
				</section>
							
		]]></description>
					<link>http://webstandardssherpa.com/reviews/getting-started-with-sass-part-2</link>
			<guid>http://webstandardssherpa.com/reviews/getting-started-with-sass-part-2</guid>
			<dc:date>2014-09-16T10:00:00+00:00</dc:date>
		</item>
	
		<item>
			<title><![CDATA[Getting Started with Sass, Part 1]]></title>
			<dc:creator>Laura Kalbag</dc:creator>
			<description><![CDATA[
					
				
					<figure id="figure-30-1"> <img src="http://webstandardssherpa.com/r/30-1.jpg" alt="Web Talk Dog Walk" /> </figure>
<p><a href="http://sass-lang.com">Sass</a> is a CSS pre-processor. When you write in the Sass language, you use a compiler to convert your Sass files &ndash; usually written in the .scss file format &ndash; into CSS. Sass adds handy functions, variables and other script-like helpers that make CSS quicker to write and easier to maintain.</p>
<p>At first, I avoided Sass because it seemed to be aimed at programmers (the <a href="http://sass-lang.com/documentation/">documentation</a> was full of programming terminology). But after taking the time to learn Sass, I found it isn't all that complicated. There <strong>are</strong> fancy operations and functions that will satisfy the programmers, but there are also loads of cool things that just make writing CSS quicker and more efficient for the rest of us.</p>
<p>The other reason I didn&rsquo;t want to try Sass was the command line. I can never remember the right thing to type, and I&rsquo;m terrified I&rsquo;m going to accidentally type some &ldquo;command of death&rdquo; that wipes my computer out. Sass works using the command line, and it needs <a href="https://www.ruby-lang.org/en/">Ruby</a> installed before it can do anything. But we don't need to know anything about the command line, installing Ruby, or Ruby itself, to use Sass. Fortunately, there are GUI tools with easy-to-understand visual interfaces that make it easier to write Sass.</p>
<p>In this three-part series, I'm going to give you an introduction to Sass based on the process I followed when building the the <a href="http://webtalkdogwalk.in/brighton">Web Talk Dog Walk site</a> using Sass.</p>
<h2>Setting Up a Sass Project With Codekit</h2>
<p><a href="http://incident57.com/codekit/">CodeKit</a> is my preferred GUI tool for writing Sass and I will use it in my examples below. It compiles Sass files and is only available for Mac OSX. CodeKit is free to try, but costs around $30 to buy. If you&rsquo;re a Windows user, <a href="http://alphapixels.com/prepros/">Prepros</a> and <a href="http://mixture.io/">Mixture</a> are both similar to CodeKit in function and price, and <a href="http://koala-app.com/">Koala</a> is a free, cross-platform alternative.</p>
<figure id="figure-30-2"> <img src="http://webstandardssherpa.com/r/30-2.jpg" alt="CodeKit" /> <figcaption>Once CodeKit is installed, you can open it up to see a fairly empty-looking interface.</figcaption> </figure>
<h3>Adding a Project</h3>
<p>In order for CodeKit to compile the Sass correctly for the project, you need to add the project folder to CodeKit. When you do this, you can see all the files from our project listed in CodeKit.</p>
<figure id="figure-30-3"> <img src="http://webstandardssherpa.com/r/30-3.jpg" alt="Adding a project in CodeKit" /> <figcaption>Select &ldquo;File&rdquo; &gt; &ldquo;Add Project&rdquo;, then choose the project folder</figcaption> </figure>
<p>You don't need the HTML compiled by CodeKit, so you should hide those files. This makes it easier to see the Sass and CSS files when they're created.</p>
<figure id="figure-30-4"> <img src="http://webstandardssherpa.com/r/30-4.jpg" alt="Hiding files in CodeKit" /> <figcaption>Hold shift to select multiple files and then select &ldquo;Hide These Files&rdquo;</figcaption> </figure>
<h3>Creating a Sass Folder</h3>
<p>Next, create a folder to contain the Sass files. When the Sass files are compiled, CodeKit will create a folder called <em>/css</em> alongside the <em>/sass</em> folder which contains the compiled CSS.</p>
<figure id="figure-30-5"> <img src="http://webstandardssherpa.com/r/30-5.jpg" alt="Creating Sass folder in CodeKit" /> <figcaption>Create an empty folder called <em>/sass</em> in the project's root folder, or wherever you want your CSS to be kept</figcaption> </figure>
<h3>Creating a Sass File</h3>
<p>Once your project and folders are setup, you are ready to write Sass. First, create an empty file in the <em>/sass</em> folder and call it <em>style.scss</em>.</p>
<p>You can even change the extension of a .css file to .scss, and it would be valid Sass that CodeKit can compile. This is handy if you want to take advantage of a few Sass features in an existing CSS file.</p>
<h2>Writing and Compiling Sass in CodeKit</h2>
<p>The first thing I recommend adding to the newly-created <em>style.scss</em> file is the <a href="http://www.cssreset.com/what-is-a-css-reset/" title="What is a CSS reset?">CSS reset</a>:</p>
<pre><code>html, body, div, span, applet, object, iframe,h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code,del, dfn, em, font, img, ins, kbd, q, s, samp,small, strike, strong, sub, sup, tt, var,b, u, i, center,dl, dt, dd, ol, ul, li,fieldset, form, label, legend,table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video, svg, hr {margin: 0;padding: 0;border: 0;font-size: 100%; font: inherit; vertical-align: baseline; font-weight: normal;} &hellip;</code></pre>
<p>The reset is ordinary CSS, but that doesn't matter because a .scss file can understand both Sass and CSS, and CodeKit compiles them together. When you save <em>style.scss</em>, it will display in CodeKit's list of files:</p>
<figure id="figure-30-6"> <img src="http://webstandardssherpa.com/r/30-6.jpg" alt="List of files in CodeKit" /> <figcaption>Select the refresh icon on the bottom left to see the <em>style.scss</em> file in CodeKit</figcaption> </figure>
<p>Next, you can confirm that CodeKit is compiling as expected. Select the <em>style.scss</em> file from the list to see the path where CodeKit will compile the <em>style.css</em> file. Then, select &ldquo;Compile&rdquo; to compile the .scss file to .css:</p>
<figure id="figure-30-7"> <img src="http://webstandardssherpa.com/r/30-7.jpg" alt="Compiling in CodeKit" /> <figcaption>Select the <em>style.scss file</em> and choose &ldquo;Compile&rdquo; to compile the .scss file to .css</figcaption> </figure>
<p>You should now see a new <em>/css</em> folder in the CodeKit project your compiled CSS:</p>
<pre><code>html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video, svg, hr&nbsp;{
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  font-weight: normal; 
}
&hellip;</code></pre>
<p>A nice feature of CodeKit is once a file has been compiled the first time, you only need to save your .scss file to automatically compile CSS. This is because CodeKit is now &ldquo;watching&rdquo; your file.</p>
<p>Also, if you would prefer that your compiled CSS is minified, select &ldquo;Compressed&rdquo; from the &ldquo;Output Style&rdquo; menu:</p>
<figure id="figure-30-8"> <img src="http://webstandardssherpa.com/r/30-8.jpg" alt="Generating compressed output in CodeKit" /> </figure>
<p>Lastly, keep in mind that only the final, compiled CSS files need to be uploaded to the server. And these are referenced just like any other CSS file in the <code>head</code> of the HTML:</p>
<pre><code>&lt;link rel="stylesheet" href="css/style.css"&gt;</code></pre>
<h2>Partials</h2>
<p>Now that you know the basics for setting up a project and Sass files in CodeKit, let's focus on some of the specific benefits Sass offers, starting with file organization. Sometimes CSS can become messy and difficult to read, like the CSS reset styles above. It is far easier to maintain when the CSS can be organized in separate files.</p>
<p>Sass partials let you tidy your CSS into different files <em>without having any impact on loading</em>. With standard CSS, you can split your styles into multiple files, and link to each of them from your HTML page, or via @import in another CSS file. However every time you request a file from another location, you're creating another server request. Many server requests can make a page load very slowly, even if the files themselves are very small.</p>
<p>Partials are separate files containing chunks of CSS and/or Sass. These partials are referenced in a primary Sass file with the <code>@import</code> directive:</p>
<pre><code>@import "partial";
@import "another-partial";
@import "partial-name";</code></pre>
<p>When that primary file is compiled, all the CSS and Sass in the partials are compiled as well. The compiler pulls all of your styles into a single CSS file for the browser to download.</p>
<h3>Organizing Partials</h3>
<p>Organize your partials in a way that suits your development process. I like to follow a <a href="http://webstandardssherpa.com/reviews/think-modularly/">modular structure</a> like <a href="http://smacss.com">SMACSS</a></p>
<ul>
<li>Base HTML selectors (<em>base.scss</em>)</li>
<li>Layout styles (<em>layout.scss</em>)</li>
<li>Separate out any dependencies, such as reset styles or web fonts, into their own partials (e.g. <em>reset.scss</em>)</li>
</ul>
<p>I include these partials in my primary <em>style.scss</em> file using <code>@import</code> syntax</p>
<pre><code>@import "reset.scss";
@import "base.scss";
@import "layout.scss";</code></pre>
<p>In CodeKit, you can see the partials in the same folder as <em>style.scss</em>. However, the partials are greyed out because they&rsquo;re not compiled directly, they&rsquo;re included as part of the <em>style.scss</em> file:</p>
<figure id="figure-30-9"> <img src="http://webstandardssherpa.com/r/30-9.jpg" alt="Generating compressed output in CodeKit" /> </figure>
<p>Also, in the <em>/css</em> folder, you can see that CodeKit hasn&rsquo;t created any new CSS files for the partials because everything was compiled in the single <em>style.css</em> file:</p>
<figure id="figure-30-10"> <img src="http://webstandardssherpa.com/r/30-10.png" alt="CodeKit doesn't compile partials into their own files" /> </figure>
<h2>Variables</h2>
<p>Variables are the simplest and most instantly useful part of Sass. I use variables for repeating global values such as colors and fonts. A variable is defined with a name prefixed with a <code>$</code>, followed by a value:</p>
<pre><code>$grey-light: #f9f9f9;</code></pre>
<p>In my mockup for Web Talk Dog Walk, I have a palette of all the colors in the design:</p>
<figure id="figure-30-11"> <img src="http://webstandardssherpa.com/r/30-11.jpg" alt="Mockups for Web Talk Dog Walk" /> </figure>
<p>To define all of these colors in my Sass, I created a new partial, <em>variables.scss</em>, which contains my color variables:</p>
<pre><code>$white: #fff;

$grey-light: #f9f9f9;
$grey-mid-light: #eee;
$grey-mid: #ccc;
$grey-darker: #474747;

$green-dark: #3F5526;
$green-mid-dark: #44632B;
$green-mid: #637A3D;
$green-mid-light: #759845;
$green-bright: #97C459;
$green-light: #C0D0AA;</code></pre>
<p>These variables could have any name you want, but I try to give them sensible names so they&rsquo;re easy to remember. I also tend to group them by color and order them by shade, so it&rsquo;s easy to see which is the next lightest and the next darkest.</p>
<p>The variables can be applied to different elements in the <em>base.scss</em> file. The variable goes where the hex value would usually be:</p>
<pre><code>body {
<mark>  background: $grey-mid-light;</mark>
<mark>  color: $grey-darker;</mark>
}

h1,
h1 a {
<mark>  color: $green-bright;</mark>
}

h2 {
<mark>  color: $green-dark;</mark>
}

&hellip;</code></pre>
<p>When the Sass file is saved and compiled by CodeKit, the CSS output is:</p>
<pre><code>body {
  background: #eee;
  color: #474747;
}

h1,
h1 a {
  color: #97C459;
}

h2 {
  color: #777;
}

&hellip;</code></pre>
<p>Variables can be used in this way throughout the stylesheets, and if I suddenly decide that one of my greens isn&rsquo;t quite dark enough, I can just change the hex value of the variable, and that change will be applied throughout the style sheet.</p>
<h2>Comments</h2>
<p>Comments are an important part of writing CSS whether you're leaving notes for your team or just for your future self. They can be used as flags or headings to organize the stylesheet or to explain complicated CSS.</p>
<p>There are two types of comments you can use in Sass. Using the CSS <code>/* comment */</code> syntax at either end of the comment means the comment <strong>will</strong> show in the compiled CSS.</p>
<p>With Sass, using the <code>//</code> syntax at  the beginning of a line will mark the whole line as a comment, but the <code>//</code> comment <strong>will not</strong> show in your compiled CSS.</p>
<pre><code>/* This comment will be compiled to the final CSS */
// This comment won't be compiled to the final CSS</code></pre>
<p>For Web Talk Dog Walk, I commented the description of my Sass color variables with the <code>//</code> syntax because the variables won't show in the compiled CSS, so the comment would be irrelevant:</p>
<pre><code><mark>// Color variables</mark>

$white: #fff;

$grey-light: #f9f9f9;
$grey-mid-light: #eee;
$grey-mid: #ccc;
$grey-darker: #474747;
</code></pre>
<h2>Errors in CodeKit</h2>
<p>If there's an error in your Sass or CSS, the Sass won't compile. Fortunately, CodeKit has an error feature that takes focus from your Sass file and directs you to the error listed in the project's Log:</p>
<figure id="figure-30-12"> <img src="http://webstandardssherpa.com/r/30-12.png" alt="Syntax error in CodeKit" /> <figcaption>Syntax error: undefined variable: "$grey-dark";</figcaption> </figure>
<p>In this example, CodeKit is telling me that I haven't defined the variable <code>$grey-dark</code>. To fix the error, I simply add <code>$grey-dark</code> to my color variables and save again:</p>
<pre><code>// Color variables

$white: #fff;

$grey-light: #f9f9f9;
$grey-mid-light: #eee;
$grey-mid: #ccc;
<mark>$grey-dark: #777;</mark>
$grey-darker: #474747;
</code></pre>
<h2>Coming in Part 2!</h2>
<p>In <a href="http://webstandardssherpa.com/reviews/getting-started-with-sass-part-2/">Part 2</a>, I'll dive further into Sass variables, focusing on using math with variable operations to achieve vertical rhythm. I'll also introduce Sass's nesting syntax to make it easier to read and maintain, especially with media queries. Stay tuned!</p>
				

								<section id="extra-mile">
					<h1>Going the Extra Mile</h1>
					
						<p>Sass has a few useful <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#color_operations">color operations</a> (also known as color functions) that can help you extend your color variables. For example, if I want a brighter color than I have in my color variables I can use the <code>saturate</code> operation, rather than creating an entirely new variable.</p>
<p>This operation tells Sass to saturate the color of the h2 to 100%:</p>
<pre><code>h2 {
<mark>  color: saturate($green-dark, 100%);</mark>
}</code></pre>
<p>Which compiles to:</p>
<pre><code>h2 {
  color: #5F8516;
}</code></pre>
					
				</section>
				
				<section id="takeaways">			
								<section id="pitfalls" class="takeaway">

					<h1>Pitfalls to Avoid</h1>

					<ul>
<li>Don’t forget to check the <span class="caps">CSS</span> compiled from your Sass, particularly when you’re still learning. It can be easy to create bloated <span class="caps">CSS</span> if you don’t understand what is compiled from the Sass you’re&nbsp;writing.</li>
<li>Remember to use <code>@import</code> to include your partials in your primary Sass file. Otherwise they could be compiled, but not included in your <span class="caps">CSS</span>&nbsp;file.</li>
</ul>
				</section>
								<section id="todos" class="takeaway">

					<h1>Things to Do</h1>

					<ul>
<li>Read the Sass reference docs to find out the variety of things that are possible with Sass. Don’t be intimidated, it’s ok to start&nbsp;small.</li>
<li>Separate your stylesheets into small, modular partial files to make them easy to&nbsp;maintain.</li>
<li>Use variables to save yourself copying and pasting repetitive colors and&nbsp;units.</li>
<li>Include the partials that define your variables and mixins <em>at the top</em> of your stylesheet, because other and styles partials need these definitions for&nbsp;reference.</li>
</ul>
				</section>
				</section>

				

								<section id="further-reading">
					<h1>Further Reading</h1>
					<ul>
				
					
						<li class="tool">Sass, &#8220;<a href="http://sass-lang.com/">Sass</a>&#8221;, Sass, 17 July 2014</li>
				
					
						<li class="tool">Kaelig, &#8220;<a href="http://www.kaelig.fr/bettersassdocs/">Sass Reference</a>&#8221;, Kaelig, 17 July 2014</li>
				
					
						<li class="tool">Sass, &#8220;<a href="http://sass.io/">Sass.io</a>&#8221;, Sass, 17 July 2014</li>
				
					</ul>
				</section>
							
		]]></description>
					<link>http://webstandardssherpa.com/reviews/getting-started-with-sass-part-1</link>
			<guid>http://webstandardssherpa.com/reviews/getting-started-with-sass-part-1</guid>
			<dc:date>2014-09-02T10:00:00+00:00</dc:date>
		</item>
	
		<item>
			<title><![CDATA[Breaking the Perfectionism–Procrastination Infinite Loop]]></title>
			<dc:creator>Denise Jacobs</dc:creator>
			<description><![CDATA[
					
				
					<figure id="figure-29-1"> <img src="http://webstandardssherpa.com/r/29-1.png" alt="Breaking the Perfectionism&ndash;Procrastination Infinite Loop" /> </figure>
<blockquote>
<p>Putting it off doesn't make it go away. Getting it done does.</p>
<p>&mdash; <cite>Ned Hallowell, Driven to Distraction</cite></p>
</blockquote>
<p>You get out of the meeting with your client, full of ideas and energy about what you're going to do next. You commit to a deadline for ideas, a proposal, designs &mdash; some kind of deliverable to move the project forward. In your mind, at that moment, it's all crystal clear and you can't wait to work on it.</p>
<p>But as the date looms closer, something changes. You want it to be amazing, fantastic, <em>flawless</em>. Even though your vision is clear and your ideas solid, you keep delaying the start of the process. The excitement that you initially felt begins to feel like dread. &ldquo;I have to do more research, gather more information, find more sources of inspiration before I start so it can be <em>really</em> good. I'll get started tomorrow &mdash; I've got time,&rdquo; you tell yourself.</p>
<p>Finally, it's the day before the due date. You're now kicking yourself for putting it off and your sense of self flags along with your motivation to act. And then it's the due date. You're now not only beating yourself up for potentially messing up a big opportunity, but also panicking and stressing to pull it together by the end of the day.</p>
<p>I'd like to introduce you the twins that just wreaked havoc upon your nerves and your work: perfectionism and procrastination.</p>
<h2>Perfection Is Good?</h2>
<p>Everyone knows that procrastination is bad. But perfectionism is fine, right? Wrong. Both are fraught with difficulty, and they tend to appear together, forming an infinite loop that can destroy your productivity and your psyche.</p>
<p>Of the two, perfectionism seems to be more subtle and difficult to identify. How do you determine whether you are of the perfectionism persuasion?</p>
<ul>
<li>Perfectionists tend to <a href="http://stress.about.com/od/understandingstress/a/perfectionist.htm">focus on product to the exclusion of the process</a>, and those results better be successful.</li>
<li>Despite often being high achievers, perfectionists' feelings of satisfaction about achievement are temporary because they believe there is always more to do, be and accomplish.</li>
<li>Perfectionists are their own harshest critics, frequently berating themselves over any small things that went wrong.</li>
<li>Perfectionists tend to <a href="http://webhome.idirect.com/~readon/procrast.html">do things in fits and spurts</a>, starting off gangbusters, only to collapse in exhaustion.</li>
</ul>
<p>This unreasonable striving for perfection stems from attempts to preserve a sense of self-worth that hinges on the expectations of others. It is often referred to as "the highest form of self-abuse" because perfection simply doesn't exist. More importantly, perfection is rarely necessary in day-to-day working and living (unless you are a brain surgeon).</p>
<p>The most pernicious <a href="http://www.psychologytoday.com/blog/inside-out/201311/4-difficulties-being-perfectionist">reality of being a perfectionist</a> is that <a href="http://www.cmhc.utexas.edu/stressrecess/Level_One/perfect">perfectionists procrastinate</a>.</p>
<h2>The Procrastination Hangover</h2>
<figure id="figure-29-2"> <img src="http://webstandardssherpa.com/r/29-2.png" alt="The thinker" /> <figcaption><a href="https://www.flickr.com/photos/53611153@N00/5827849044/">The thinker</a>, courtesy of darwin Bell (CC BY-NC 2.0)</figcaption> </figure>
<p>Procrastination is often a symptom of perfectionism. Because perfectionists fear being unable to complete a task perfectly, they put it off as long as possible. This stems from the fear that <a href="http://workawesome.com/goals/perfectionism/">not meeting the goal means that there is something bad, wrong or unworthy inside of them</a>. Further, perfectionists fear that failure will invoke criticism or ridicule either from internal voices or external authorities and peers. The higher the <a href="http://www.psychologytoday.com/blog/dont-delay/200902/fear-failure">fear of failure</a> and ridicule, the more perfectionists procrastinate.</p>
<p>To clarify, procrastination is not laziness. It's more <a href="http://www.psychologytoday.com/articles/200603/getting-out-under">a misguided sense of activity</a> based on a low tolerance for frustration and failure. When people perceive a higher challenge than they feel capable of, they sidestep the discomfort through diversion. Studies reveal a cognitive aspect as well: <a href="http://www.economist.com/node/12971028">people procrastinate when they view concrete tasks in abstract terms</a>. For example, when you delay completing a task that seems like it will take a <em>really</em> long time, only to realize that it took less time to do it than to think about it repeatedly.</p>
<p>Procrastination is easy to spot: Are you doing what you want to be doing or are supposed to be doing, or are you surfing the web/reading Facebook posts/filing papers/doing laundry/running errands? If you answered yes to the latter, then you are procrastinating. While it is amusing to figure out <a href="http://20px.com/blog/2013/09/06/a-field-guide-to-procrastinators/">what form of procrastination you're engaged in</a>, it's more important to determine the cause of your procrastination.</p>
<p>There are several common causes of procrastination, including:</p>
<ul>
<li>Complicated task anxiety</li>
<li>Fear of imperfection</li>
<li>Lack of self-confidence</li>
<li>Priority confusion</li>
<li>Lack of focus</li>
<li>Indecision</li>
<li>Boredom from minutiae</li>
</ul>
<p>This can be further simplified to <a href="http://lateralaction.com/articles/reasons-for-procrastination/">three reasons why people procrastinate</a>: either they don't know <em>what</em> to do, they don't know <em>how</em> to do it, or they don't <em>enjoy</em> doing it.</p>
<h2>Why Break the Loop?</h2>
<p>Despite the negative repercussions of perfectionism and procrastination, it is a cycle people return to simply because it is what they know. But it is critical to break the loop. For one, you waste valuable time beating yourself up mentally by putting off tasks that you signed yourself up to do. And by "valuable time," I mean it in the grandest sense that you have a finite amount of time on the planet. Do you <strong>really</strong> want to look at all your friends' Facebook posts instead of writing the proposal for a potential new client?</p>
<p>Another reason to break the loop is that perfectionism (and the procrastination that results from it) is the enemy of creativity, productivity and sanity. Because perfectionists are so concerned with the outcome being just right, they are victims of <a href="http://www.huffingtonpost.com/2013/11/06/why-perfectionism-is-ruin_n_4212069.html">risk-averse thinking</a>, which inhibits innovation and creativity. Ironically, successful perfectionist-procrastinators are actually successful <em>in spite of</em> their behaviors, not because of them.</p>
<p>Finally, both perfectionism and procrastination have longer-term tolls on both mental and physical health. The dysfunctional thinking of perfectionism can be toxic, often leading to discouragement, self-doubt and mental exhaustion. Procrastination is equally damaging. Not only do procrastinators <a href="http://www.psychologytoday.com/articles/200308/procrastination-ten-things-know">squander their precious resources</a> of time, attention and focus, but the constant stress caused by procrastination eventually leads to problems like compromised immunity, digestive problems and insomnia.</p>
<h2>I Want a New Drug</h2>
<figure id="figure-29-3"> <img src="http://webstandardssherpa.com/r/29-3.png" alt="Which should I choose" /> <figcaption><a href="https://www.flickr.com/photos/buttersponge/4955768144">Which should I choose?</a>, courtesy of Tori Cat (CC BY-NC-ND 2.0)</figcaption> </figure>
<p>Because perfectionism and procrastination are products of fears gone wild in the brain, methods to break the infinite loop are bait-and-switch tactics that distract the brain from the fears long enough to focus on what needs to be done. The thinking that promotes procrastination exaggerates the scale of tasks involved, and these tricks work to shrink them back down to normal size. When you make efforts to break the cycle, you'll be shocked at how much easier the tasks are and how little time tasks actually take compared to your looming mental image of them.</p>
<h3>Shift Perceptions</h3>
<p>Here are some tips to beat perfectionism-based procrastination that stems from fears about how you will be judged or perceived by others:</p>
<ul>
<li>Get in touch with the value of what you're doing. When you find yourself back on Facebook <em>(again)</em> instead of doing something that will move you forward, take a moment to think about how the tasks ahead fit in the grand scheme of your life. <a href="http://lesswrong.com/lw/3w3/how_to_beat_procrastination/">The more meaningful the task is</a> in terms of forward movement, the less likely you will be to procrastinate.</li>
<li>Be aware of unrealistic expectations, and break your brain out of black-and-white thinking about expectations. Consider the <em>Best/Worst/Real</em> exercise: whatever tasks you feel compelled to do perfectly (and thus are procrastinating on), write down what you believe could be the Best Case Scenario, the Worst Case Scenario, and what is most likely the Realistic Scenario, which will be neutral.</li>
<li>Remember that <a href="http://www.forbes.com/sites/work-in-progress/2011/01/18/notes-from-a-recovering-perfectionist/">no one else cares and no one else matters</a>. Most people are so wrapped up with themselves that they won't notice any "slip" on your part. Let your desire to impress others go, and <a href="http://www.psychologytoday.com/blog/the-modern-time-crunch/201309/perfectionism-roadblock-productivity">decouple your performance from your sense of self-worth</a>.</li>
<li>Understand <a href="http://www.psychologytoday.com/articles/200802/pitfalls-perfectionism">the difference between excellence and perfection</a>. Excellence stems from enjoying and learning from an experience, and developing confidence from it. In stark contrast, perfection fosters negative feelings from any perceived mistakes made, regardless of the excellence of performance.</li>
</ul>
<h3>Go for Good Enough</h3>
<figure id="figure-29-4"> <img src="http://webstandardssherpa.com/r/29-4.png" alt="I'm Smart" /> <figcaption><a href="https://www.flickr.com/photos/stevendepolo/4498817330/">I'm Smart</a>, courtesy of Steven Depolo (CC BY 2.0)</figcaption> </figure>
<p>When your fears center on whether what you produce will be &ldquo;good enough,&rdquo; here are some tips to entice your brain into thinking differently:</p>
<ul>
<li><a href="http://www.pickthebrain.com/blog/grow-the-action-habit/">Don't wait for conditions to be perfect to get started</a>. Trust that you have everything that you need to get going on the task, and that you will discover any additional resources that you need once you get started.</li>
<li>Accept that it will never be perfect by &ldquo;<a href="http://99u.com/articles/21757/satisficing-how-overachievers-stay-sane-and-avoid-burn-out">satisficing</a>.&rdquo; When you satisfice, you aim for satisfactorily sufficient results and nothing more. This is especially useful if you, your team or your company struggles with the &ldquo;it has to be perfect before we launch&rdquo; attitude. Keep in mind that you have to start <em>somewhere</em>. <a href="http://blog.bufferapp.com/the-humble-beginnings-of-google-tumblr-youtube-and-more-and-what-they-can-teach-us-about-starting-small">Many ridiculously successful ventures have had humble beginnings</a>, and your project is no different. Keep the directive of <a href="http://cognition.happycog.com/article/make-do">Make. Do.</a> in mind. You can always iterate upon your creation later, but get it out the door &mdash; don't wait until it's flawless. By then, it may be too late.</li>
<li>Geek out by applying Design Thinking principles to your compulsion for perfection. With design thinking, the process is as important as the product. Instead of focusing on (and fearing "failure" around) the outcome, focus instead on the <a href="http://www.designthinkingforeducators.com/design-thinking/">five steps of design thinking</a>: discovery, interpretation, ideation, experimentation/testing and evolution/iteration.</li>
</ul>
<p>Doing any or all of the above will start to help you break perfectionistic tendencies, but these next suggestions will more directly dismantle the foundations of procrastination.</p>
<h3>Analyze your Anxiety</h3>
<p>To get to the source of your resistance to getting to the task, you may need to do some analysis. Consider two exercises that can help:</p>
<ul>
<li><a href="http://www.secretgeek.net/procrastless.asp">Action-anxiety rubric</a>:<br /> Take a sheet of paper and draw a line down the middle. In the first column, list the tasks that you are blocked on and are putting off. In the second column, write down the anxiety, concerns, worries or fears you have about doing that task. Start anywhere and write down as much as you can.</li>
<li>Task/steps &gt; Anticipated Problems:<br /> Another version of this is to list the task and the steps involved with each task, and the problems you anticipate encountering when executing the task or step.</li>
</ul>
<h3>Eliminate Distractions</h3>
<p><a href="http://lifehacker.com/5193134/beyond-life-hacks-reusable-solutions-to-common-productivity-problems">Pruning away the unnecessary</a> can mitigate the overwhelming thoughts and feelings that lead to procrastination:</p>
<ul>
<li>Clear your space of distractions, and delegate, drop and <a href="https://www.youtube.com/watch?v=a4hSbevrgag">delete</a> anything that doesn't contribute to your goals.</li>
<li><a href="http://www.psychologytoday.com/blog/the-happiness-project/201202/problem-procrastination-try-do-nothing">Sequester yourself</a>. Gather only what you need to work on the task, take yourself out of your normal work environment and go to a conference room, another office, the library, a co-working space, a friend's house &mdash; anywhere where you will not be distracted by your normal routine and people that you know.</li>
<li>Firewall technology. Use one of the <a href="http://99u.com/articles/6969/10-online-tools-for-better-attention-focus">great apps</a> or <a href="http://www.huffingtonpost.com/2012/06/07/online-filters-site-blockers_n_1578064.html">browser extensions</a> that block you from the lure of distracting websites. Turn off your phone's ringer or put it in airplane mode to block out all notifications.</li>
</ul>
<h3>Trick Your Mind</h3>
<figure id="figure-29-5"> <img src="http://webstandardssherpa.com/r/29-5.png" alt="Endless source of inspiration" /> <figcaption><a href="https://www.flickr.com/photos/32135758@N02/5325454434/">Endless source of inspiration</a>, courtesy of jinterwas (CC BY 2.0)</figcaption> </figure>
<p>If you're procrastinating because of fears of failure, you can <a href="http://www.pickthebrain.com/blog/grow-the-action-habit/">use action to cure fear</a> with some of these action-based mind tricks:</p>
<ul>
<li>Pretend you're not going to do it by &ldquo;getting ready&rdquo; to do it. Instead of writing the proposal, just get ready to write it by jotting down a few ideas. While you're at it, you might go ahead and get ready for writing it by doing a relevant web search for supporting information. And so on. Eventually, the line will blur between the getting ready for doing it, and actually doing it.</li>
<li>Practice <a href="http://99u.com/articles/7286/the-power-of-structured-procrastination">structured procrastination</a>: put the most important thing at the top of the list and other important things that need to get done under it. Even if you don't do the top thing and go to the others, you're <a href="http://chronicle.com/article/How-to-ProcrastinateStill/93959">still getting important items done</a>.</li>
<li>Another version of structured procrastination can be to leverage the power of what I like to call &ldquo;<a href="http://denisejacobs.com/talks/white-space-creativity/">white space creativity</a>&rdquo;. Good ideas often come when engaging in mindless activities like washing the dishes, gardening and organizing. The trick is to use these activities as tools for generating ideas, <em>not</em> as ways to escape tasks.</li>
</ul>
<h3>Put Time on Your Side</h3>
<figure id="figure-29-6"> <img src="http://webstandardssherpa.com/r/29-6.png" alt="Pomodoro technique" /> <figcaption><a href="http://www.flickr.com/photos/lucamascaro/4975166968/">Pomodoro technique</a>, courtesy of Luca Mascaro (CC BY-SA 2.0)</figcaption> </figure>
<p>One major contributor to procrastination is uncertainty: having a hazy sense of how long the task will take usually makes it seem larger and more involved than it turns out to be. Establishing a better sense of time can help thwart procrastination.</p>
<p>The first step is to take the seemingly insurmountable task and break it into smaller pieces or steps. The next step is determine the time of the task yourself by <a href="http://lifehacker.com/5193134/beyond-life-hacks-reusable-solutions-to-common-productivity-problems">assigning it a set time or giving yourself a quota</a>:</p>
<ul>
<li>Give yourself <a href="http://zenhabits.net/10-ways-to-give-yourself-a-procrastination-inoculation/">five minutes</a> or <a href="http://www.psychologytoday.com/articles/200603/getting-out-under">ten minutes</a> of focus. You can shoulder through anything for 5-10 minutes, right? Devoting even a small amount of focus will break the siren call of pushing it off and get you on track to completing the task.</li>
<li>Employ the <a href="http://pomodorotechnique.com/">pomodoro technique</a> or Merlin Mann's <a href="http://www.43folders.com/2005/10/11/procrastination-hack-1025">(10+2)*5 </a>. Both employ having a set amount of time with one segment being a &ldquo;sprint&rdquo; and the other a rest. Pomodoro uses 30m with 25m for the sprint, and 5m for the break. (10+2)*5 is 10m sprint, a 2m break done 5 times to equal an hour.</li>
<li>Fill a quota by running <a href="http://www.43folders.com/2005/09/08/kick-procrastinations-ass-run-a-dash">dashes</a>. Here, you can build in your own breaks, but the important part is determine your quota and stick to it. Maybe it's responding to 10 emails, or doing a 15m sprint, or working until a certain time. Determine your quota, stick with it, and reward yourself at the end.</li>
<li>A single day for a single task: schedule doing the task, and only that task, for a certain day. Put it on your calendar. Pro tip: combine this with sequestering yourself (above).</li>
</ul>
<h2>Ready, set, GO!</h2>
<p>Once you recognize a problem, you can start to solve it. While perfectionism and procrastination may have plagued you in the past, you now have the tools to create a new future &mdash; not tomorrow, but <em>today</em>.</p>
				

								<section id="extra-mile">
					<h1>Going the Extra Mile</h1>
					
						<p>Want to up the ante even more? They say it takes an entire village to raise a child, so in my mind, the same goes for helping someone break free of the tyranny of perfectionism and procrastination. <a href="http://blogs.hbr.org/2011/10/stop-procrastinatingnow/">Enlist other people</a> in your process and make yourself accountable for the task(s) by partnering up with a friend. You could also publicly enlist the support of people in your social networks. Avoid this, however, if that will lead you back into distraction temptation.</p>
					
				</section>
				
				<section id="takeaways">			
								<section id="pitfalls" class="takeaway">

					<h1>Pitfalls to Avoid</h1>

					<ul>
<li>Do not get discouraged. Remember, breaking the loop is a process. It will take time to break years of old&nbsp;habits.</li>
<li>Do not beat yourself up if and when you fall back into procrastination mode. Recognize that you are doing it and commit to trying one or more of the tips suggested in this&nbsp;article.</li>
</ul>
				</section>
								<section id="todos" class="takeaway">

					<h1>Things to Do</h1>

					<ul>
<li>Identify what the source is of your anxiety around completing the task(s) that you are putting&nbsp;off.</li>
<li>Make a commitment to become aware of the thinking that causes you to&nbsp;procrastinate.</li>
<li>Eliminate as many distractions as&nbsp;possible.</li>
<li>Put time on your side with breaking down tasks and devoting controlled amounts of time to&nbsp;them.</li>
</ul>
				</section>
				</section>

				

								<section id="further-reading">
					<h1>Further Reading</h1>
					<ul>
				
					
						<li class="book">Brene Brown, <cite>The Gifts of Imperfection: Let Go of Who You Think You&#8217;re Supposed to Be and Embrace Who You Are</cite>, Hazelden, 2010</li>
				
					
						<li class="book">Steel Piers, <cite>The Procrastination Equation: How to Stop Putting Things Off and Start Getting Stuff Done</cite>, Harper Perennial, 2010</li>
				
					
						<li class="book">Neil Fiore, <cite>The Now Habit: A Strategic Program for Overcoming Procrastination and Enjoying Guilt-Free Play</cite>, Tarcher, 2007</li>
				
					
						<li class="book">Leo Babauta, <cite>Zen To Done: The Ultimate Simple Productivity System</cite>, CreateSpace Independent Publishing Platform, 2012</li>
				
					
						<li class="book">Carol Dweck, <cite>Mindset: The New Psychology of Success</cite>, Ballantine Books, 2007</li>
				
					
						<li class="article">Denise Jacobs, &#8220;<a href="http://alistapart.com/article/banishing-your-inner-critic">Banishing Your Inner Critic</a>&#8221;, <cite>A List Apart</cite>, 20 September 2011</li>
				
					
						<li class="presentation">Denise Jacobs, &#8220;<a href="http://www.slideshare.net/denisejacobs/banish-your-inner-critic-port80">Banish Your Inner Critic</a>&#8221;, Port80 Conference, 16 May 2014</li>
				
					</ul>
				</section>
							
		]]></description>
					<link>http://webstandardssherpa.com/reviews/breaking-the-perfectionism-procrastination-infinite-loop</link>
			<guid>http://webstandardssherpa.com/reviews/breaking-the-perfectionism-procrastination-infinite-loop</guid>
			<dc:date>2014-05-20T10:00:00+00:00</dc:date>
		</item>
	
	</channel>
</rss>