<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[REC - Stapps.io]]></title><description><![CDATA[REC - Stapps.io]]></description><link>https://blog.stapps.io/</link><generator>Ghost 0.11</generator><lastBuildDate>Sat, 03 Jan 2026 23:46:35 GMT</lastBuildDate><atom:link href="https://blog.stapps.io/tag/rec/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[LiveReload with FTP]]></title><description><![CDATA[<p>LiveReload is a way to have your code changes live refresh in your browser. <br>
E.g. When you save html/template or js files, your browser will auto reload to show the new changes, while css changes are auto applied live into the design without reloading <em>- as if by</em></p>]]></description><link>https://blog.stapps.io/livereload-with-ftp/</link><guid isPermaLink="false">abbee0ac-054d-4f90-b708-7e560fc446db</guid><category><![CDATA[REC]]></category><category><![CDATA[Responsive]]></category><category><![CDATA[Design]]></category><dc:creator><![CDATA[Andrew Stilliard]]></dc:creator><pubDate>Wed, 06 Mar 2019 12:48:00 GMT</pubDate><content:encoded><![CDATA[<p>LiveReload is a way to have your code changes live refresh in your browser. <br>
E.g. When you save html/template or js files, your browser will auto reload to show the new changes, while css changes are auto applied live into the design without reloading <em>- as if by magic ;)</em>. <br>
This can even work over ftp by setting a short delay in your livereload extension.</p>

<p>Here's an example of this using <a href="https://code.visualstudio.com/">VSCode</a> (a free code editor), but should work the same in any other editor (such as Atom or Sublime - you'll need to find the relevant extensions for those editors) or if these don't work for you, you could look into a desktop app such as <a href="http://livereload.com/">http://livereload.com/</a> though those tend to be paid while the editor ones are generally free.</p>

<p>In VSCode we can find &amp; install extensions by pressing Ctrl+Shift+P and typing install and then finding the package in the list, or by clicking the extensions link on the left side menu.  <img src="https://blog.stapps.io/content/images/2019/03/vscode-ext.png" align="middle" style="display: inline-block"></p>

<p>For FTP in VSCode i'm using the SFTP extension: <br>
<a href="https://marketplace.visualstudio.com/items?itemName=liximomo.sftp">https://marketplace.visualstudio.com/items?itemName=liximomo.sftp</a></p>

<p>&amp; i've installed the LiveReload extension for VSCode too: <br>
<a href="https://marketplace.visualstudio.com/items?itemName=ziishaned.livereload">https://marketplace.visualstudio.com/items?itemName=ziishaned.livereload</a></p>

<p>Then, i'm using Chrome as my browser so I've installed the LiveReload extension for Chrome: <br>
<a href="https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei?hl=en">https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei?hl=en</a></p>

<p>With these installed I'll setup my site's livereload to have a delay. In the settings UI (Ctrl+Shift+P and type settings) search for <code>livereload.delayForUpdate</code> and enter <code>500</code>. This is a short half second delay that shouldn't be too noticeable but should also give ftp enough time to upload the file. <br>
You may later find you have to save twice if it didn't update the first time, if you run into this a lot you could try increasing this setting. <br>
Also if you want to work with sass/scss files, you'll need to add these to LiveReload's list of file extensions, find <code>livereload.exts</code> and add <code>,scss</code> after <code>css</code>. <br>
Also if you want the scss changes to work like css changes without a full page reload, for other editors there may be a setting but in vs code I forked the repo to build a version that does this for scss files too: <a href="https://github.com/stilliard/livereload-vscode/releases/tag/0.2.5">https://github.com/stilliard/livereload-vscode/releases/tag/0.2.5</a> <em>- hope to have this merged to the main extension soon.</em></p>

<p>Next I'll setup the FTP connection for my site: <br>
Ctrl+Shift+P to open the command prompt and then type SFTP and click to init. <br>
This will give you a JSON object where we can setup the FTP connection, I made a couple changes to this, the following should work:</p>

<pre><code>{
    "name": "My site",
    "host": "xxxxxx.co.uk",
    "protocol": "ftp",
    "port": 21,
    "secure": true,
    "secureOptions": {"rejectUnauthorized": false},
    "username": "xxxxxx@xxxxxx",
    "password": "xxxxxx",
    "remotePath": "/",
    "uploadOnSave": true,
    "downloadOnOpen": false,
    "ignore": [".vscode", ".git"]
}
</code></pre>

<p>In the above I've set it to ignore ssl issues so we can connect to dev sites easily, as well as <code>uploadOnSave</code> to upload when you save / ctrl+s the file and the very useful <code>downloadOnOpen</code> (disabled in above config but set to true for this to work) which helps make sure you don't override other peoples changes by having VSCode auto download the latest version of the file each time you open the file.</p>

<p>Next we need to download the latest files, again with Ctrl+Shift+P in VSCode we can type Sync and select SFTP: Sync Remove -> Local, this will download all files over ftp to your machine. </p>

<p>Now we can test this out, first let's make sure FTP uploading on save is working. Try editing a file &amp; check it uploaded. </p>

<p>If that all worked, let's now enable live reload. First we enable this in our editor (Ctrl+Shift+P and type in LiveReload and click to enable), then in Chrome, click the reload icon &amp; the small circle in the middle should turn to a solid dot.</p>

<p>Then back in your editor, try editing a file &amp; click save and watch it refresh in your browser. Best is when you edit a CSS file as it wont even reload the page, but the change should suddenly appear, I tend to test that by making something's background color red or similar. <br>
If you have any trouble with this let me know either leave a comment below or feel free to contact me directly. </p>

<p>Lastly, with all this working, I always take a minute to quickly commit to version control. If you haven't used it before it's a great life saver. </p>

<p>Version control systems such as <code>git</code> allow you to keep revisions of your code and even back them up to a remote private location like GitHub or BitBucket. <br>
Using your terminal, if you already have git installed, it's as easy to commit this to version control by first <code>cd</code>'ing into the folder you're working in &amp; then run <code>git init</code> to start git (only needed once in the project), then to add the files, we'll add all this time to get started: <code>git add .</code> and then we can commit this by saying <code>git commit -m 'Initial commit'</code></p>

<p>There's plenty tutorials for git online &amp; on YouTube, worth checking one out. Here's a great guide I stumbled across recently that helps simplify it: <a href="http://rogerdudler.github.io/git-guide/">http://rogerdudler.github.io/git-guide/</a></p>

<p>Thanks for reading &amp; hope this helps you build awesome sites.</p>]]></content:encoded></item><item><title><![CDATA[Mega menus in REC]]></title><description><![CDATA[<p>REC's default menu is simple by design, allowing you to customise it without need to change many declarations &amp; It's also designed to work for the most common use cases as well as to scale well from small/mobile screens up to desktop. </p>

<p>But sometimes you might need something more</p>]]></description><link>https://blog.stapps.io/mega-menus-in-rec/</link><guid isPermaLink="false">f4201748-3bce-4cce-9a62-591ad15fa233</guid><category><![CDATA[REC]]></category><category><![CDATA[Responsive]]></category><dc:creator><![CDATA[Andrew Stilliard]]></dc:creator><pubDate>Thu, 20 Dec 2018 11:38:55 GMT</pubDate><content:encoded><![CDATA[<p>REC's default menu is simple by design, allowing you to customise it without need to change many declarations &amp; It's also designed to work for the most common use cases as well as to scale well from small/mobile screens up to desktop. </p>

<p>But sometimes you might need something more advanced, like a mega menu. </p>

<p>Luckily, REC's menu can be easily switched out and replaced by changing our nav.css file and nav.js files which handle the navigation design, and optionally you can replace the menu.html.twig file that renders the html for the menu, which is brought in on both the header.html.twig file and footer.html.twig files by default though you can easily style differences between these 2 menus.</p>

<p>Mega menus offer users a more interactive experience and require more thought than simple menus. Not all sites would require a mega menu and doing so on some sites might even get in the way of the sites UX.</p>

<p>In terms of mega menu designs available, a great collection of ideas are available here: <br>
<a href="http://freefrontend.com/css-mega-menu/">http://freefrontend.com/css-mega-menu/</a></p>

<p>We've taken the <a href="https://github.com/marioloncarek/megamenu-js">megamenu.js</a> example from this and setup a test site for it: <a href="http://www.mega-menu.recds12.co.uk/">http://www.mega-menu.recds12.co.uk/</a> <br>
<em>- Here you can see the mega menu in action working within a standard REC instance.</em></p>

<p><a href="http://www.mega-menu.recds12.co.uk/"><img src="https://blog.stapps.io/content/images/2018/12/mega-menu-rec-1.png" alt="" title=""></a></p>

<p>The code and instructions to create this are available here: <a href="https://github.com/ReallyEasyCart/responsive-snippets/tree/master/mega-menu">https://github.com/ReallyEasyCart/responsive-snippets/tree/master/mega-menu</a></p>

<p>This demo shows using the menu to replace both as a mega menu &amp; with a simple dropdown version. </p>

<p>Inside the mega menu, we've leveraged content blocks to bring in those images. Check out the <a href="https://github.com/ReallyEasyCart/responsive-snippets/tree/master/mega-menu">README on GitHub</a> for more info on how this works.</p>]]></content:encoded></item><item><title><![CDATA[REC Template inheritance & shadow files]]></title><description><![CDATA[<p>When REC moved to a responsive template, we also introduced the new concept of template inheritance &amp; shadow files. <br>
Template inheritance might not be new if you've worked with other systems templates such as Wordpress or Magento. You can think of it in REC similar to how Wordpress and others</p>]]></description><link>https://blog.stapps.io/template-inheritance/</link><guid isPermaLink="false">ebce113e-30b6-439a-a07d-e2557745628d</guid><category><![CDATA[REC]]></category><category><![CDATA[Design]]></category><dc:creator><![CDATA[Andrew Stilliard]]></dc:creator><pubDate>Mon, 26 Feb 2018 20:00:00 GMT</pubDate><content:encoded><![CDATA[<p>When REC moved to a responsive template, we also introduced the new concept of template inheritance &amp; shadow files. <br>
Template inheritance might not be new if you've worked with other systems templates such as Wordpress or Magento. You can think of it in REC similar to how Wordpress and others have parent &amp; child templates.</p>

<h2 id="howdoesitwork">How does it work?</h2>

