<?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[Lee Theobald]]></title><description><![CDATA[Thoughts, stories and ideas.]]></description><link>http://www.ltheobald.co.uk/</link><generator>Ghost 0.9</generator><lastBuildDate>Mon, 15 Aug 2016 11:47:44 GMT</lastBuildDate><atom:link href="http://www.ltheobald.co.uk/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Doing Grids Right - Lose The Classes]]></title><description><![CDATA[<p>This one popped up at work the other day and it surprised me how many of the web developers in our company didn't know the best way of using a CSS based grid.</p>

<h2 id="butfirstahistorylesson">But First A History Lesson</h2>

<p>Back when the everyone was first creating websites, layouts were tricky. You'd</p>]]></description><link>http://www.ltheobald.co.uk/doing-grids-right-lose-the-classes/</link><guid isPermaLink="false">796cdfeb-a6f3-4192-8e64-8088e23f6902</guid><dc:creator><![CDATA[Lee Theobald]]></dc:creator><pubDate>Thu, 11 Dec 2014 21:44:26 GMT</pubDate><media:content url="http://www.ltheobald.co.uk/content/images/2014/12/2425718415_44589fd55a_o.jpg" medium="image"/><content:encoded><![CDATA[<img src="http://www.ltheobald.co.uk/content/images/2014/12/2425718415_44589fd55a_o.jpg" alt="Doing Grids Right - Lose The Classes"><p>This one popped up at work the other day and it surprised me how many of the web developers in our company didn't know the best way of using a CSS based grid.</p>

<h2 id="butfirstahistorylesson">But First A History Lesson</h2>

<p>Back when the everyone was first creating websites, layouts were tricky. You'd see a lot of things like the below:</p>

<pre><code>&lt;p id="header"&gt;
  &lt;span style="width: 25%;"&gt;Left&lt;/span&gt;
  &lt;span style="width: 75%;"&gt;Right&lt;/span&gt;
&lt;/p&gt;
</code></pre>

<p>Then people like <a href="https://twitter.com/zeldman">Jeffrey Zeldman</a> and <a href="https://twitter.com/mezzoblue">Dave Shea</a> came along and showed us the power of CSS &amp; how code like this was a bad idea. If you wanted to change the proportions of that 'header', you'd have to find every instance of that code in your website &amp; change it. We learnt to separate our presentation from our markup.</p>

<h2 id="backtothepresent">Back To The Present</h2>

<p>Back to the current day and CSS frameworks like <a href="http://www.ltheobald.co.uk/doing-grids-right-lose-the-classes/getbootstrap.com">Bootstrap</a> &amp; <a href="http://foundation.zurb.com">Foundation</a> have made it even easier to craft a beautiful website with little effort. Now all you have to do is to add a few CSS classes &amp; you get your lovely layouts:</p>

<pre><code>&lt;div class="row"&gt;
  &lt;div class="col-md-3"&gt;Left&lt;/div&gt;
  &lt;div class="col-md-9"&gt;Right&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>The above code is very similar to the ones they show in the Bootstrap documentation. Because of this, it's become common to see that code repeated all over the web.</p>

<p>But take a look at it again. In our first example, we said that putting the width's inline was bad as we'd have to make a lot of changes when we wanted to change an item's layout. Is this code any better? Sure it doesn't have width's inline but as soon as you decided that you want a 50/50 split on that row, you only have one choice - <strong>change the HTML everywhere that code occurs</strong>.</p>

<h2 id="csspreprocessorstotherescue">CSS Preprocessors To The Rescue</h2>

<p>And here's what a CSS preprocessor comes in and really helps out. I won't go over exactly what a preprocessor is as that's been covered in a lot of different posts (<a href="http://webdesign.tutsplus.com/articles/get-into-less-the-programmable-stylesheet-language--webdesign-5216">here's a tutorial for Less</a> and <a href="http://code.tutsplus.com/series/mastering-sass--net-19077">here's one for Sass</a>).</p>

<p>So let's take another look at that HTML from the Bootstrap code. Remove the non semantic classes, add one of your own &amp; you simply end up with:</p>

<pre><code>&lt;div class="featurebox"&gt;
  &lt;p&gt;Left content&lt;/p&gt;
  &lt;p&gt;Right content&lt;/p&gt;
&lt;/div&gt;
</code></pre>

<p>Much simpler. And here's the LESS file for this:</p>

<pre><code>div.featurebox {
  .row();

  p {
    .make-md-col(9);

    &amp;:first-child {
      .make-md-col(3);
    }
  }
}
</code></pre>

<p>Now when I want to change the width's of the "featurebox" element I have created, all I do is change the one CSS file that's defined in &amp; not the 10 places it may be used in my site.</p>

<h2 id="makesresponsivedesignsnicertoo">Makes Responsive Designs Nicer Too</h2>

<p>And to solidify my point, imagine the earlier code if you were attempting a responsive design:</p>

<pre><code>&lt;div class="row"&gt;
  &lt;div class="col-xs-12 col-sm-12 col-md-3 col-lg-6"&gt;Left&lt;/div&gt;
  &lt;div class="col-xs-12 col-sm-12 col-md-9 col-lg-6"&gt;Right&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>That's starting to get really messy &amp; it's only 2 elements.  So what would the tidied HTML &amp; preprocessed CSS look like here? Well the HTML is below:</p>

<pre><code>&lt;div class="featurebox"&gt;
  &lt;p&gt;Left content&lt;/p&gt;
  &lt;p&gt;Right content&lt;/p&gt;
&lt;/div&gt;
</code></pre>