<p>At REC we provide base parent templates that get upgraded over time with new features and content. This also provides a base 960 and responsive template. <br>
Then you can override the files from this template in the site template folders. <br>
Files at the same location in a child template will override those in the parent template. <br>
That's pretty much it. <br>
You can do some more fancy things in the html twig files by extending specific blocks of a page. (I'll come back to this later). Bus aside from this, template inheritance for us is, here's a base template. You have site templates that are child templates of those base parent templates. But you can also make you own child templates off of the the other child templates. This allows you to layer a sites themes. E.g. some sites may have a Halloween or Christmas theme that just changes a couple files and adds some css. In this case, responsive-base is the parent theme to the child-responsive site which is the current active theme. But when Christmas rolls around, the Christmas theme is switched on, and it is a child theme of the responsive-site theme. </p>

<h2 id="sowhatareshadowfiles">So what are shadow files?</h2>

<p>Now you know ow the inheritance works with child files overriding the parent ones. You also know that a child folder will only have the files that are overriding the parent inside. </p>

<p>However, wouldn't it be great if you could see the folder structure how the system does? That's where shadow files come in. <br>
When showing the template folders and files for the current template, in admin we also show the parents files where the file is not overridden. These are shadow files. They are shadows of where the real file would be from the parent template. <br>
Via admin you can click to view or extend this file into the child template to work with. </p>

<h2 id="whynotoverridethemall">Why not override them all?</h2>

<p>When we push updates in REC we sometimes make changes to the base template files. We try to avoid anything major to keep your live sites from changing, but we'll happily add new functionality or fix. <br>
When you override the file, you loose these updates to that file. In most cases that's fine as your site is staying in the state it was and you can always get a diff of what has changed and apply changes if wanted. But if you're not making any changes to the file, you might as well leave the file not extended and then get automatic new features &amp; fixes applied.</p>]]></content:encoded></item><item><title><![CDATA[The importance of obscuring email addresses on websites]]></title><description><![CDATA[<p><code>mailto:email@address.com</code> links in sites are pretty common place, but having this in the source code of the site means that email is going to get soo much extra spam.</p>

<p>This is not a new topic btw, it's one since the dawn of time <em>- internet time</em>.</p>

<h2 id="whywillthisleadtospamrobotsthatswhy">"Why</h2>]]></description><link>https://blog.stapps.io/the-importance-of-obscuring-email-addresses-on-websites/</link><guid isPermaLink="false">db5667fb-1fd1-4f04-a8e0-70f19a1e19ce</guid><category><![CDATA[Design]]></category><category><![CDATA[Development]]></category><category><![CDATA[REC]]></category><dc:creator><![CDATA[Andrew Stilliard]]></dc:creator><pubDate>Wed, 15 Jun 2016 16:52:48 GMT</pubDate><content:encoded><![CDATA[<p><code>mailto:email@address.com</code> links in sites are pretty common place, but having this in the source code of the site means that email is going to get soo much extra spam.</p>

<p>This is not a new topic btw, it's one since the dawn of time <em>- internet time</em>.</p>

<h2 id="whywillthisleadtospamrobotsthatswhy">"Why will this lead to spam?" Robots, that's why.</h2>

<p>Robots as we call them, or crawlers, or harvesters, or just scripts can be coded to search round the internet and gather email addresses from sites. </p>

<p>Sometimes it's just for the sake of gathering random emails, while other times they can be looking for sites in specific industries etc. </p>

<p><img src="https://blog.stapps.io/content/images/2016/06/robots-everywhere-meme.jpg" alt="Robots, robots everywhere."></p>

<p>You might be thinking this doesn't happen much, but likely it's happening right now on your site... and again... and again. Many people are running these automated crawlers, and why, because it's easy to do and they can profit from it. </p>

<h2 id="howeasyisit">"How easy is it?"</h2>

<p>Here's a quick bash script I wrote in about 5 minutes and it's far from perfect. It searches google.co.uk for "web designers" using curl and returns the first 100 results. Then it uses a combination of grep and awk find all the sites returned. Then it uses xargs to execute curl again to request each site and grep to look for any email addresses. At the end it prints out all the email addresses it's found. <br>
Go ahead, try this in your terminal now: <em>(Tested on mac &amp; linux/ubuntu)</em></p>

<pre><code class="language-bash">curl -s "https://www.google.co.uk/search?q=web+designers&amp;num=100" --user-agent "Chrome" \  
    | grep -oE '&lt;a href="\/url\?q=(https?:\/\/.*?\/)' \
    | awk -F'=|&amp;' '{print $3}' \
    | xargs -L 1 bash -c '\
        curl -s $0 --user-agent "Chrome" \
        | grep -oE "\b[A-Za-z0-9._%+-]+(@|\[at\])[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" ' \
    | uniq
</code></pre>

<p><em>That 2nd to last line matching the email addresses comes from <a href="http://www.shellhacks.com/en/RegEx-Find-Email-Addresses-in-a-File-using-Grep">Shell Hacks</a> btw.</em></p>

<p>For ease of copying here it is as a single line:  </p>

<pre><code class="language-bash">curl -s "https://www.google.co.uk/search?q=web+designers&amp;num=100" --user-agent "Chrome" | grep -oE '&lt;a href="\/url\?q=(https?:\/\/.*?\/)' | awk -F'=|&amp;' '{print $3}' | xargs -L 1 bash -c 'curl -s $0 --user-agent "Chrome" | grep -oE "\b[A-Za-z0-9._%+-]+(@|\[at\])[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" ' | uniq  
</code></pre>

<p>As I said this isn't perfect by far, but it shows how quick you can knock up a script to do this type of thing. <br>
At the time this was built this gave me 54 email addresses.</p>

<p>Many crawlers out are often more detailed in the way they request sites, crawl their pages and the way they search for email addresses. The above script may not work in a month or so. But that's fine as I wrote it to prove it works now. </p>

<h2 id="okigetithowdoifixthis">"Ok, I get it, how do i fix this?"</h2>

<p>If you want to help save your clients email spam boxes a bit then you're going to want to make the job a little harder for these robots. </p>

<p>Email obfuscation is a technique of encoding the email so it's not clearly shown in the source, but instead it's shown as html entities which the browser decodes or it's added through the use of javascript on to the page. </p>

<p>Some systems may come with simple ways to obscure email addresses.</p>

<p><strong>Working in Wordpress?</strong> <br>
You can use <code>&lt;?php echo antispambot('email@address.com'); ?&gt;</code> <br>
Ref: <a href="https://codex.wordpress.org/Function_Reference/antispambot">https://codex.wordpress.org/Function_Reference/antispambot</a></p>

<p><strong>Working in <a href="http://www.reallyeasycart.co.uk/">REC</a>?</strong> <br>
You can use <code>{{ "email@address.com" | safe_email }}</code></p>

<p>Other systems often have similar techniques or plugins to help. </p>

<p>In fact some CDN services such as <a href="https://support.cloudflare.com/hc/en-us/articles/200170016-What-is-Email-Address-Obfuscation-">Cloudflare</a> offer this as a setting enabled by default. </p>

<p>But if you're looking for a manual way to do this, there's plenty tools out there to help. <br>
Here's a few that seem good:</p>

<ul>
<li><a href="http://andrew.hedges.name/experiments/obfuscator/">Online Email Obfuscator - Encodes an email to html entities</a></li>
<li><a href="http://www.email-obfuscator.com/">Email Obfuscator - Encodes the email with javascript</a></li>
</ul>]]></content:encoded></item><item><title><![CDATA[REC Procedure for changes to an existing site]]></title><description><![CDATA[<p>Unlike a new site, making changes to an existing site doesn't require a full "go live" procedure as such, but that doesn't mean it doesn't have any process. <br>
It's just as important it goes smoothly, in fact it's more so as it's affecting a live site that the company depends</p>]]></description><link>https://blog.stapps.io/rec-proceedure-for-changes-to-an-existing-site/</link><guid isPermaLink="false">830a8e17-627f-472e-81e1-6e47dfd424bf</guid><category><![CDATA[REC]]></category><category><![CDATA[Design]]></category><category><![CDATA[Development]]></category><category><![CDATA[Testing]]></category><dc:creator><![CDATA[Andrew Stilliard]]></dc:creator><pubDate>Fri, 10 Jun 2016 08:44:50 GMT</pubDate><content:encoded><![CDATA[<p>Unlike a new site, making changes to an existing site doesn't require a full "go live" procedure as such, but that doesn't mean it doesn't have any process. <br>
It's just as important it goes smoothly, in fact it's more so as it's affecting a live site that the company depends on it. <br>
You need to be sure your changes won't lead to any loss of leads or sales the site may bring, especially if the client didn't sign off on it.</p>

<p>Here's a straight forward process cycle you can follow that's worked for me.</p>

<p><img src="https://blog.stapps.io/content/images/2016/06/agile-process.png" alt="Agile Process"></p>

<p>The flow here starts with the idea and ends only when the client has signed off on the project. Everything in between is a loop of design &amp; development shortly followed by testing &amp; feedback from the client. The more you work in iterations this way, the better you'll get at working out good logical places to break each sprint. You can even plan them in advance. <br>
You'll want to strike a balance between keeping the client updated and getting their feedback, but avoiding showing the client much broken / unfinished code. <br>
Generally the faster you get feedback though, the easier the process will be later on. </p>

<h2 id="ideastage">Idea stage</h2>

<ul>
<li>Before starting changes, engage with the client and review the brief of exactly what is needed. This is important to make sure you know what they are looking for. Sketches and simple mockups are very useful here to assure the client and yourself that you are both on the same page. </li>
<li>Is the site fully responsive? Or does it have a mobile only view? Make sure consideration to this is given in any mockups and estimates for the work.</li>
</ul>

<h2 id="firstiteration">First iteration</h2>

<p>Depending on the changes, the first iteration may be designing a mockup. Following the above image you would design the mockup and then contact the client for feedback. This could then go through several iterations before moving into development. </p>

<h2 id="followingiterations">Following iterations</h2>

<p>Each following iteration involves a sprint of work followed shortly by a review by the client. These are not formal reviews, more to keep the client informed that work is happening. It's also useful as clients often change their minds or can only work out what they truly want when they see it. This way you'll find out quickly if you're going the wrong way.</p>

<p>I wont intrude much into your design / development process here, I have <a href="https://blog.stapps.io/css-structure-anti-patterns-part1/">another post that does this already</a>, but make sure you're regularly involving the client for feedback.</p>

<h2 id="tipswhiledeveloping">Tips while developing</h2>

<ul>
<li>Try not to copy content directly from legacy templates into responsive, but instead apply a fresh design over the responsive-site. <br>
E.g. if this is a responsive redesign it's tempting to copy say a product page template file from legacy, but this likely wont work. Instead use the existing design as a mockup, you can reuse imagery but coding new css and additional html structure will be less work than you'd think.  </li>
<li>Keep track of new features you've added, you'll want this for testing later, and for your support documentation.</li>
</ul>

<h2 id="testing">Testing</h2>

<ul>
<li>Browser test main site + special new features that the client may have requested!</li>
<li>Google Analytics > Check browsers bringing in most visitors &amp; enquiries or orders. 
<strong><a href="https://blog.stapps.io/modern-browser-testing/">Check out my other post on Modern web design</a>.</strong></li>
</ul>

<h3 id="thingstolookoutforespeciallywhiletesting">Things to look out for especially while testing:</h3>

<ul>
<li>Check your site's performance and mobile friendliness with <a href="https://testmysite.thinkwithgoogle.com/">Google's new tool</a>.</li>
<li>Do the changes affect ecommerce? E.g. a responsive redesign? or changes to products etc. You'll need to test the full cart process: finding a product on the site, add to cart, registration, checkout page, payment processor (no need to pay, but at least get it into paypal or wherever to check the order values) and thanks page, this will help you spot anything weird or broken. Best to do so with the browser console</li>
<li>Any specific custom functionality already on the site? Such as a custom app. Make sure this is still working, or brought through into the new design. </li>
</ul>

<h3 id="gettingusefulfeedback">Getting useful feedback</h3>

<p>Try to make sure the client actually looks at the design of all changed pages. Sometimes they can just load the homepage up and that's all, later after release they then may complain that other things are not right. It's also easy for them to miss stuff too :). <br>
Set expectations during early iterations about exactly what functionality is loaded up and therefore for review. <br>
Get their feedback, make any changes, re-browser test the changes, etc. repeat! You can send them a link to a dev site if that's where you're working, or a preview link if working on the live site but in a different template folder. </p>

<h2 id="release">Release</h2>

<ul>
<li>Get written proof of client sign off on entire site before making it live.</li>
<li>Finally you're ready to go live, but wait it's Friday, DONT! DON’T DO IT! NOPE NOPE NOPE.
<img src="https://blog.stapps.io/content/images/2016/06/Nope-Meme-04.jpg" alt=""></li>
</ul>

<h3 id="relatedarticles">Related articles</h3>

<p>If you're interested in a more in-depth look at workflow and processes, I recommend Redesign the Web - The Smashing Book #3, chapter 10 is on workflow redesigned and really worth a read.  </p>

<ul>
<li><a href="https://blog.stapps.io/modern-browser-testing/">Modern web design</a></li>
<li><a href="https://blog.stapps.io/css-structure-anti-patterns-part1/">CSS structure &amp; anti patterns</a></li>
</ul>]]></content:encoded></item><item><title><![CDATA[Browser Support vs Testing]]></title><description><![CDATA[<p>To me there's a difference between these 2 topics, let me explain: </p>

<p><strong>Browser support</strong> is browsers you're willing to support. </p>

<p>While <strong>browser testing</strong> is the act of testing and maintaining support. </p>

<p>Browser testing need not involve testing the full browser support list. In fact I find a graded view browser</p>]]></description><link>https://blog.stapps.io/browser-support-vs-testing/</link><guid isPermaLink="false">20bd1c98-f7c0-40b0-8bc3-951a69c439dd</guid><category><![CDATA[Testing]]></category><category><![CDATA[Design]]></category><category><![CDATA[REC]]></category><category><![CDATA[Support]]></category><dc:creator><![CDATA[Andrew Stilliard]]></dc:creator><pubDate>Thu, 09 Jun 2016 10:11:43 GMT</pubDate><content:encoded><![CDATA[<p>To me there's a difference between these 2 topics, let me explain: </p>

<p><strong>Browser support</strong> is browsers you're willing to support. </p>

<p>While <strong>browser testing</strong> is the act of testing and maintaining support. </p>

<p>Browser testing need not involve testing the full browser support list. In fact I find a graded view browser support makes this a bit clearer. <br>
Testing every combination would take far too long and the client likely wont be paying for that extra time. </p>

<h3 id="butwhyisthisimportant">But why is this important?</h3>

<p>When a client calls you up and says:  </p>

<blockquote>
  <p>"There's a bug on OSX Firefox 23, why wasn't this picked up during browser testing?!"</p>
</blockquote>

<p>You'll need to let them know the difference to explain clearly to the client why this was likely untested but assumed working <em>(which is perfectly acceptable)</em>. </p>

<p>Eloquently put back to the client:  </p>

<blockquote>
  <p>"It is not practical to test every combination of Browser, version and OS as there are so many.
  Instead we follow standard industry practice of testing the latest range of browsers, plus typically those which make up the majority of your traffic and sales. " </p>
</blockquote>

<p>Depending on the browser support level, It's an a A or B grade browser, this would generally followed by:  </p>

<blockquote>
  <p>"We'll take a look into this right away for you." </p>
</blockquote>

<p>However in the case of a C grade browser, you would need to work out if this is a style tweak or core functionality. </p>

<blockquote>
  <p>"Unfortunately this is an older browser where fixing it can lead to complications. The cost of working on these older browsers is often not worth the return. If you'd still like us to work on it we can but we will need to quote for the time involved."</p>
</blockquote>

<p>You could also then offer a service to the client of checking and testing the current highest converting traffic browsers. This could even be an ongoing / regular process you could offer. </p>

<hr>

<h3 id="gradedsupport">Graded support</h3>

<p>Inspired by <a href="https://github.com/yui/yui3/wiki/Graded-Browser-Support">Yahoo</a>, we use A, B and C grades for our browser support, here's an example of this:</p>

<p><strong>"A" grade support</strong> <br>
These browsers should be actively tested on, along side browsers that bring in higher amounts of traffic and sales on the site:</p>

<ul>
<li>Google Chrome Desktop ~ latest</li>
<li>Google Chrome Mobile (Android) ~ latest</li>
<li>Firefox Desktop ~ latest</li>
<li>EDGE Desktop ~ latest</li>
<li>IE 11 Desktop</li>
<li>IE Mobile 11 (Windows Phone)</li>
<li>Safari Desktop (Mac OSX) ~ Latest</li>
<li>Safari Mobile (IOS / iPhone / iPad) ~ Latest</li>
</ul>

<p><strong>"B" grade support</strong> <br>
Though not actively tested on, these browsers should work fine, and bugs can be fixed when reported:</p>

<ul>
<li>Google Chrome ~ previous recent versions</li>
<li>Firefox ~ previous recent versions</li>
<li>IE 10</li>
<li>Opera ~ any modern version</li>
<li>Android browser version 4+</li>
<li>Mobile versions of the above browsers in recent versions, such as on IOS, Android and Windows Phone</li>
</ul>

<p><strong>"C" grade support</strong> <br>
Core functional support only. These browsers may not offer all the same effects and may visually look different, however any issues that cause functional issues will be fixed, such as an issue that hides or makes it impossible to click a call to action button.</p>

<ul>
<li>IE 8 &amp; 9</li>
<li>Older browser versions than mentioned. </li>
</ul>

<h3 id="relatedposts">Related posts</h3>

<ul>
<li><a href="https://blog.stapps.io/modern-browser-testing/">Modern browser testing</a></li>
<li><a href="https://blog.stapps.io/reading-list-for-modern-web-design/">Reading list for modern web design</a></li>
<li><a href="https://blog.stapps.io/css-structure-anti-patterns-part1/">CSS structure &amp; anti patterns</a></li>
</ul>]]></content:encoded></item><item><title><![CDATA[CSS structure & anti patterns (Part 2)]]></title><description><![CDATA[<p>This Is Part 2, you may want to read <strong><a href="https://blog.stapps.io/css-structure-anti-patterns-part1">Part 1 on CSS anti patterns first</a></strong></p>

<h2 id="howtostructureyourcss">How to structure your css.</h2>

<p>This is not to say this is the perfect way to work. But it's the way I've been working for years and has really helped me. Inspired by others</p>]]></description><link>https://blog.stapps.io/css-structure-anti-patterns-part2/</link><guid isPermaLink="false">c2077e88-beff-4ba3-a8ee-245a055fee7a</guid><category><![CDATA[CSS]]></category><category><![CDATA[Design]]></category><category><![CDATA[REC]]></category><category><![CDATA[Responsive]]></category><category><![CDATA[patterns]]></category><dc:creator><![CDATA[Andrew Stilliard]]></dc:creator><pubDate>Wed, 08 Jun 2016 15:07:19 GMT</pubDate><content:encoded><![CDATA[<p>This Is Part 2, you may want to read <strong><a href="https://blog.stapps.io/css-structure-anti-patterns-part1">Part 1 on CSS anti patterns first</a></strong></p>

<h2 id="howtostructureyourcss">How to structure your css.</h2>

<p>This is not to say this is the perfect way to work. But it's the way I've been working for years and has really helped me. Inspired by others and by the book <a href="https://smacss.com/">SMACSS</a>.</p>

<h3 id="thinkinginmodules">Thinking in modules.</h3>

<p>Modular design for me means to separate logical pieces of code for maintainability and reuse. </p>

<p>If everything you do is in one big file, no comments or anything separating parts, all code is very specific and cannot be easily re-used, then it'll be difficult to maintain. </p>

<p>Working in modules you'll find you work faster and more precisely: you'll become a ninja at making quick changes for the client and the client will love you, or at least you'll be happier with your own code. </p>

<h3 id="exampletime">Example time:</h3>

<p>Here's some CSS maybe you've written before. Some text node colors, some buttons have a fancy style (I'll call that fancy-button for later), some text content areas with minor changes between them and a couple minor tweaks on a larger screen. </p>

<p><em>This will be a long code example but feel free to comment if you have any questions about it</em>/</p>

<p>Original code / what not to do:</p>

<p><strong># File: site.css</strong></p>

<pre><code class="language-css">h1 { color: #444444; }  
h2 { color: #444444; }  
h3 { color: #444444; }  
p { color: #000000; }

.header-search .button {
    background: orange;
    color: #FFF;
    padding: 1em;
}
.sidebar-filter #submit-button {
    background: orange;
    color: #FFF;
font-size: 20px;  
    padding: 1em;
}
#contact-form-button {
    padding: 1em;
}
.home-page-content {
  padding: 1em;
  *padding: 15px;
  border-top: 5px solid red;
}
.home-page-content h1 {
   color: red;
}
.about-page-content {
  padding: 1em;
  *padding: 15px;
 border-top: 5px solid blue;
}
.about-page-content h1{
color: blue;  
}

@media screen and (min-width: 35.5em) {
  h1, h2, h3 {
    border-bottom: 1px solid #CCC;
  }
  .home-page-content {
    margin: 0 1em;
  }
  .about-page-content {
    margin: 0 1em;
  }
}
</code></pre>

<p>To me, you can work with it, but it's not ideal, and as that grows it will get unmanageable. Lets separate it out to more modular files: <em>(The following files would be included/imported into your site.css file)</em> <br>
I'll comment above each part with the file name, and then under it will be notes on what changed and why its better. </p>

<p><strong># File: base.css</strong></p>

<pre><code class="language-css">/* ===== Base styles for site ===== */

/* --- main font colors --- */
h1,  
h2,  
h3 {  
    color: #444;
}
p {  
    color: #000;
}

/* --- default button style --- */
button,  
input[type="button"],  
input[type="submit"],  
.button {
    padding: 1em;
}

/* first breakpoint */
@media screen and (min-width: 35.5em) {
    h1,
    h2,
    h3 {
        /* add a clean border under headings */
        border-bottom: 1px solid #CCC;
    }
}
</code></pre>

<p>The above shows base styles for making the page, e.g. fonts, button styles etc.. <br>
Separating out the base styles like this helps you quickly find default style applied to all elements. It should be fairly simple, anything more complex should be it's own module or layout file. </p>

<p><strong># File: modules/fancy-button.css</strong></p>

<pre><code class="language-css ">/* ===== fancier designed buttons ===== */

.fancy-button {
    background: orange;
    color: #FFF;
}

/* --- fancy button mods --- */

/* larger text version (could be abstracted further) */
.fancy-button-large {
    font-size: 160%;
}
</code></pre>

<p>This module for the fancy-buttons assumes you have access to change the HTML, if that's not the case you could make the same module file, but instead of <code>.fancy-button</code> and <code>.fancy-button-large</code> you can comma separate the selectors like so:  </p>

<pre><code class="language-css ">/* ===== fancier designed buttons ===== */

.header-search .button,
#submit-button {
    background: orange;
    color: #FFF;
}

/* --- fancy button mods --- */

/* larger text version (could be abstracted further) */
#contact-form-button {
    font-size: 160%;
}
</code></pre>

<p>This keeps it modular in it's design, it's only the name of the selectors used that isn't as organised so that's still awesome. </p>

<p><em>Also notice <code>.sidebar-filter #submit-button</code> has been changed to <code>#submit-button</code> as an ID should be unique and the class prefix is therefore redundant.</em></p>

<p><strong># File: modules/page-content.css</strong></p>

<pre><code class="language-css ">/* ===== Page content areas styling ===== */

.page-content {
    border-top: 5px solid;
    padding: 1em;
    *padding: 15px; /* slight IE hack needed to account for a margin bug */
}

@media screen and (min-width: 35.5em) {
    .page-content {
        /* space out the content a bit when available */
        margin: 1em;
    }
}
</code></pre>

<p>This offers a generic module for page content, which could quickly be applied to all pages without need for copy and paste. As the design grows, this would be much more important. </p>

<p><strong># File: pages.css</strong></p>

<pre><code class="language-css ">/* ===== Specific page mods ===== */

/* --- home page (red theme) --- */

.home-page-content {
    border-top-color: red;
}
.home-page-content h1 {
    color: red;
}

/* --- about page (blue theme) --- */

.about-page-content {
    border-top-color: blue;
}
.about-page-content h1{
    color: blue;
}
</code></pre>

<p>This layout file for specific pages offers per page differences, which are now very minor and get down to exactly what is different, making maintaining and debugging much easier. </p>

<p>Once you've written your code like this, go back over and review it. Spending a little time re-reading, improving and re-factoring your own code is worth it. You'll learn more about the way you write code, patterns you could reuse. <br>
Using dev tools, you can look over some of your code too, specifically you can inspect the elements you've been working on and view the style tab. Here if you see that code is being overridden a lot of the time with large amounts crossed out then you could probably re-write the code, or re-think the way that element works and the css modules you have selectors to it. </p>

<p>Check out these resources on truly making your css skills awesome!</p>

<ul>
<li><a href="https://smacss.com/book/">https://smacss.com/book/</a></li>
<li><a href="http://maintainablecss.com/">http://maintainablecss.com/</a></li>
</ul>

<p>Also I've previously wrote about a <a href="https://blog.stapps.io/reading-list-for-modern-web-design/">reading list for modern web design</a>.</p>

<h3 id="somebestpracticestotakeaway">Some best practices to take away.</h3>

<ul>
<li>Think in modules.</li>
<li>Take pride in your code, format it well.</li>
<li>Understand what your code does and why and avoid magic.</li>
<li>Use comments and files to organise code and additional comments to explain why some things are needed.</li>
<li>Avoid specific browser hacks.</li>
</ul>

<p>My closing comment is: invest in your knowledge now, your future self will thank you. </p>

<p>If you have any questions? Or found a bug ;), please leave me a comment and I'll try to reply as quick as I can. </p>]]></content:encoded></item><item><title><![CDATA[CSS structure & anti patterns (Part 1)]]></title><description><![CDATA[<blockquote>
  <p>"CSS is quick to learn, but takes years to master". <br>
  - Not sure where I first read this but it's still true today. </p>
</blockquote>