<p>Yep, it's exactly the same as before &amp; that's the point. If you want to make layout changes, you really shouldn't have to edit your HTML. It can all be done in that CSS file:</p>

<pre><code>div.featurebox {
  .row();

  p {
    .make-xs-col(12);
    .make-sm-col(12);
    .make-md-col(9);
    .make-lg-col(6);

    &amp;:first-child {
      .make-xs-col(12);
      .make-sm-col(12);
      .make-md-col(3);
      .make-lg-col(6);
    }
  }
}
</code></pre>

<p>So please, take that little bit of extra time &amp; use your CSS frameworks responsibly!</p>]]></content:encoded></item><item><title><![CDATA[On Conference Side Events]]></title><description><![CDATA[<p>Last week I was in Cardiff for <a href="http://theweb.is">The Web Is</a>. There were a lot of great talks and a good number of them really struck a chord with me. It's certainly stirred enough in my head to get me to finally start writing!</p>

<p>One of the talks was from first</p>]]></description><link>http://www.ltheobald.co.uk/on-conference-side-events/</link><guid isPermaLink="false">64e55cbd-ccf8-40a1-b0c8-8e23864cc377</guid><dc:creator><![CDATA[Lee Theobald]]></dc:creator><pubDate>Tue, 04 Nov 2014 22:33:24 GMT</pubDate><media:content url="http://www.ltheobald.co.uk/content/images/2014/11/15656109356_a61f86bfb9_k.jpg" medium="image"/><content:encoded><![CDATA[<img src="http://www.ltheobald.co.uk/content/images/2014/11/15656109356_a61f86bfb9_k.jpg" alt="On Conference Side Events"><p>Last week I was in Cardiff for <a href="http://theweb.is">The Web Is</a>. There were a lot of great talks and a good number of them really struck a chord with me. It's certainly stirred enough in my head to get me to finally start writing!</p>

<p>One of the talks was from first time speaker <a href="https://twitter.com/benjaminhollway">Benjamin Hollway</a>, a 16 year old web developer. Benjamin's talk, <a href="http://nothingrandom.com/says/thewebis/young">The Web Is Young</a> talked about troubles younger people may have when trying to get into our industry. One thing he touched on was the social aspects of conferences &amp; how he often has difficulty joining in. These side events are often in pubs or bars and for someone like Benjamin, who is two years under the UK drinking age, this causes an unrequired barrier for him interacting with his peers.</p>

<p>I'm double Benjamin's age so that is not an issue for me. But I also find these side events trickier to attend than they need to be because of the choice to hold them in pubs and bars.</p>

<p>As an <a href="http://en.wikipedia.org/wiki/Retinitis_pigmentosa">RP</a> sufferer, low light situations are not my friend. In fact, to pick an example from the week, upon walking into one of the talks <a href="https://twitter.com/craiginwales">Craig</a>, one of the event's organisers, tried to hand me a <a href="http://t.co/m7sLuNGfqy">small device</a>. But I simply didn't notice him because of the typically low theatre lighting and almost blanked him (Sorry Craig!). This is the kind of trouble I have in these side events too. Pubs &amp; bars tend to be dully lit &amp; reasonably loud. For me to walk into one of these unfamiliar places, find some people who I have potentially never met before &amp; strike up a conversation is a lot trickier than it needs to be.</p>

<p>Now they did a great job at The Web Is of putting on some side events that didn't involve sitting in the dark drinking! There was a games night, a music night &amp; a number of fitness related events on Saturday morning too. But conferences that do these kind of events are definitely in the minority.</p>

<p>If any conference organisers are out there reading this, why not consider some of the following suggestions for social events at your conference:</p>

<h4 id="dontmakethepubyourfirstsocialevent">Don't Make The Pub Your First Social Event</h4>

<p>Why does your primary social event have to be in the pub? I'm all for a pub social but don't make it the #1 event. It doesn't send a great message to those that can't/don't drink or are not a fan of the atmosphere of bars.</p>

<h4 id="dosomethinginthemornings">Do Something In The Mornings</h4>

<p>Your conference doesn't start till 9 or 10 &amp; your attendees will need to get breakfast somewhere. Why not organise a popular restaurant for people to meet at for a pre-event meetup? Runs, bike rides &amp; other early morning fitness events are also great fun.</p>

<h4 id="lookforalternativevenues">Look For Alternative Venues</h4>

<p>Pubs are often picked for the social event because they are the easy option. But there's a lot of other venues that will be happy to host your event: theatres, cafes, office buildings of local large companies, university &amp; college buildings. There's more choice out there than you think.</p>

<p><em><a href="https://www.flickr.com/photos/marcdroberts/15656109356/in/photolist-pRtDRW-pB9Cr6-pBc7i3-pRtGXq-6z9up1-6Ew2e8-pRtCAE-oWMWeL-pBcZcB-oWQYm4-pRtBV1-pTz9EK-oWMBew-pBf5nf-pTzdwn-pRtLmu-pBf7nN-pTyWae-pTyWex-pBc2jq-pBc3P9-pBc2yo-pB9y9P-oWQQqp-pTzjZx-pB9x54-pBf7B5-pBd6qD-pBf7Ts-pTzjE4-pB9AHg-pBd6zr-pTHncj-pBd6Hx-pTps9D-pTHrJA-6C5kPm-72ULU9-6ETRG1-6b6pKM-6ELuE9-6GQEP7-6W1aSk-pBBtae">Cover image by Marc Roberts</a></em></p>]]></content:encoded></item></channel></rss>