<p>It's difficult to give years of experience as training. People expect designers to know things after a day of training that you'd normally learn with months or</p>]]></description><link>https://blog.stapps.io/css-structure-anti-patterns-part1/</link><guid isPermaLink="false">500dcc73-448f-4c96-85cc-d3cb3a22eca8</guid><category><![CDATA[CSS]]></category><category><![CDATA[Design]]></category><category><![CDATA[REC]]></category><category><![CDATA[Responsive]]></category><category><![CDATA[patterns]]></category><dc:creator><![CDATA[Andrew Stilliard]]></dc:creator><pubDate>Wed, 08 Jun 2016 15:06:45 GMT</pubDate><content:encoded><![CDATA[<blockquote>
  <p>"CSS is quick to learn, but takes years to master". <br>
  - Not sure where I first read this but it's still true today. </p>
</blockquote>

<p>It's difficult to give years of experience as training. People expect designers to know things after a day of training that you'd normally learn with months or years of experience. Some patterns I'll talk about in this post only reveal themselves as bad decisions later on. The best I can do is show you mistakes I've made, and other designers have made. Hopefully you can learn from where we went wrong ;). </p>

<h2 id="antipatterns">Anti-patterns.</h2>

<p><a href="https://en.wikipedia.org/wiki/Anti-pattern">Anti-patterns explained</a>: What not to do and why. <br>
<em>Found something controversial? Leave me a comment and we can discuss it further :).</em></p>

<h3 id="1avoidseparatingstylesforthesamethings">1. Avoid separating styles for the same things.</h3>

<p>A case of this I've seen before is separating into different device groups, e.g. mobile.css, tablet.css, desktop.css. <br>
Similar used to be done on sites with a ie7.css file etc. </p>

<p>On the face of it, it sounds like a good idea. Everything is separated out, but it's separated in the wrong way and ultimately it's a naive approach.  It often encourages duplication because the blocks of style are separated. This makes it difficult to track down specific styles for an element as they then span multiple files, which often ends in code being copied for each file as it's forgotten it's already set and inherited.  </p>

<p>Instead my advice is to build specific module css files, we'll come back to how you do this later in the post. </p>

<h3 id="2dontcopypastechunksofcode">2. Don't copy paste chunks of code.</h3>

<p>This one seems obvious when thinking about most coding languages, but maybe not so with your css. <br>
While working on your css, think about how some styles can be joined together. Remember you can join css selectors with commas so code such as:  </p>

<pre><code class="language-css">.banner p {
  margin: 0 0.5em;
  color: #222;
}
.banner h3 {
  margin: 0 0.5em;
  color: #444;
}
</code></pre>

<p>Can become this, which is much easier to maintain and keep consistent:  </p>

<pre><code class="language-css">/* ===== Banner module ===== */
.banner h3,
.banner p {
  margin: 0 0.5em;
}
.banner p {
  color: #222;
}
.banner h3 {
  color: #444;
}
</code></pre>

<p>Yes the above code is longer but maintainability is what we are aiming for. </p>

<h3 id="3avoidnamingclassesjustbytheircurrentproperties">3. Avoid naming classes just by their current properties</h3>

<p>Such as <code>.red</code>, because what is red? Will it always be red, what if we change to green... Do we go round everywhere changing the class name to green, or do we change the property and will red now mean green. <br>
Ok this one seems obvious especially with my example, but often when designing more modular css you can get carried away and go too abstract to the point of classes for everything like <code>.red, .font-serif, .text-align-right</code> which leads to even worse code. </p>

<p>Instead, try to think of what the element is, such as a block on the sidebar for latest news. you could have a module called <code>.latest-news</code>, but then you could go further and make that a generic <code>.sidebar-block</code> which can be reused for all your sidebar blocks. On top of this you could then still have <code>.latest-news</code> or <code>.sidebar-block-latest-news</code> for specific extra changes on top of the default <code>.sidebar-block</code>, but consider how this could be shared with other blocks on the page too. </p>

<h3 id="4dontjustslapimportantonit">4. Don't just slap !important on it ;)</h3>

<p>I find <code>!important</code> is very rarely needed, but too often designers try a selector, find it doesn't work and is somewhere overridden. So they give up and slap an <code>!important</code> on it. <br>
Learn about how selectors and inheritance works! <br>
<img src="https://blog.stapps.io/content/images/2016/06/css-specificity-meme.jpg" alt=""></p>

<p>The topic of CSS specificity deserves its own post, luckily there's several out there that do great jobs. <a href="https://web.archive.org/web/20140302025313/http://www.stuffandnonsense.co.uk/archives/css_specificity_wars.html">Specificity Wars</a> is a fun introduction to it, along with articles on <a href="https://css-tricks.com/specifics-on-css-specificity/">CSS-Tricks</a>, <a href="https://www.smashingmagazine.com/2007/07/css-specificity-things-you-should-know/">Smashing Magazine</a> and the <a href="https://developer.mozilla.org/en/docs/Web/CSS/Specificity">Mozilla Developer Network</a></p>

<p>Tools such as <a href="http://specificity.keegan.st/">Specificity Calculator</a> are also helpful for you to work out why a selector is more specific. </p>

<p>If you don't bother to learn about it, you'll be forever doomed to fight your forest fire of !importants later. </p>

<h3 id="5readthesourcecode">5. Read the source code!</h3>

<p>While you're working in systems or you have build scripts that generate a main/master css file from all your other files, don't be afraid to jump in and take a look to work out why an issue is happening or to check your code is being built the way you expect. <br>
Systems sometimes also have to place some css in page, maybe because of their current module architectures, whatever the reason, if that's the system you work within, you'd better be confident you can find where some css comes from. (Luckily dev tools will tell you if css is from a file or on the page). CSS like this deserves care and attention to override. The source code wont lie to you. </p>

<h3 id="6devtoolsisyourbestfriendknowitinsideout">6. Dev tools is your best friend, know it inside out!</h3>

<p>Better than reading the source code (though that's still important) is using dev tools. </p>

<p>You need to learn dev tools for the browser you're working on. No two ways about it, go learn them now, at least the inspector :). <br>
Here's a link for <a href="https://www.codeschool.com/courses/discover-devtools">Chrome</a> and <a href="https://developer.mozilla.org/en-US/docs/Tools">Firefox</a>. </p>

<p>The inspector will save you minutes, hours, days, weeks and more in trial and error. </p>

<h3 id="7avoidfixingheightwidthswhenyoucan">7. Avoid fixing height &amp; widths when you can.</h3>

<p>This often happens when you have a mockup in photoshop and then you try to match the exact dimensions, which is great, except that this likely wont work as the screen size decreases. <br>
Try to make your modules fluid, then they can fit into a grid or take the widths of the container. Patterns like this are core to responsive design. </p>

<h3 id="8designingfordesktopdownormobileup">8. Designing for desktop down or mobile up?</h3>

<p>Instead try to think of mobile and up where you can. Often this will lead to simpler css breakpoints and less cruft around content. With this you can think about what's really needed in the design, without too much extra that on mobile wouldn't make sense. <br>
Read more on <a href="http://zurb.com/word/mobile-first">Mobile First here</a>, or check out Luke Wroblewski's <a href="https://abookapart.com/products/mobile-first">Mobile First book</a></p>

<h3 id="9clearfixthecontainersofyourfloats">9. Clearfix the containers of your floats.</h3>

<p>The clearfix class is somewhat magical, but really it's very simple. There's a few implimentations of it, but generally the practice involves adding a hidden pseudo element at the bottom of the content that clears the floats. <br>
Sometimes you'll find this called ".clearfix", or ".cf". <br>
<a href="http://nicolasgallagher.com/micro-clearfix-hack/">Read more about one great example of this here</a>
<img src="https://blog.stapps.io/content/images/2016/06/css-floats-y-u-no-clear-yourself.jpg" alt=""></p>

<h3 id="10avoidmagic">10. Avoid magic.</h3>

<p>Maybe this seems weird when I just said clearfix is magic. But clearfix is simple when you understand how it works. Try to avoid code that seems to magically make things better if you don't understand why. Otherwise, how can you trust it will always work? How do you customize around it without breaking it? <br>
Clearfix is a great example of this as if you did not understand how it works, you may try and add a pseudo element after it in your own css and find the clearfix no longer works. </p>

<h3 id="11usetheappropriatemethodforlayout">11. Use the appropriate method for layout.</h3>

<p>Often grids or inside blocks instead of floats for layout. <br>
E.g. if you have 3 columns of evenly sized text next to each other, a grid is perfect. If you have a navigation list or boxes next to each other that are sized by their content, normal grids would be a terrible solution. Inline blocks are best for that as they are sized based on the content. If you have a title with a link to the right, float the link to the side, grids again are not really the best for that. There's no one way of doing things right, don't just follow one specific method, think about how it looks and what would really make the most sense. It may take a little longer to stop and think about each part. But if you do it will save you so many headaches later.</p>

<h3 id="12dontstyleeverythingasunique">12. Don't style every thing as unique.</h3>

<p>Try to reuse modules, again this is not to copy and paste, instead create a generic look for basic elements within content, and then create re-usable classes / modules for applying different styles. </p>

<h3 id="13optforrelativemeasurementsoverfixedwhenyoucan">13. Opt for relative measurements over fixed when you can.</h3>

<p>Simple one, relative measurements such as em, %, rem etc. are more flexible and will often work better with your responsive design than px. <br>
Not that you should cast aside px as a dirty relic, instead, consider the best measurement for the use case. Often in responsive design this will be relative measurements though. </p>

<h3 id="14remembernotallinteractionsrequirejquery">14. Remember not all interactions require jQuery.</h3>

<p><img src="https://blog.stapps.io/content/images/2016/06/css-can-do-that.jpg" alt=""></p>

<p><a href="https://developer.mozilla.org/en/docs/Web/CSS/:hover">:hover</a>, <a href="https://developer.mozilla.org/en/docs/Web/CSS/:active">:active</a>, <a href="https://developer.mozilla.org/en/docs/Web/CSS/:focus">:focus</a> and <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes">more</a>. Learn them, wield them like the awesome tools they are. </p>

<p>You probably already use these and know them well. But if you're working on something in javascript, it's easy to forget and use jquery or similar to do it instead.</p>

<h3 id="15combineproperties">15. Combine properties</h3>

<p>Properties such as <code>font</code> and <code>background</code> can be combined. It's worth using the combined versions for simplicity such as:</p>

<pre><code class="language-css">background-color: rebeccapurple;  
background-image: url(/images/logo.png);  
background-repeat: no-repeat;  
background-position: top left;  
</code></pre>

<p>Could be:  </p>

<pre><code class="language-css">background: rebeccapurple url(/images/logo.png) no-repeat top left;  
</code></pre>

<h3 id="16avoidunnecessarilylongselectors">16. Avoid unnecessarily long selectors</h3>

<p>Sure, referencing <code>body #content .sidebar a</code> works, but would <code>.sidebar a</code> work just as well?</p>

<h3 id="17alwaystestyourideas">17. Always test your ideas.</h3>

<p>Developer tools allow us to test our ideas live, why wait to compile or ftp a file to a server to test your idea for a fix. Change it live in the developer tools and you'll have instant feedback.</p>

<h3 id="18browsertesttoo">18. Browser test too!</h3>

<p>With complex modules, check ideas for them as you're going in browsers you think may be problematic, this will make things a lot easier when you return to fully browser check it later. </p>

<p><a href="https://blog.stapps.io/modern-browser-testing/">I've written more about browser testing here</a>.</p>

<p>You can also use <a href="http://caniuse.com/">Can I Use...</a> to find out browser support for new CSS properties etc. to find which browsers are likely problematic to start with. </p>

<p><img src="https://blog.stapps.io/content/images/2016/06/css-i-see-problem.jpg" alt=""></p>

<h3 id="19avoidspecificbrowserhacks">19. Avoid specific browser hacks.</h3>

<p>Try to find the cause of the problem, rather than a quick fix that may lead to further problems. You may find it's a problem in your CSS and you can work around a problem easier than just hacking it. <br>
If you have to use a <a href="http://www.browserhacks.com/">hack</a>, explain why in a comment, make sure that in a month when you return to this project you'll know why you added it in. </p>

<h3 id="20formatyourcssinaclearanduniformway">20. Format your CSS in a clear and uniform way.</h3>

<p>This one is a somewhat personal preference, but I try to always write CSS in the same way. I use 4 spaces for indentation (some people use tabs), I separate each selector onto a new line as I believe selectors are kind of the most important part of the css definition, and each property onto a new line.</p>

<p>You can see more of my style choices for CSS in the following post.</p>

<p><strong>Can you expand this list past 20? Leave a comment with your own anti patterns or advice.</strong></p>

<hr>

<p>Enough with what not to do...  </p>

<h3 id="continuetopart2forhowtostructureyourcssandmoretipscssstructureantipatternspart2"><a href="https://blog.stapps.io/css-structure-anti-patterns-part2">Continue to Part 2 for how to structure your CSS and more tips.</a></h3>

<hr>

<p>If you disagree with this list or do you have your own suggestions? Leave a comment below and I'll try to reply quickly.</p>]]></content:encoded></item><item><title><![CDATA[Reading list for modern web design]]></title><description><![CDATA[<p>Over the years I've found some books on web design to be just as important as posts online. Here's a short post on books I've read, enjoyed and think are worth while reading in terms of web design today. </p>

<p>These books are fairly up to date but the methods used</p>]]></description><link>https://blog.stapps.io/reading-list-for-modern-web-design/</link><guid isPermaLink="false">00b1f4c7-2e89-4dbc-8b8e-19c77fdad321</guid><category><![CDATA[Responsive]]></category><category><![CDATA[Design]]></category><category><![CDATA[Development]]></category><category><![CDATA[CSS]]></category><category><![CDATA[javascript]]></category><category><![CDATA[REC]]></category><category><![CDATA[Books]]></category><dc:creator><![CDATA[Andrew Stilliard]]></dc:creator><pubDate>Sat, 04 Jun 2016 16:13:00 GMT</pubDate><content:encoded><![CDATA[<p>Over the years I've found some books on web design to be just as important as posts online. Here's a short post on books I've read, enjoyed and think are worth while reading in terms of web design today. </p>

<p>These books are fairly up to date but the methods used are solid and still valid into tomorrow. <br>
By no means am I saying "read these and you're ready", or a definitive list of books I've read or think you should read. But if you're looking for books to tune your skills, this list may help. </p>

<p>I'd also encourage you to leave comments below to share books on web design you've enjoyed and have helped you too. </p>

<h2 id="books">Books</h2>

<div class="books-container">

<p>In case you've not stumbled onto this gem before, <a href="http://alistapart.com/">A List Apart</a> is a great source of useful information. Their series of short books on  
<a href="https://abookapart.com/">A Book Apart</a> offer great core skills such as:</p>

<!-- HTML5 book -->  
<div class="media book-media">  
  <a href="https://html5forwebdesigners.com/" class="img">
<img src="https://blog.stapps.io/content/images/2016/06/html5-for-web-designers-book.png" alt="">
  </a>
  <div class="bd">
    <h3 class="title">HTML5 for web designers by Jeremy Keith.</h3>
    <p>Looking to get up to speed on HTML5? A core skill of modern web design is being able to use these new HTML elements with purpose.</p>
  </div>
</div>

<!-- CSS3 book -->  

<div class="media book-media">  
  <a href="https://abookapart.com/products/css3-for-web-designers" class="img">
<img src="https://blog.stapps.io/content/images/2016/06/css3-for-web-designers-book.jpg" alt="">
  </a>
  <div class="bd">
    <h3 class="title">CSS3 for web designers by Dan Cederholm.</h3>
    <p>Also a core tool on your belt is CSS3. Techniques such as rounded corners (with border-radius) and background gradients and more are all common place in modern design. These are made simpler with this book.</p>
  </div>
</div>

<!-- Responsive web design book -->  

<div class="media book-media">  
  <a href="https://abookapart.com/products/responsive-web-design" class="img">
<img src="https://blog.stapps.io/content/images/2016/06/responsive-web-design-book.jpg" alt="">
  </a>
  <div class="bd">
    <h3 class="title">Responsive web design by Ethan Marcotte.</h3>
    <p>A brilliant intro to responsive web design, very useful techniques from the guy that coined the term "responsive web design"!</p>
  </div>
</div>

<p>The above are just 3 of their books, it's worth checking out <a href="https://abookapart.com/products/">more</a>. Hopefully this is a nice taste of books they offer and should help you learn the core skills needed to get started with modern web design.</p>

<p>On to other ranges of books, the following focus more on techniques, patterns, usability and inspiration.</p>

<!-- SMACSS book -->  

<div class="media book-media">  
  <a href="https://smacss.com/" class="img">
<img src="https://blog.stapps.io/content/images/2016/06/smacss-book.jpg" alt="">
  </a>
  <div class="bd">
    <h3 class="title">Scalable and Modular Architecture for CSS (SMACSS) by Jonathan Snook.</h3>
    <p>Another short book but front to back a great read full of useful info on writing and structuring css.
<br>The patterns he talks about are simple and easy to follow, but make all the difference in creating maintainable css designs.  
<br><em>I can't recommend this book enough.</em></p>  
  </div>
</div>

<!-- Smashing magazine book -->  

<div class="media book-media">  
  <a href="https://shop.smashingmagazine.com/products/the-smashing-book-1-digital-edition" class="img">
<img src="https://blog.stapps.io/content/images/2016/06/smashing-mag-book.jpg" alt="">
  </a>
  <div class="bd">
    <h3 class="title">Any from the "Smashing Book" series.</h3>
    <p>Full of the latest modern techniques, inspiring articles and more. 
  <br>Personally read books 1 & 3 but I'd bet the 2nd is worth wile too. 
  <br>The <a href="https://www.smashingmagazine.com/">Smashing Magazine</a> website has been a constant source of useful info and inspiration for years. </p>
  </div>
</div>

<!-- Don't make me think book -->  

<div class="media book-media">  
  <a href="https://www.amazon.co.uk/dp/0321965515/ref=pd_lpo_sbs_dp_ss_1?pf_rd_p=569136327&pf_rd_s=lpo-top-stripe&pf_rd_t=201&pf_rd_i=0321344758&pf_rd_m=A3P5ROKL5A1OLE&pf_rd_r=BSZR6QXQ8QGC19K6K9TC" class="img">
<img src="https://blog.stapps.io/content/images/2016/06/dont-make-me-think-book.jpg" alt="">
  </a>
  <div class="bd">
    <h3 class="title">Don't Make Me Think: A Common Sense Approach to Web Usability by Steve Krug.</h3>
    <p>If being able to build a site is the first step, then building it right is the second. This book goes over common web usability and is definitely worth the read.</p>
  </div>
</div>

<p>Ready to dive into Javascript?</p>

<!-- Eloquent JavaScript book -->  

<div class="media book-media">  
  <a href="http://eloquentjavascript.net/" class="img">
<img src="https://blog.stapps.io/content/images/2016/06/eloquent-javascript.jpg" alt="">
  </a>
  <div class="bd">
    <h3 class="title">Eloquent JavaScript: A Modern Introduction to Programming by Marijn Haverbeke.</h3>
    <p>This book came out around 2011 but I wish it had been there back in 2008 when I first started Javascript. It's useful for getting started with Javascript, or fine tuning your skills and filling in any blanks. </p>
  </div>
</div>

<!-- Javascript good parts book -->  

<div class="media book-media">  
  <a href="http://eloquentjavascript.net/" class="img">
<img src="https://blog.stapps.io/content/images/2016/06/js-good-parts.gif" alt="">
  </a>
  <div class="bd">
    <h3 class="title">JavaScript: The Good Parts by Douglas Crockford.</h3>
    <p>Douglas Crockford gives a great run through of the language and the syntax to give you a solid understanding of programming with it.</p>
  </div>
</div>

<p>Looking for something a bit deeper? Something for improving your developer skills?</p>

<!-- Eloquent JavaScript book -->  

<div class="media book-media">  
  <a href="https://pragprog.com/book/tpp/the-pragmatic-programmer" class="img">
<img src="https://blog.stapps.io/content/images/2016/06/pragmatic-programmer.jpg" alt="">
  </a>
  <div class="bd">
    <h3 class="title">The Pragmatic Programmer:
From Journeyman to Master by Andrew Hunt and David Thomas.</h3>  
    <p>If you're interested in levelling up your skills then this book may be for you. It covers patterns, methodology, solid ideas and tools to take your code to the next level. It's also surprising easy to follow as it's often ultimately about common sense. </p>
  </div>
</div>

<p></p></div><p></p>

<h2 id="newsletters">Newsletters</h2>

<p><em>I like a good newsletter or 10 for keeping up to date on the modern web.</em>
They're one way that's really helped me stay up to date especially over the past year. Maybe they will work for you too.</p>

<p>Sitepoint's <a href="https://www.sitepoint.com/versioning/email">Versioning</a> newsletter is worth subscribing to if you're interested in a daily digest of latest web news. <br>
Though this can be too frequent, <a href="https://web-design-weekly.com/">Web Design Weekly</a>, or <a href="http://responsivedesignweekly.com/">Responsive Design Weekly</a> are 2 great weekly newsletters also. <br>
There are many others like this such as HTML5 Weekly, CSS Weekly, Javascript Weekly and eWebDesign newsletter. <br>
My advice is to pick one and see if you like it. If not you can always un-subscribe :).  </p>

<p>If you're working on an <a href="http://www.reallyeasycart.co.uk/">REC</a>, here's some more links that may be of use for keeping up to date: <a href="http://design.reallyeasycart.co.uk/up-to-date.html">http://design.reallyeasycart.co.uk/up-to-date.html</a></p>

<p>Please leave comments with books or posts online you'd recommend :), I'd love to hear about books that you've read and have helped you, along with inspiration for what I should read next.  </p>]]></content:encoded></item><item><title><![CDATA[Modern browser testing]]></title><description><![CDATA[<p>Browser testing has come along way, these aren't the days of IE5/6 double margin bugs or old IE hasLayout problems. <br>
We still battle some bugs but by large they are much less common to run into for day to day design. However this doesn't mean you don't need to</p>]]></description><link>https://blog.stapps.io/modern-browser-testing/</link><guid isPermaLink="false">5b2513a2-4243-4056-bf2f-a93cadd2ec2e</guid><category><![CDATA[Design]]></category><category><![CDATA[CSS]]></category><category><![CDATA[Responsive]]></category><category><![CDATA[REC]]></category><category><![CDATA[Development]]></category><category><![CDATA[Template]]></category><dc:creator><![CDATA[Andrew Stilliard]]></dc:creator><pubDate>Thu, 02 Jun 2016 08:24:50 GMT</pubDate><content:encoded><![CDATA[<p>Browser testing has come along way, these aren't the days of IE5/6 double margin bugs or old IE hasLayout problems. <br>
We still battle some bugs but by large they are much less common to run into for day to day design. However this doesn't mean you don't need to test!</p>

<h3 id="contents">Contents</h3>

<ol>
<li><a href="https://blog.stapps.io/modern-browser-testing/#tipswhilecoding">Tips while coding</a>  </li>
<li><a href="https://blog.stapps.io/modern-browser-testing/#selectingbrowsers">Selecting browsers to test</a>  </li>
<li><a href="https://blog.stapps.io/modern-browser-testing/#whybrowserstack">Why BrowserStack</a>  </li>
<li><a href="https://blog.stapps.io/modern-browser-testing/#testing">Testing like a pro</a></li>
</ol>

<p><a id="tipswhilecoding"></a>  </p>

<h2 id="tipswhilecodingtomakeyourbrowsertestingeasier">Tips while coding to make your browser testing easier</h2>

<ol>
<li><p><strong>Don't focus too much on making your designs pixel perfect in every browser.</strong></p>

<blockquote>
  <p>"While some designers strive for cross-browser pixel perfection, proponents of fluid design do not think that layouts have to look identical across all platforms and screen resolutions." <br>
  <em>- The Smashing Book (Chapter on the Art &amp; Science of CSS Layouts)</em> </p>
</blockquote>

<p>Often clients (or our own OCD's) will want a design to be pixel perfect across multiple browsers and sizes, but there's very little need for this. I'm not saying make them drastically different in each browser, but if they have minor differences then this is good enough for me. The important thing is the design is able to adapt to the available screen size, and look good enough in browsers where support for some features isn't easily available. E.g. rounded corners with border-radius, these days it's pretty much all browsers, but if you go back to IE8 it doesn't support border-radius. Though if you look at your design, does the fact it doesn't have rounded corners cause any problems? no? great, leave it, no fancy polyfills etc needed. Which nicely brings me to my next point.</p></li>
<li><p><strong>Don't fear vendor prefixes, but also don't fret about them either.</strong> <br>
That sounds confusing, I probably could word that better. <br>
What I mean is, feel free to use vendor prefixes in your code. But make your own decisions of when to and not to use them. E.g. <a href="http://caniuse.com/#feat=flexbox">flexbox</a> is a great case of where it's needed, especially because of IE10's alt syntax. But <a href="http://caniuse.com/#feat=css-repeating-gradients">css gradients</a>, if you set a fallback background-color then this will likely be fine if you don't bother adding the vendor prefixed versions too as they will use the fallback. <br>
<a href="http://pleeease.io/play/">There</a> <a href="https://autoprefixer.github.io/">are</a> <a href="http://prefixr.com/">many</a> <a href="http://prefixr.cloudvent.net/">sites</a> out there that offer automatically adding prefixes to your code. But simpler than this, you can get editor plugins (for <a href="https://wbond.net/sublime_packages/prefixr">Sublime</a>, <a href="https://atom.io/packages/autoprefixer">Atom</a>, etc.) which can run right in your editor with a single command. 
One rule to remember with these new css properties &amp; vendor prefixes is, always use the real property too, don't just style for webkit prefixes, make sure you style for all and then add prefixes for added support. Also, think about browsers that don't even have prefixes. Make sure your design degrades gracefully without them, or better yet, build without them where you can and add them on top after, so you know the base is already nice and this progressively enhances the design in newer browsers. </p></li>
<li><p><strong>Avoid browser specific hacks.</strong> <br>
Ok yes, very unlikely if you're supporting IE7 or 8 maybe. But 9+ and most other modern browsers, do you really need that hack? In the case that you super need a hack, <a href="http://browserhacks.com/">browserhacks.com</a> is a great resource for it. <strong>But</strong> is it needed?</p></li>
<li><p><strong>Avoid adding lines of code you don't understand.</strong></p>

<p>Sure use libraries and snippets, in fact I encourage it, but try to look and learn how they work. Especially if it's a few lines in your own css. Sometimes when you copy other peoples code you can be left with properties that don't appear to make sense. Best case is if they are not explained somewhere, try taking them out, does it break, if so you'll learn why they were added, and if not, maybe you can remove them to simplify the code. You can always add them back in later if needed. But try to avoid seeing some code as <em>magic</em>. Magic hides reality, and often I've found magic can lead to bugs.</p></li>
<li><p><strong>Resize your browser often while developing.</strong> <br>
This is one of the fastest ways to quickly catch problems fast, and to prove your designs adapt to the screen size available. </p></li>
<li><p><strong>Learn to master your browsers dev tools</strong> <br>
Each of the major browsers have developer tools that help you build sites. Its really worth investing time in learning these tools. Most of them offer some sort of emulation for browser modes, screen sizes, user agents etc. So this is useful for browser testing. But the tools are also useful during testing because you can use them to inspect elements style to see exactly why something isn't working. Rather than the old methods of try this property, refresh browser maybe it'll work. Instead you can try your ideas live!</p>

<p>Spend some time familiarising yourself with the top browser tools: <a href="https://developer.chrome.com/devtools">Chrome</a>, <a href="https://developer.mozilla.org/en-US/docs/Tools">Firefox</a>, <a href="http://www.opera.com/dragonfly/">Opera</a>, <a href="https://developer.apple.com/safari/tools/">Safari</a>, <a href="https://msdn.microsoft.com/en-us/library/bg182326(v=vs.85).aspx">IE</a>, <a href="https://developer.microsoft.com/en-us/microsoft-edge/platform/documentation/f12-devtools-guide/">Edge</a>.</p>

<p><a href="https://www.codeschool.com/courses/discover-devtools">Here's a free course on the chrome dev tools, really worth a watch.</a></p></li>
</ol>

<p><a id="selectingbrowsers"></a>  </p>

<h2 id="selectingbrowserstotest">Selecting browsers to test</h2>

<p>Always test the latest browsers, versions &amp; platforms. <br>
Chrome latest, Firefox Latest, IE11, Edge Latest. Android Chrome latest, IOS Safari latest etc. <br>
This is the quickest way to be extra safe with your design. </p>

<p><strong>Working with an existing site</strong></p>

<p>If your existing site has analytics, this is the perfect place to start to make sure you cover it's most used devices, browsers and versions. <br>
For example, just because you've tested on the latest IOS safari version, doesn't mean that's the version that's currently most in use for this site. <br>
It's really worth checking the browsers that bring the most visitors and importantly the most conversions. </p>

<p>Login to Analytics > Audience > Technology > Browser &amp; OS. <br>
Then you can also click on a specific browser to then find a tab to see specific versions of that browser.</p>

<p>Be sure to set the date range for last month, and then also compare to last 6 months. </p>

<p>You can check out device/browser sizes if you click the Screen resolution tab at the top, though my personal recommendation is to make your design adapt to all screen widths rights down to 320px <em>(or 240px if you can but not always so easy)</em>.</p>

<p>If it's an ecommerce store &amp; revenue is stored too then you can see which devices, browsers and versions generate revenues. This is important, as if a specific older browser is bringing in thousands, maybe a couple big customers use it, it may not even be a popular browser but if it brings in the bucks, you'd better be supporting it ;).</p>

<p><a href="https://www.aabacosmallbusiness.com/advisor/google-analytics-browsers-visitors-220046730.html">Find out more details on using Google analytics to find browser support here</a>.</p>

<p><a id="whybrowserstack"></a>  </p>

<h2 id="browsertestingwithbrowserstack">Browser testing with BrowserStack</h2>

<p>Ok, I cannot stress the importance of this tool: <a href="https://www.browserstack.com/start">BrowserStack</a></p>

<p><em>This may sound like an advert for BrowserStack, I just really love their tool.</em></p>

<p>Here's my 5 favourite features it has!</p>

<ol>
<li>Test on all the major browsers &amp; versions,  </li>
<li><p>On all the major platform versions of Windows, OS X, Android, IOS &amp; Windows Phone. - It's not just about the browsers, its also about the different versions of them, and the different platforms they are on. <br>
When a client calls up saying they have a problem on IE 10 on Windows 8, you can fire up BrowserStack and test the same as them. <br>
<em>Speaking of which, tools like <a href="http://fmbip.com/get-started/">Findmebyip.com</a> offer urls you can share with your clients to find out what browser they are currently using as often people don't know.</em>  </p></li>
<li><p>These are not emulators, real browsers on real platforms! I've had designers tell me before they don't trust services like this because it's not the real device, which i understand, but with BrowserStack you really have access to real instances of windows and OS X with the real browsers installed. Also for mobile they have "Physical Devices" which are real devices in a device farm BrowserStack have so you're really on the device testing! They also offer emulators for some mobile devices they don't have, but the physical devices cover most cases.</p></li>
<li><p>Their <a href="https://www.browserstack.com/mobile-features">mobile features</a> are top notch. <strong>Access to dev tools on mobile devices</strong> is more important than I can express! This one feature really is worth the subscription on it's own. </p></li>
<li><p>Zero setup &amp; it boots up super fast! Starting up a test laptop or VM can take longer and on a good connection BrowserStack feels fairly smooth!</p></li>
</ol>

<p>Bonus feature: Built in issue tracker, I haven't used this feature much but on a project where you're testing but not the developer, you can use this to keep screenshots as a list of issues for the designer/developer to fix. </p>

<h3 id="asidenotesontestingapps">Aside notes on testing apps</h3>

<p>I'll mention here BrowserStack is not the only tool out there for this, It's the one I use most and personally I believe it's the best tool for the job. It's worth knowing about other similar tools such as: <a href="http://browsershots.org/">Browsershots</a>, <a href="https://turbo.net/browsers">turbo.net/browsers</a> and <a href="https://www.browserling.com/">Browserling</a></p>

<p>It's no replacement if you already have the device in front of you, but you wont have all the different versions in front of you. You may have a couple iphones in the office, maybe even different models. But are they on different IOS versions and therefore different mobile safari versions? Don't forget about people who haven't upgraded their phones yet, and no, saying "they should just upgrade" is not an excuse! <em>(Something a friend once said to me with his design after I pointed out an IOS 5 issue, sighs)</em>.</p>

<p>Also worth noting, if browserstack is not available to you, or it's too slow, you can use VMs for windows / IE / Edge debugging, in fact <a href="https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/linux/">Microsoft provides these free</a>. </p>

<p>For mobile device debugging, you can use dev tools with chrome's remote debugging feature. <a href="https://developer.chrome.com/devtools/docs/remote-debugging">Follow this tutorial on how to set this up.</a></p>

<p><a id="testing"></a>  </p>

<h2 id="testinglikeapro">Testing like a pro</h2>

<p>These are some brief tips to testing, but all this boils down to using the site like a real user.</p>

<ol>
<li>Resize in and out on every page.  </li>
<li>Scroll up and down while resizing, don't just load it on small screen and assume because the top of the page is ok that the rest will be too.  </li>
<li>Click every link, to the point of trying to break the site.  </li>
<li>Following on from the previous tip, try to break the site! Don't just test the things you already know work, try to think outside the box, your users certainly will.  </li>
<li>Pay special extra attention to custom interactions you've added to the site. Just because it looks nice, doesn't always mean it works.  </li>
<li>When you do find bugs, use the browser dev tools like mentioned above, especially the console if it's an interaction / javascript issue.  </li>
<li>After testing, accept that you can't test everything perfectly, over time your testing skills will be better, but it's important you’re aware reports of bugs <em>will</em> come in. You need to be ready for those reports, ready to find out which browser has the issue if possible like we talked about above, and try to reproduce it in the same browser version. </li>
</ol>

<h3 id="additionaltestingforbonuspoints">Additional testing for bonus points</h3>

<ol>
<li>Test performance with <a href="https://developers.google.com/speed/pagespeed/insights/">Google Page Speed</a>.  </li>
<li>Test mobile friendliness using <a href="https://www.google.co.uk/webmasters/tools/mobile-friendly/">Google’s tool</a>.  </li>
<li>Check the SEO of pages, such as title tag, meta tags, single <code>&lt;h1&gt;</code> tag, alt tags on images etc. Moz offer some <a href="https://moz.com/blog/designing-for-seo">great information</a> on this. </li>
</ol>

<p>I hope this has been useful, please leave a comment below with any of your own tips on browser testing to help improve this resource for others. </p>]]></content:encoded></item><item><title><![CDATA[REC FTP development using Atom editor]]></title><description><![CDATA[<p>Following on from my <a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/">post on FTP development with REC</a> where I used Sublime Text 2. I believe it's worth trying out other editors to find one that works well for you. Also this editor is FREE which is a big bonus ;).</p>

<p><strong>(UPDATE: Newer post <em>(2019)</em> for <a href="https://blog.stapps.io/livereload-with-ftp/">vscode &amp; live</a></strong></p>]]></description><link>https://blog.stapps.io/ftp-development-using-atom-editor/</link><guid isPermaLink="false">132d06b9-97f1-4121-ab8c-f1f91cbe547b</guid><category><![CDATA[REC]]></category><category><![CDATA[Template]]></category><category><![CDATA[FTP]]></category><category><![CDATA[Design]]></category><category><![CDATA[Development]]></category><category><![CDATA[Responsive]]></category><category><![CDATA[Atom]]></category><dc:creator><![CDATA[Andrew Stilliard]]></dc:creator><pubDate>Thu, 03 Dec 2015 11:36:56 GMT</pubDate><content:encoded><![CDATA[<p>Following on from my <a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/">post on FTP development with REC</a> where I used Sublime Text 2. I believe it's worth trying out other editors to find one that works well for you. Also this editor is FREE which is a big bonus ;).</p>

<p><strong>(UPDATE: Newer post <em>(2019)</em> for <a href="https://blog.stapps.io/livereload-with-ftp/">vscode &amp; live reload</a> now available too)</strong></p>

<p>In this tutorial we'll quickly get setup with <a href="https://atom.io">Atom</a>, it's is a newer editor from the guys at Github. Completely open source, free and built in javascript which makes it pretty interesting (to me at least).  </p>

<h2 id="stepstogetstartedforrecsitedevelopment">Steps to get started for REC site development:</h2>

<ol>
<li><p>Visit <a href="https://atom.io">Atom.io</a>, download and install</p></li>
<li><p>Now we have the editor installed, lets start installing some packages to begin development.</p>

<p>We need to head to the settings view, you can open this by navigating to Edit > Preferences (Linux), Atom > Preferences (OS X), or File > Preferences (Windows).
It's worth exploring some of the available settings, keybindings/shortcuts and other areas.</p>

<p>To install the package we want click on the "+ Install" tab on the left.</p>

<p>The first package we'll install if for Twig syntax highlighting. 
Search for "php-twig" and hit enter.</p>

<p>It's also worth setting up your theme as you'll spend a long time stairing at the screen, you'll want it to be nice :). Click the "Themes" tab on the left.
e.g. I've chosen to use "One Dark" for the UI Theme, and "Atom Dark" for the Syntax Theme.
You can also view and install other Themes from the "+ Install" tab, by clicking the Themes toggle next to the search input. </p></li>
<li><p>Back to installing packages, lets also install an FTP package to work with the REC files. <br>
I've chosen to use remote-sync for this demo, but there are several other ftp packages that may work well for you too. </p></li>
<li><p>Create a new empty folder for this project <br>
(However you normally create folder, e.g. via a file manager program on your computer, or via the terminal using <code>mkdir myproject</code>)</p></li>
<li><p>Add project folder to Atom, "File" > "Add Project Folder..." and select the folder</p></li>
<li><p>Right click on the folder on the left, > "Remote Sync" > "Configure"  </p>

<ul><li>Toggle FTP at the top (instead of SCP/SFTP)</li>
<li>Set Hostname as the site's domain name or IP if not live on domain</li>
<li>Port as 21</li>
<li>Target directory as /</li>
<li>Username as the ftp user (in the REC site > Admin > FTP Access > User, for the views@... account)</li>
<li>Enter password, also given in the admin ftp access area.</li>
<li>Tick to upload on save and to delete on local delete (if you'd like these settings)<br><br></li></ul></li>
<li><p>Right click again on the folder on the left, > "Remote Sync" > "Download Folder" <br>
(this may take a few minutes as there are many files)</p></li>
<li><p>Start editing files, (on save it should upload, if not after the first time you may need to restart Atom) <br>
Also after restarting Atom, the first save/upload can take a while, for me on a fairly fast internet connection it took almost 1 minute for this initial connection. But then all save/uploads after take less than a second so it's just a little wait at the start of each coding session which isn't so bad. You could also try out one of the other ftp packages available for Atom if this becomes too much of a pain. </p></li>
<li><p>From here you have your project folder ready to start development, and for a walk through on getting started with REC development please see my <a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/">previous post</a> on this, but just skip over the Sublime Text setup instructions.</p></li>
</ol>

<p>I hope this helps you get started with Atom, leave a comment below for any further help.</p>

<p>There's plenty details on <a href="https://atom.io/docs/v1.2.4/">using Atom here</a>, along with <a href="https://www.youtube.com/watch?v=bo5MM2N_3tw">this video</a> to help you get started.</p>]]></content:encoded></item><item><title><![CDATA[Responsive breakpoints preview tool]]></title><description><![CDATA[<p>I'll start by saying there really are loads of great tools out there to preview sites on different viewports / screen width. <br>
Such as: <a href="http://mattkersley.com/responsive/">http://mattkersley.com/responsive/</a>, <a href="https://www.responsinator.com/">https://www.responsinator.com/</a> and <a href="http://responsivedesignchecker.com/">http://responsivedesignchecker.com/</a>.</p>

<p>And even some tools that offer excellent detection of media queries / breakpoints and then automatically</p>]]></description><link>https://blog.stapps.io/responsive-breakpoints-preview-tool/</link><guid isPermaLink="false">6f7317d1-bd94-4146-bdf6-775238cf5661</guid><category><![CDATA[Responsive]]></category><category><![CDATA[Testing]]></category><category><![CDATA[Design]]></category><category><![CDATA[Development]]></category><category><![CDATA[CSS]]></category><category><![CDATA[REC]]></category><dc:creator><![CDATA[Andrew Stilliard]]></dc:creator><pubDate>Wed, 02 Dec 2015 23:59:00 GMT</pubDate><content:encoded><![CDATA[<p>I'll start by saying there really are loads of great tools out there to preview sites on different viewports / screen width. <br>
Such as: <a href="http://mattkersley.com/responsive/">http://mattkersley.com/responsive/</a>, <a href="https://www.responsinator.com/">https://www.responsinator.com/</a> and <a href="http://responsivedesignchecker.com/">http://responsivedesignchecker.com/</a>.</p>

<p>And even some tools that offer excellent detection of media queries / breakpoints and then automatically create iframes of each so you can quickly view them, such as: <a href="http://breakpointtester.com/">http://breakpointtester.com/</a> and <a href="http://re-view.emmet.io/">http://re-view.emmet.io/</a></p>

<p>The 1st set of tools are great, especially when demoing to clients to help them see different specific devices. <br>
While the 2nd set of tools are also really useful when developing to see the different breakpoints built in and to quickly demo them side by side too. <br>
The minor downside to these 2nd set of breakpoint tools however is they are either browser plugins or bookmarklets, which for some clients will not make a lot of sense. </p>

<p>Instead we need a tool like the 1st ones where you can link to it, but with breakpoint detection like the 2nd set of tools.</p>

<p>And so, here's a new tool you can use: <br>
<a href="http://responsive.stapps.io/">http://responsive.stapps.io/</a></p>

<p>Like the other tools, this only works on sites that don't block iframe access, e.g. google blocks it's site from being viewed in an iframe. </p>

<p>Also, unlike some of the other tools, it currently only works on sites with css breakpoints  / media queries. </p>

<p>It has 2 display modes, the default one is a slider of each display size, you can use the arrows on the side or keyboard to navigate between them. <br>
Then the other display mode is to show all the sizes next to each other, like the other breakpoint based tools, which is useful for quick comparisons. <br>
<em>You'll need to click "run" again to change the display modes.</em></p>

<p>It's pretty new so message me about any bugs, but enjoy :).</p>

<p><em>If you're an REC user, you can find a link to this under the preview url in Admin > Templates > Open/Edit Template</em></p>]]></content:encoded></item><item><title><![CDATA[Diving into FTP development with REC]]></title><description><![CDATA[<p>As well as via the admin interface, you can use FTP to gain a greater level of control over the design of your <a href="http://www.reallyeasycart.co.uk/">REC</a> site by being able to directly access the files. <a href="http://support.reallyeasycart.co.uk/support/solutions/articles/210152-ftp-access">Why is this useful?</a> </p>

<h3 id="contents">Contents</h3>

<ol>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#prerequisites">Prerequisites</a>  </li>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#startinganewproject">Starting a new project</a>  </li>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#firsttimenotes">First time notes</a>  </li>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#divingin">Diving in</a>  </li>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#nextsteps">Next steps</a></li></ol>]]></description><link>https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/</link><guid isPermaLink="false">0fd73fcd-11bb-4f05-af9f-10c3cde3d50b</guid><category><![CDATA[REC]]></category><category><![CDATA[Template]]></category><category><![CDATA[FTP]]></category><category><![CDATA[Design]]></category><category><![CDATA[Development]]></category><category><![CDATA[Responsive]]></category><dc:creator><![CDATA[Andrew Stilliard]]></dc:creator><pubDate>Wed, 25 Nov 2015 16:00:17 GMT</pubDate><content:encoded><![CDATA[<p>As well as via the admin interface, you can use FTP to gain a greater level of control over the design of your <a href="http://www.reallyeasycart.co.uk/">REC</a> site by being able to directly access the files. <a href="http://support.reallyeasycart.co.uk/support/solutions/articles/210152-ftp-access">Why is this useful?</a> </p>

<h3 id="contents">Contents</h3>

<ol>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#prerequisites">Prerequisites</a>  </li>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#startinganewproject">Starting a new project</a>  </li>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#firsttimenotes">First time notes</a>  </li>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#divingin">Diving in</a>  </li>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#nextsteps">Next steps</a></li>
</ol>

<h2 id="prerequisites">Prerequisites</h2>

<p>We'll need an editor to work with the template files, for the purpose of this demo we'll be using <a href="http://www.sublimetext.com/2">Sublime Text 2</a>, although there are plenty others you may prefer such as <a href="http://brackets.io/">Brackets</a>, <a href="https://atom.io/">Atom</a>, <a href="http://www.adobe.com/uk/products/dreamweaver.html">Dreamweaver</a>, more info on <a href="http://blog.teamtreehouse.com/which-text-editor-should-i-use">choosing an editor here</a>.</p>

<p><strong>(UPDATE: I have a <a href="https://blog.stapps.io/ftp-development-using-atom-editor/">new post on using Atom</a>, a free text editor, instead of sublime in case you're interested. You can still use this post for getting started if you skip over the sublime references, down to <a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#firsttimenotes">First time notes</a>)</strong></p>

<p><strong>(UPDATE 2: &amp; a newer post <em>(2019)</em> for <a href="https://blog.stapps.io/livereload-with-ftp/">vscode &amp; live reload</a>)</strong></p>

<p>With which ever editor you choose you'll need to use <a href="https://www.google.co.uk/search?q=ftp">FTP</a> to transfer files back and forward between your computer and the site, either setup within the editor or you can use a separate ftp client such as the <a href="https://filezilla-project.org/">Filezilla Client</a>. <br>
But here we'll use Sublime Text's excellent SFTP package. </p>

<p>Checklist: <br>
1. Sublime Text 2 installed (<a href="http://www.sublimetext.com/2">http://www.sublimetext.com/2</a>) <br>
2. Sublime Package Control installed (<a href="https://packagecontrol.io/installation#st2">https://packagecontrol.io/installation#st2</a>) <br>
3. Sublime SFTP plugin installed (<a href="https://wbond.net/sublime_packages/sftp/installation">https://wbond.net/sublime_packages/sftp/installation</a>)  </p>

<h2 id="startinganewproject">Starting a new project</h2>

<p>To start we'll want to create a new folder to work in and open Sublime Text with our site files in ready to begin coding. Follow these steps for Sublime Text.</p>

<ol>
<li>Create a folder for us to work in  </li>
<li>Open Sublime  </li>
<li>(In Sublime) "Projects" > "Add Folder to Project..."  </li>
<li>(In Sublime) right click on folder name in sidebar > "SFTP/FTP" > "Map to Remote..."  </li>
<li>Setup the sftp-config.json file <br>
<ul><li>set the type as either "ftps" or "ftp" instead of "sftp" (ftps is a more secure choice)</li>
<li>set your <code>host</code>, <code>user</code> and <code>password</code> (found in your REC site > Admin > FTP Account)</li>
<li><code>port</code> is 21</li>
<li>set file permissions: <code>"file_permissions": "666", "dir_permissions": "777",</code></li>
<li>choose other useful configuration, e.g. 
<ul><li><code>"upload_on_save": true,</code>  - To always upload back to the server when you save the file</li>
<li><code>"sync_down_on_open": true,</code>  - To always re-download the latest version of a file from the server on open</li></ul></li>
<li>Here's an <a href="http://support.reallyeasycart.co.uk/solution/articles/210164-sublime-text-2-3-example-setup">example config</a> for you to compare to if you'd like.</li></ul></li>
<li>Save the sftp-config.json file  </li>
<li>Now download the current files, (In Sublime) right click on folder name in sidebar > "SFTP/FTP" > "Download Folder"  </li>
<li>If everything was configured ok it should start to download all the template folders into your folder. <em>If you have any issues try switching from ftps to ftp, but please leave a comment at the bottom if you have any issues.</em></li>
</ol>

<h2 id="firsttimenotes">First time notes</h2>

<p>Things to keep in mind when developing within REC.</p>

<p><strong>File Permissions</strong></p>

<ul>
<li>The *-base folders are locked, you won't be able to change or delete these files and folders on the site.</li>
<li>but you can work within the *-site folders, by default you'll want to work in the "responsive-site" folder</li>
<li>and you can create new folders for new templates or variations on your design, e.g. a Christmas folder for any minor tweaks to promote extra Christmas sales</li>
</ul>

<p><strong>HTML files</strong></p>

<ul>
<li>These are the core template files</li>
<li>The 0-base, legacy-base and responsive-base are our officially updated themes. Legacy-base is for sites built before responsive-base came out. </li>
<li>Your files will sit in your template folder, and by default this is the "responsive-site" folder. </li>
<li>Files in a child template like responsive-site override the parent template files such as responsive-base.</li>
<li>E.g. When the system renders the middle section of the page (html/layouts/index.html.twig) it first looks for this file in the live template folder, e.g. responsive-site. If that file is found here it will use it, else it will check it's parent folder, responsive-base, if the files found here it will use it, else it will check in the parent of this parent template, 0-base.</li>
<li>The syntax used in these files in HTML + Twig.</li>
<li>Twig is a template language we use to allow you access to the system, e.g. to show variables such as a products name ( e.g. {{ product.name }} ) and price on the products page ( html/store/product_info.html.twig )</li>
<li>Documentation is available on <a href="http://twig.sensiolabs.org/doc/templates.html">Twig</a> and there's a <a href="http://twig.stapps.io/">playground</a> to test Twig ideas outside of REC. </li>
</ul>

<p><strong>CSS / JS files</strong></p>

<ul>
<li>Store your css in css/site.css.twig inside your template folder. </li>
<li>Same for your js, store inside js/site.js.twig</li>
<li>You can however include multiple other files into these files with Twig, we'll talk more about this later :)</li>
<li>The "responsive-base/css/" folder is full of useful css files, mainly in the "modules/" folder, where all the style of the site is stored.</li>
<li>Like the html files you can place a file in the same location but in your responsive-site folder and it will override it, but if you do you'll loose updates to this file as you'll be overriding it.</li>
<li>This works well such as for replacing the nav styling entirely, you'd want to remove the default style and you would not care about the upgrades to it, as you'd be using your own custom version.</li>
<li>But if you wanted to keep using the same nav and only make a minor change to it would be best to make your changes in a separate file loaded from site.css.twig</li>
<li>The css/main.css.twig and js/main.js.twig files as seen in the responsive-base folder are the main files used to include all the other files we use to build the template. <strong>Don't</strong> override these files, as you'd loose new files being included and any other updates to it. Instead use the css/site.css.twig and js/site.js.twig files. These site files are included at the bottom of the main files. You can use them to include other files in the same way but we leave these files blank purposefully for you to use. </li>
</ul>

<p><strong>Javascript / jQuery</strong></p>

<ul>
<li>jQuery comes pre-installed in all REC sites.</li>
<li>We currently use version 1.11.3, and you can change this by overriding the html/sections/head/jquery.html.twig file like all others.</li>
<li>However in REC <code>$</code> does not by default reference to jQuery as we have an older javascript lib also included called Prototype.js. In time we'll remove Prototype.js but when using jQuery you'll need to wrap your code so that you <code>$</code> is jQuery for you. 
This can be done with:  </li>
</ul>

<pre><code class="language-javascript">(function ($) {

// your code... executed immediately, before dom ready

}(jQuery));
</code></pre>

<p>Or  </p>

<pre><code class="language-javascript">jQuery(function ($) {

// your code... executed on dom ready
// same as using jQuery(document).ready(function ($) { ... });

});
</code></pre>

<p>&nbsp;</p>

<p><strong>Caching</strong></p>

<ul>
<li>Our css/js/images etc. all cache in the browser for 1 month. </li>
<li>This is great for performance, but during development you'll want to always see your latest code changes.</li>
<li>You'll either want to always use <a href="http://wiki.scratch.mit.edu/wiki/Hard_Refresh">hard refreshes</a></li>
<li>or set your browser to not cache (e.g. in chrome's developer tools, on the network tab you can tick to disable cache, this will force hard refreshes for you automatically when)</li>
<li>Also once you've finished work via ftp you'll want to bump the version for users browsing the site if it's already live. You can do this in REC site > Admin > Templates > "Bump Cache Buster". </li>
</ul>

<h2 id="divingin">Diving in</h2>

<p>Currently I'm working on a redesign of <a href="http://www.impkids.co.uk/">Impkids</a> clothing site. <br>
I have a few tasks to work through with you here including:</p>

<ol>
<li>Enable preview mode, as this is a live site currently running the legacy-site template and I don't want the changes to show till I'm done.  </li>
<li>Move the slider next to the sidebar above the main content, instead of above the entire middle section as it is by default.  </li>
<li>Style the outer design of the site in css.</li>
</ol>

<p><strong>Preview mode</strong></p>

<p>First, lets enable the preview mode. REC site > Admin > Templates > Hover over the responsive-site template folder and click "Preview". <br>
This will open a new tab with the site in for you, and you're ready to start work in this folder in a preview that only you can see. </p>

<p><strong>Moving the slider</strong></p>

<p>Now we'll work on moving that slider. <br>
If we look in responsive-base, the default layout file that loads in the slider is at <code>html/layouts/index.html.twig</code>. So we need to create a file at this same path, and the <code>layouts</code> directory it's in. </p>

<blockquote>
  <p>In Sublime you can create a new folder by right clicking on the parent folder, in our case responsive-site/html/ and then select "New Folder...". Then the same to create a new file except click "New file...".</p>
</blockquote>

<p>In this file we'll copy the contents from the responsive-<em>base</em> version and paste into our new responsive-<em>site</em> file. <br>
With this file copied in we can take the slider block and move it down to under the <code>&lt;main&gt;</code> element.</p>

<p>Lines 12 to 17 should be:  </p>

<pre><code class="language-twig">{# slider #}
{% block content_slider %}
    {% if page.show_content_slider %}
        {{ page.content_slider }}
    {% endif %}
{% endblock %}
</code></pre>

<p>Which is inside the middle div/section of the page, but we want it to the side of the sidebar so if you cut this chunk out and paste onto what is now line 26, just above the <code>{% if page.show_content %}</code> area. <br>
Save the file and with our FTP sync setup previously it should send this file up to the server.</p>

<p><strong>Styling the layout</strong></p>

<p>The existing Impkids site has a nice outer design where the main column has a white background with a shadow over a light orange background. <br>
We can use css to recreate this in our responsive design. <br>
As mentioned above, we will be putting our CSS into the <code>css/site.css.twig</code> file in responsive-site. </p>

<p>The responsive-site directory comes with this file ready and left blank for you. </p>

<pre><code class="language-css">/* ----- Main outer theme ----- */
body {  
    /* light orange background */
    background-color: #FDC288;
}
/* the layout container is used for the main 3 sections of the page, the header, middle and footer */
.layout-container {
    /* We want the main content on a white background */
    background: #FFF;
    /* with a semi-transparent shadow to the sides */
    box-shadow: 0 20px 20px rgba(0, 0, 0, 0.3);

    /* Add some margin to reveal the box-shadow too */
    margin: 0 15px;
    /* and some padding so content inside the layout is not too close to the edge */
    padding: 0 15px;
}
</code></pre>

<p>This gives us the outer design, but lets also talk about the header design. <br>
Impkids logo image is a little unusual, usually the site's logo is uploaded via Admin > Site Setup, however for Impkids it's not and we don't want to upload it now as to not affect the live site in any way. <br>
Instead we will set the logo on the currently blank header-logo element in the header and size it like so:  </p>

<pre><code class="language-css">/* header logo */
.header-logo {
    background: url("/userfiles/impkids/images/IMPLOGO.png");
    position: absolute;
    width: 185px;
    height: 140px;
    left: 32px;
    top: -3px;
    z-index: 999;
    color: #FDC288;
}
</code></pre>

<p>This gives us our header logo image, and next we can move onto the navigation...</p>

<p>We want to move the navigation over to the side of the logo on larger screens and style it like the current site. </p>

<p>I won't go through all the css here but you can see we're moving the nav over (leaving space for our logo), making the nav top of the nav transparent by default and the sub links have a white background. <br>
Then the active link and hover links are large orange bubbles around white text. </p>

<p>The difference here is I only want to change this on larger screens, on the phone and small tablet size we want to use the default nav as it's optimised for touch. </p>

<p>We use media queries to change the display as the screen size increases. <br>
The default screen breakpoints we use are: 35.5em, 48em, 64em, 80em. <br>
A great example of this is in responsive-base/css/modules/pull.css</p>

<pre><code class="language-css">.pull-left { float: left; }
.pull-right { float: right; }

/* same sizes as defined here: http://purecss.io/grids/#pure-responsive-grids */
@media screen and (min-width: 35.5em) {
    .pull-left-sm { float: left; }
    .pull-right-sm { float: right; }
}
@media screen and (min-width: 48em) {
    .pull-left-md { float: left; }
    .pull-right-md { float: right; }
}
@media screen and (min-width: 64em) {
    .pull-left-lg { float: left; }
    .pull-right-lg { float: right; }
}
@media screen and (min-width: 80em) {
    .pull-left-xl { float: left; }
    .pull-right-xl { float: right; }
}
</code></pre>

<p>The above is from that pull.css file, it sets up default classes in css we can use in our html templates to pull elements to the left or right but maybe only at specific screen breakpoints. </p>

<p>It's worth exploring the css/modules/ directory in responsive-base as there are plenty files. </p>

<p>Back to this design though, our end navigation style looks like:  </p>

<pre><code class="language-css">@media screen and (min-width: 48em) {

    /* ----- nav ----- */
    #header .nav {
        left: 240px;
        bottom: 0px;
    }
    /* nav background to transparent*/
    #header .nav ul {
        background-color: transparent;
    }
    #header .nav ul ul {
        background-color: #FFF;
    }
    /* active link */
    #header .nav &gt; ul &gt; li:hover,
    #header .nav &gt; ul &gt; li.is-focused,
    #header .nav &gt; ul &gt; li.is-current {
        background-color: #F78F1E;
        border-radius: 10px;
    }
    #header .nav &gt; ul &gt; li:hover &gt; a,
    #header .nav &gt; ul &gt; li.is-focused &gt; a,
    #header .nav &gt; ul &gt; li.is-current &gt; a {
        color: #FFF;
    }

}
</code></pre>

<p>Now the outer and header styling is pretty close. <br>
There's still plenty for me to work on but I hope this helps you get started with your own designs. </p>

<p><strong>Cleaning up our work</strong></p>

<p>So far our CSS has all been added to our site.css.twig file, but we can actually separate it into multiple files. </p>

<p>e.g. we could take the outer "Main outer theme" part, the <code>body</code> and the <code>.layout-container</code> and put this into a <code>css/outer-layout.css</code> file, the same for the header styles into a <code>css/header.css</code> file.</p>

<p>Then back in the site.css.twig file you'll need to include the newly created files where the css used to be. We can do this with Twig so that we still end up with a single css file being sent to the browser e.g:  </p>

<pre><code class="language-twig">{{ source("css/outer-layout.css") }}
{{ source("css/header.css") }}
</code></pre>

<p>This part is up to you as it's your project. It's fine to leave all your style at first in the site.css.twig file, especially on a small project. But as this file grows you may want to look into doing this. </p>

<p>At this point we have a working responsive site, it's simple and though for my Impkids redesign I have much left to work on, this has just been a small dive into what's needed. The most important next step is to try out different designs, use your css skills and you have pretty much free reign over the style of the site. <br>
Feel free to contact me about any questions you may have on this or on anything to help improve this post for future readers, thank you.</p>

<h2 id="nextsteps">Next steps</h2>

<p>Where can you go from here?</p>

<ul>
<li>Read up on <a href="http://www.smashingmagazine.com/2011/01/guidelines-for-responsive-web-design/">Responsive design</a> (css, designing and workflow ideas)</li>
<li>Browser testing (e.g. using <a href="http://www.browserstack.com/">browserstack</a> or emulators or real devices)</li>
<li><a href="http://blog.teamtreehouse.com/git-for-designers-part-1">Version control</a>, it's useful to have a history of your changes
e.g. After downloading the files in step 6 you could use git to start a history of the files.</li>
</ul>]]></content:encoded></item></channel></rss>