Stephanie Hobson https://stephaniehobson.ca/ Recent content on Stephanie Hobson Hugo -- gohugo.io en-ca Fri, 06 Jan 2023 22:17:00 +0000 Dictation is turned off by screen time https://stephaniehobson.ca/posts/dictation-is-turned-off-by-screen-time/ Fri, 06 Jan 2023 22:17:00 +0000 https://stephaniehobson.ca/posts/dictation-is-turned-off-by-screen-time/ <p>I recently ran into a problem where I could not enable dictation on my MacOS laptop. In the system settings the toggle was grayed out and could not be flipped. The message beneath it was &ldquo;Dictation is turned off by Screen Time.&rdquo;</p> <figure><img src="dictation.png" alt="Screen shot of the error appearing in the systems settings."/> </figure> <p>I&rsquo;m not bad at computers but I could not figure out where to re-enable it. It was not under <em>App Limits</em>. It was not under <em>Content &amp; Privacy</em>. I could not add it to <em>Always Allowed</em>. Searching the system settings for &ldquo;dictation&rdquo; turned up two options, neither of which did what I needed.</p> <p>Out of desperation I posted about it on Twitter and Mastodon. Of course I found it 5 second later.</p> <p>On MacOS Ventura it&rsquo;s <em>System Settings</em> &gt; <em>Screen Time</em> &gt; <em>Content &amp; Privacy</em> &gt; <em>App Restrictions</em> &gt; <em>Allow Siri &amp; Dictation</em>.</p> <figure><img src="allow-dictation.png" alt="Screen shot of App Restrictions settings."/> </figure> <p>Happy dictating.</p> Using Tinypng to optimize images from the command line https://stephaniehobson.ca/posts/tinypng-optimize-images-from-command-line/ Tue, 30 Apr 2019 16:36:56 -0500 https://stephaniehobson.ca/posts/tinypng-optimize-images-from-command-line/ <p>Our team has identified image optimization as one of the more time consuming and often forgotten steps of our current process. In the long run we want to automate it using a git pre-commit hook. As the first step to this I&rsquo;ve got PNG and JPG optimization working manually using <a href="https://tinypng.com/">TinyPNG</a> from the command line:</p> <pre tabindex="0"><code>git diff --diff-filter=ACM --name-only HEAD | grep &#34;.png\|.jpg&#34; | xargs tinypng </code></pre><p>To set this up:</p> <ol> <li><a href="https://tinypng.com/developers">Get a TinyPNG API key</a>.</li> <li>Save the API key in a file named <code>.tinypng</code> in your home directory.</li> <li>Install the <a href="https://www.npmjs.com/package/tinypng-cli">npm TinyPNG CLI</a>. Because it&rsquo;s not part of our site yet I installed it globally: <pre tabindex="0"><code>npm install -g tinypng-cli </code></pre></li> <li>Add the files you want to optimize to Git&rsquo;s staging area. (<code>git add *</code> will add all the files you&rsquo;ve edited)</li> <li>Run <code>git diff --diff-filter=ACM --name-only HEAD | grep &quot;.png\|.jpg&quot; | xargs tinypng</code>.</li> <li>Add add the new modified files to your Git staging area before committing.</li> </ol> <p>What it&rsquo;s doing:</p> <dl> <dt><code>git diff</code></dt> <dd>Telling Git we want to a list of differences between two things</dd> <dt><code>--diff-filter=ACM</code></dt> <dd>Filtering what we want to compare to include only Additions, Changes, and Modifications</dd> <dt><code>--name-only</code></dt> <dd>Asking for just the file names instead of the full output.</dd> <dt><code>HEAD</code></dt> <dd>One of the two things we&rsquo;re comparing is the files in the staging area. Specifying <code>HEAD</code> here says to compare them to the files in the most recent commit.</dd> <dt><code>|</code></dt> <dd>This is a &ldquo;pipe&rdquo;, it passes the results of the Git diff to the next command.</dd> <dt><code>grep</code></dt> <dd>Grep is a command line search tool.</dd> <dt><code>&quot;.png\|.jpg&quot;</code></dt> <dd>I&rsquo;m using grep to find only the files with .png or .jpg file extensions.</dd> <dt><code>|</code></dt> <dd>Another pipe to pass our reduced list of files on to the next step.</dd> <dt><code>xargs</code></dt> <dd>This is the results of the grep. (Why it goes here instead of after the next command I do not know.)</dd> <dt><code>tinypng</code></dt> <dd>Finally we get tinypng to do its magic. The compressed files will replace the originals.</dd> </dl> How to make a chart of your users' window sizes https://stephaniehobson.ca/posts/how-to-make-a-chart-of-your-users-window-sizes/ Thu, 23 Aug 2018 07:58:00 +0000 https://stephaniehobson.ca/posts/how-to-make-a-chart-of-your-users-window-sizes/ <p><em>This article was originally published on the <a href="https://mozilla.github.io/meao/2018/01/24/browser-sizes/">Mozilla Marketing Engineering &amp; Operations blog</a>.</em></p> <p>In preparation for the MDN redesign I examined our analytics to get an idea of how wide our users&rsquo; browser windows were. I wanted window widths, not screen sizes and I thought a chart would tell a more compelling story than a table.</p> <p>Here&rsquo;s the chart I made:</p> <figure><img src="browser-sizes.png" alt="Chart of MDN window widths showing spikes at 1350 and 1900 pixels and very little between 420 and 930 pixels."/> </figure> <p>I found this view useful because it shows us &ldquo;clumps&rdquo; of window sizes.</p> <h2 id="how-to-make-a-chart-of-browser-window-widths">How to make a chart of browser window widths</h2> <h3 id="the-basic-idea-is">The basic idea is:</h3> <ol> <li>Create and export a Custom Report for Browser Size.</li> <li>Filter the Browser Size to just include widths.</li> <li>Aggregate the number of users for each width.</li> <li>Make a chart.</li> </ol> <h3 id="working-with-google-analytics-and-google-sheets-the-specific-steps-i-used-were">Working with Google Analytics and Google Sheets the specific steps I used were:</h3> <ol> <li>Create a custom report for browser sizes. <ol> <li><strong>Customization</strong> &gt; <strong>Custom Reports</strong> &gt; <strong>New Custom Report</strong></li> <li>Set the <strong>Metric Group</strong> to <code>Users</code></li> <li>Set <strong>Dimension Drilldowns</strong> to <code>Browser Size</code></li> <li>Save</li> </ol> </li> <li>View the custom report.</li> <li>Set <strong>Show rows:</strong> to <code>5000</code>.</li> <li>Export to Google Sheets.</li> <li>Delete the extra stuff from the top and bottom of the export, you just want two columns: <strong>Browser Size</strong>, and <strong>Users</strong>.</li> <li>Create a new column <code>C</code> called <strong>Width</strong>. Add this regex to it and fill down: <code>=REGEXEXTRACT(A2, &quot;^[0-9]+&quot;)</code>. This gives you a column with just the width part of the browser size.</li> <li>Create a new column <code>D</code> called <strong>Unique List</strong>. Add this formula to it (you don&rsquo;t need to fill down): <code>=UNIQUE(C2:C5001)</code>.This gives you a list of widths with no repeating values. That means 1900x950 and 1900x970 will be treated the same in our final chart.</li> <li>Create a new column <code>E</code> called <strong>Conditional Sums</strong>. Add this formula and fill down the height of your Unique List: <code>=SUMIF(C$2:C$5001,D2,B$2:B$5000)</code>.</li> <li>Copy the <strong>Unique List</strong> and <strong>Conditional Sums</strong> columns.</li> <li>Create a new sheet in your document.</li> <li>Use <strong>Edit</strong> &gt; <strong>Paste special</strong> &gt; <strong>Paste values only</strong> to paste only the computed values of these columns.</li> <li>Rename <strong>Unique List</strong> to <strong>Width</strong> and <strong>Conditional Sums</strong> to <strong>Total Users</strong>.</li> <li>Find the <em>(not set)</em> row and delete it.</li> <li>Make sure both columns are being treated as numbers (a hint this is happening properly is that they are right aligned). If you have headings on the columns make sure they&rsquo;re frozen (<strong>View</strong> &gt; <strong>Freeze</strong> &gt; <strong>1 row</strong>).</li> <li>Sort on <strong>Width</strong> from A→Z.</li> <li>Select both columns and create a chart (<strong>Insert</strong> &gt; <strong>Chart</strong>). (I made a &ldquo;Stepped area chart&rdquo;)</li> <li>Set <strong>Width</strong> as the X-axis.</li> <li>Done!</li> </ol> <hr> <p>This answered a question I&rsquo;ve been curious about for ages: <strong>Do people with large monitors use MDN full screen?</strong></p> <p>About 40% of our users have a screen resolution of 1900px or wider and 25% of our users use MDN at 1900px or wider.</p> Surprise Emergency Site Migration https://stephaniehobson.ca/posts/surprise-emergency-site-migration/ Wed, 22 Aug 2018 00:36:00 +0000 https://stephaniehobson.ca/posts/surprise-emergency-site-migration/ <p>A small tweak to my WordPress config went sideways and, long story short, now my blog is hosted with Hugo on GitHub pages over https&hellip; Oops?</p> <p>I wasn&rsquo;t planning to migrate just yet so apologies for the RSS weirdness.</p> How we rebuilt the viewsourceconf.org website https://stephaniehobson.ca/posts/how-we-rebuilt-the-viewsourceconf-org-website/ Tue, 31 Oct 2017 21:19:14 +0000 https://stephaniehobson.ca/posts/how-we-rebuilt-the-viewsourceconf-org-website/ <p><em>This article was originally published on Mozilla’s <a href="https://hacks.mozilla.org/2017/10/how-we-rebuilt-the-viewsourceconf-org-website/">Hacks Blog</a>.</em></p> <p>As a front-end developer at Mozilla, I end up working on big sites that have been around for a long time. There are a lot of interesting challenges when working with legacy code at a large scale, but rebuilding from scratch usually isn’t an option.</p> <p>The <a href="http://viewsourceconf.org/">View Source Conference</a> website, on the other hand, is a small site. So when we decided to move away from WordPress, we had the chance to start fresh.</p> <p>Here are a few highlights of the architectural decisions we made to make the site faster, more secure, and more reliable.</p> <h2 id="a-static-site">A Static Site</h2> <p>When a user requests a page from a CMS (content management system) like Wordpress the server puts it together from databases and templates. This takes the server a small amount of time. When a site is built on request like this we call it a &ldquo;dynamic&rdquo; website.</p> <p>When a user requests a page from a static site the server only has to find and serve one file. It’s faster and takes fewer resources. We used a <a href="https://www.sitepoint.com/7-reasons-use-static-site-generator/">static site generator</a> to generate our files before transferring them to the server.</p> <p>Static files are also easier to copy than dynamic sites, this means we can copy our static site to different CDNs (content delivery networks) around the world. Getting our content closer to our users is a very effective way to reduce <a href="https://www.igvita.com/2012/07/19/latency-the-new-web-performance-bottleneck/">latency</a> which is one of the biggest hurdles to delivering a site fast.</p> <h2 id="offline-first">Offline First</h2> <p>A <a href="https://developer.mozilla.org/docs/Web/API/Service_Worker_API/Using_Service_Workers">service worker</a> is JavaScript that runs in a browser but not as part of a page. The most common use for service workers is to watch network requests and respond instead of the server.</p> <p>I wanted to be sure the conference attendees would have access to the event schedule, even if they didn’t have wifi. So, when a user arrives on the site, browsers that support service workers automatically cache the conference schedule.</p> <p>If the user returns to the site without a network connection the service worker will reply to the request with the cached schedule.</p> <p>I am very grateful for the documentation published by <a href="https://www.theguardian.com/info/developer-blog/2015/nov/04/building-an-offline-page-for-theguardiancom">The Guardian</a>, <a href="https://www.theguardian.com/info/developer-blog/2015/nov/04/building-an-offline-page-for-theguardiancom">Jeremy Keith</a>, and others who are already using Service Workers.</p> <h2 id="mobile-first">Mobile First</h2> <p>When responsive web design first became the norm, the industry standard was to serve the full desktop site to all browsers with a bunch of extra code telling mobile browsers which pieces to remove to make the simplified mobile version. With the spread of mobile came the <a href="https://www.lukew.com/ff/entry.asp?1137">Mobile First</a> development approach. Mobile first delivers the content and code for the mobile version of a site first and then the larger more powerful desktop computers do the work of creating a better large screen experience.</p> <p>The View Source Conf site starts as a minimal mobile-friendly version. Then <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries">media queries in CSS</a> and <a href="https://hacks.mozilla.org/2012/06/using-window-matchmedia-to-do-media-queries-in-javascript/">media queries in JavaScript</a> add more complicated layout instructions for larger screens.</p> <h2 id="svg">SVG</h2> <p>I used inline <a href="https://developer.mozilla.org/en-US/docs/Web/SVG">SVG</a>s for the logo and icons. They look crisper on retina screens and, because they’re inline, don’t require any extra assets to download. Inlining also meant that I could <a href="https://css-tricks.com/cascading-svg-fill-color/">change the logo’s colour</a> in our print styles. It was my first time <a href="https://www.sitepoint.com/tips-accessible-svg/">creating accessible SVGs</a>.</p> <h2 id="no-script">No Script</h2> <p>All the content and functionality on the View Source site works with JavaScript disabled. Instead of sending shims and polyfills to older browsers to make them handle newer JavaScript features, we support those browsers by telling them not to load the JavaScript at all.</p> <p>This meant we could write modern JavaScript! It also simplified testing. Less capable browsers just get functional, readable content, with no chance for odd JavaScript errors.</p> <p>This isn’t a new idea, it’s <a href="https://alistapart.com/article/understandingprogressiveenhancement">progressive enhancement</a> combined with the <a href="http://responsivenews.co.uk/post/18948466399/cutting-the-mustard">BBC News’ “Cut the Mustard” test</a>.</p> <h2 id="https">HTTPS</h2> <p><a href="https://developers.google.com/web/fundamentals/security/encrypt-in-transit/why-https">HTTPS protects the privacy and security of your users</a> and with <a href="https://letsencrypt.org/">Let’s Encrypt</a> it’s free. You can tell browsers to only load your site over HTTPS with the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security"><code>Strict-Transport-Security</code> header</a>.</p> <h2 id="do-not-track">Do Not Track</h2> <p>We use Google Analytics to measure site traffic and try to improve our conversion rates but we respect the privacy of users visiting with <a href="https://en.wikipedia.org/wiki/Do_Not_Track">Do Not Track</a> enabled. By <a href="http://schalkneethling.github.io/blog/2015/11/06/respect-user-choice-do-not-track/">detecting Do Not Track settings</a> we can avoid serving them the Google Analytics file. If a user has not set Do Not Track but has an ad blocker installed all our code runs without requiring Google Analytics to initialize.</p> <h2 id="view-source">View Source</h2> <p>Hear industry leaders speak about topics like web performance, security, reliability, CSS grids and more at the <a href="https://viewsourceconf.org/london-2017/">View Source Conference in London</a> October 27, 2017. See the <a href="https://viewsourceconf.org/london-2017/#schedule">full schedule</a>! Or <a href="https://viewsourceconf.org/berlin-2016/">watch videos of last year&rsquo;s talks</a>.</p> Flipping Tables at CSSDevConf https://stephaniehobson.ca/posts/flipping-tables-at-cssdevconf/ Tue, 10 Oct 2017 14:50:03 +0000 https://stephaniehobson.ca/posts/flipping-tables-at-cssdevconf/ <p>Here are my slides for Flipping Tables: Displaying Data on Small Screens which I had the pleasure of giving at <a href="http://2017.cssdevconf.com/">CSS Dev Conf</a>.</p> <div class="slideshare"> <div class="slideshare-slides"> <iframe src="https://www.slideshare.net/slideshow/embed_code/key/f9ppa6m4uNRzsR" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen> </iframe> </div> <div class="slideshare-credit"> <strong> <a href="https://www.slideshare.net/stephaniehobson/flipping-tables-displaying-data-on-small-screens-80633870" target="_blank">Flipping Tables: Displaying Data on Small Screens</a> </strong> from <strong><a href="https://www.slideshare.net/stephaniehobson" target="_blank">Stephanie Hobson</a></strong> </div> </div> <h2 id="links-i-mentioned-in-my-talk">Links I mentioned in my talk</h2> <ul> <li><a href="https://v6.robweychert.com/blog/2017/10/robtober/">Rob Weychert&rsquo;s horror films schedule</a></li> <li><a href="https://www.behance.net/gallery/Designing-Effective-Data-Tables/885004">Designing Effective Data Tables</a></li> <li><a href="http://understandinggraphics.com/design/data-table-design/">Guidelines for Designing Tables</a></li> <li><a href="https://www.darkhorseanalytics.com/blog/clear-off-the-table/">Clear Off the Table</a></li> <li><a href="https://github.com/mdn/browser-compat-data">MDN&rsquo;s browser compat data in JSON</a></li> </ul> Writing for Every Reader https://stephaniehobson.ca/posts/writing-for-every-reader/ Sun, 08 Oct 2017 14:14:11 +0000 https://stephaniehobson.ca/posts/writing-for-every-reader/ <p>I <a href="http://conf.a11yto.com/talks#writingForEveryReader">recently spoke at #a11yTOConf</a>, a conference by the organizers of the regular <a href="https://www.meetup.com/a11yTO/">a11yTO meet-up</a>. The organizers put together a great line up of speakers. It was the first #a11yTOConf but I hope it won&rsquo;t be the last!</p> <div class="slideshare"> <div class="slideshare-slides"> <iframe src="https://www.slideshare.net/slideshow/embed_code/key/ozEG7wyJ5BvL00" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen> </iframe> </div> <div class="slideshare-credit"> <strong> <a href="https://www.slideshare.net/stephaniehobson/writing-for-every-reader" target="_blank">Writing for Every Reader</a> </strong> from <strong><a href="https://www.slideshare.net/stephaniehobson" target="_blank">Stephanie Hobson</a></strong> </div> </div> <p>Here are <a href="https://www.slideshare.net/stephaniehobson/writing-for-every-reader/">my slides for Writing for Every Reader</a>.</p> <h2 id="resources-i-mentioned">Resources I mentioned:</h2> <ul> <li><a href="http://www.hemingwayapp.com/">Hemingway App</a>, the app that helps improve the readability of your content.</li> <li><a href="https://beelinereader.com/">BeeLine Reader</a>, the browser plugin for dyslexics.</li> </ul> <h2 id="articles-that-were-helpful-to-me">Articles that were helpful to me:</h2> <ul> <li><a href="http://webaim.org/articles/cognitive/">Cognitive Disabilities</a>, an introduction by WebAIM.</li> <li><a href="http://csskarma.com/blog/dyslexia-typography/">Dyslexia and Typography</a></li> <li><a href="https://axesslab.com/fonts-dont-matter/">Fonts don&rsquo;t matter</a></li> <li><a href="https://www.nngroup.com/articles/chunking/">How Chunking Helps Content Processing</a></li> <li><a href="https://www.nngroup.com/articles/legibility-readability-comprehension/">Legibility, Readability, and Comprehension: Making Users Read Your Words</a></li> <li><a href="https://github.com/UKHomeOffice/posters">Accessibility posters</a> by the UK Home Office.</li> </ul> <h2 id="more-on-accessibility">More on accessibility:</h2> <ul> <li><a href="http://adrianroselli.com/2017/06/slides-from-wordcamp-europe.html">Selfish Accessibility</a> by Adrian Roselli got mentioned in a few different talks. It&rsquo;s well worth watching.</li> </ul> The MDN Redesign “Behind the Scenes” https://stephaniehobson.ca/posts/the-mdn-redesign-behind-the-scenes/ Tue, 01 Aug 2017 19:34:47 +0000 https://stephaniehobson.ca/posts/the-mdn-redesign-behind-the-scenes/ <p><em>This article was originally published on Mozilla&rsquo;s <a href="https://hacks.mozilla.org/2017/07/the-mdn-redesign-behind-the-scenes/">Hacks Blog</a>.</em></p> <p><a href="https://github.com/mozilla/kuma">Kuma</a>, the code that produces the <a href="https://developer.mozilla.org/en-US/">MDN</a> site, is a weird mix of the old and the new. <a href="https://developer.mozilla.org/en-US/docs/MDN_at_ten">MDN turned ten</a> in 2015 and there’s still code and content around from those very first days. When I sat down to start coding the current redesign, the first thing I did was <a href="https://github.com/mozilla/kuma/pull/4254">remove the last few traces of the last redesign</a>. In contrast, we have a cutting-edge audience: 92% of our users have a browser with CSS grid support! <a href="https://mozilla.github.io/meao/2017/06/26/http2/">We enabled http2</a>, and 98% of our users have seen benefits from that.</p> <p>One of the ways we deal with old code in kuma is with the campsite rule: <em>Always leave your campsite better than you found it</em>. A redesign touches a lot of files, and this was a great opportunity to clean up and refactor — at least until the deadline started getting close.</p> <p>A redesign is also a great time to change stuff you’re afraid of breaking. People are more understanding of you working the bugs out of something new than breaking something that’s worked for years. I removed 640 lines of stale code during the redesign. (And if I broke a six-year-old XPCOM tutorial you use daily by removing the custom list-style-type, please <a href="https://bugzilla.mozilla.org/enter_bug.cgi?format=guided#h=dupes%7CMozilla%20Developer%20Network%7C">file a bug</a>!)</p> <h2 id="one-website-with-two-looks">One website with two looks</h2> <p>Rather than working on the CSS for the redesign in a separate “redesign” folder, we duplicated all the files and added “-old” to the file name of the old files, which means that all of our redesign work is happening in the “official” files. This preserves the git history and means we don’t have to move anything around after launch. Once we’re happy with the code, we can delete the “-old” files with confidence.</p> <p>To serve the new styles to our beta testers and the “-old” ones to everyone else, we use <a href="https://github.com/jsocol/django-waffle">Django Waffle</a>. Waffle can also be used to serve different content but because there’s a strong separation of presentation and content on MDN, we’ve made very few changes to the HTML.</p> <h2 id="bugs-our-beta-testers-found">Bugs our beta testers found</h2> <p>MDN is <em>huge</em>, and we can’t test every page in every locale. We’re really lucky to have active beta testers. :) Some of the biggest things they turned up for us were:</p> <h3 id="highlighting">Highlighting</h3> <figure><img src="vi.png" alt="Problems with Zilla Highlight in Vietnamese and when there are inline code examples."/> </figure> <p>We started out by replicating Mozilla’s brand “highlight” effect by using the Zilla Slab Highlight font, but we abandoned that pretty quickly when problems turned up in many <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1375831">of</a> <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1375917">our</a> <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1375879">locales</a> and when used in combination with inline code.</p> <p>The current approach puts a full-width black background on h3 and h4 headings by default, and then some JavaScript runs to add a <code>&amp;lt;span&amp;gt;</code> tag so that the black background hugs the heading text. Progressive enhancement at work.</p> <p>We went back and forth about this for a while, wondering if the JavaScript and extra <code>&amp;lt;span&amp;gt;</code> was worth the effort. But we stuck with it because it makes the h3 and h4 headings much easier to spot when scanning the page.</p> <h3 id="whats-taiwanese-for-slab-serif">What’s Taiwanese for Slab Serif?</h3> <figure><img src="taiwanese.png" alt="Showing the difference between Zilla&amp;#039;s thick strokes and the thin strokes of Taiwanese."/> </figure> <p>Previously we used Open Sans as our heading text. With the redesign, we switched to Zilla Slab. Open Sans was thin and an average height for a font. It didn’t look out of place next to the system fallbacks for Chinese or Japanese characters.</p> <p>Zilla is big and thick, and we started getting feedback about the contrast with these system fallbacks. Additionally, the character set for Zilla is European Latin only at the moment, so Vietnamese, which uses Latin characters plus a couple Latin characters not used in Europe, displayed <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1379259">font fallbacks in the middles of words</a>.</p> <p>To address both these problems, we implemented a system that allowed us to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1379259">override the site fonts on a per-locale basis</a>.</p> <h3 id="contrast">Contrast</h3> <p>We received many complaints about the old design’s low-contrast display. We went a bit too far the other way with this design and received complaints about the high contrast. We’ve toned it down to the ever-popular <code>#333</code> now.</p> <h2 id="whats-next">What’s next</h2> <p>We’re moving on from this to make specific improvements to the article pages:</p> <ul> <li>Putting code samples high on the page; our hard-working writers and volunteers are doing this, one page at a time.</li> <li>A better approach to readable line-lengths and wide code examples, inspired by the Hacks Blog theme.</li> <li>Compatibility tables that display desktop and mobile data side by side.</li> <li>Code samples you can experiment with in the page.</li> </ul> <h2 id="who-is-we">Who is “we”?</h2> <p>The MDN dev team is:</p> <ul> <li><strong>Stephanie Hobson</strong>, me, CSS-Pre-Pre-Processor</li> <li><strong>Schalk Neethling</strong>, who reviewed each of my 30+ pull requests in ALL THE BROWSERS, sometimes multiple times</li> <li><strong>John Whitlock</strong>, who did the awesome <a href="https://github.com/mozilla/kuma/pull/4303#issue-241394205">locale fallbacks</a></li> <li><strong>Ryan Johnson</strong>, who always asks “Why not?” when John and I say things can’t be done.</li> </ul> <p>We blog sporadically on the <a href="https://mozilla.github.io/meao/2017/07/06/kuma-report/">Mozilla Marketing Engineering &amp; Operations blog</a>.</p> <p>You should also read this blog post by our Product Manager, Kadir Topal, about <a href="https://blog.mozilla.org/opendesign/future-mdn-focus-web-docs/">The Future of MDN</a>.</p> HTTP/2 on MDN https://stephaniehobson.ca/posts/http2-on-mdn/ Mon, 10 Jul 2017 12:46:34 +0000 https://stephaniehobson.ca/posts/http2-on-mdn/ <p><em>This article was originally published on the <a href="https://mozilla.github.io/meao/2017/06/26/http2/">Mozilla Marketing Engineering &amp; Operations blog</a>.</em></p> <p>We enabled HTTP/2 on MDN&rsquo;s CDN.</p> <p>We didn&rsquo;t do anything to optimize for HTTP/2, we just enabled it.</p> <p>We&rsquo;re seeing performance improvements.</p> <h2 id="you-dont-have-to-get-ready-before-you-start-using-http2">You don&rsquo;t have to get ready before you start using HTTP/2</h2> <p>While doing research to see if turning it on without doing any optimizations was a good idea I read things like:</p> <blockquote> <p>&ldquo;It also means that all of those HTTP1 performance techniques are harmful. They will make a HTTP2 website slower, not faster - don&rsquo;t use them.&rdquo; - <a href="https://mattwilcox.net/web-development/http2-for-front-end-web-developers">HTTP2 for front-end web developers</a></p> </blockquote> <p>And:</p> <blockquote> <p>&ldquo;However, many of the things you think of as being best practices can be detrimental to performance under HTTP/2.&rdquo; - <a href="https://www.smashingmagazine.com/2016/02/getting-ready-for-http2/">Getting Ready For HTTP2: A Guide For Web Designers And Developers</a></p> </blockquote> <p>Which suggest that enabling HTTP/2 on a site optimized for HTTP/1.1 could result in a slower site.</p> <p>A better way to interpret those quotes is:</p> <blockquote> <p>If you optimize for HTTP/1.1 and turn on HTTP/2 your site will not be as fast as it could be - but it might still be faster!</p> </blockquote> <p>On MDN we concatenate a lot of our files but we don&rsquo;t concatenate all of them. For example, our article pages have 9 different files coming from our CDN. I thought we could benefit from a bit of HTTP/2&rsquo;s multiplexing and header compression. And we did. You can see the DNS lookup time drop off in this waterfall from <a href="https://tools.pingdom.com/">Pingdom</a>:</p> <figure><img src="waterfall_before.png" alt="Waterfall showing over 0.3s of DNS look up for each request."/> </figure> <figure><img src="waterfall_after.png" alt="Waterfall showing DNS lookup for only first asset requested."/> </figure> <h2 id="some-numbers">Some numbers</h2> <p>Overall, our tests don&rsquo;t show a huge improvement in page load speed but there are small improvements for everyone, and a real improvement for users located far away from our servers. (Hi Australia and China!)</p> <table> <thead> <tr> <th>Service</th> <th>Location</th> <th>Browser</th> <th style="text-align:right">HTTP/1.1</th> <th style="text-align:right">HTTP/2</th> <th>Change</th> </tr> </thead> <tbody> <tr> <td><a href="https://tools.pingdom.com/">Pingdom</a></td> <td>Dallas</td> <td>Chrome</td> <td style="text-align:right">1.54s</td> <td style="text-align:right">1.34s</td> <td>0.2s</td> </tr> <tr> <td><a href="https://tools.pingdom.com/">Pingdom</a></td> <td>Melbourne</td> <td>Chrome</td> <td style="text-align:right">2.94s</td> <td style="text-align:right">2.80s</td> <td>0.14s</td> </tr> <tr> <td><a href="http://www.webpagetest.org/">WebPageTest</a></td> <td>London</td> <td>IE11</td> <td style="text-align:right">2.39s</td> <td style="text-align:right">2.37s</td> <td>0.02s</td> </tr> <tr> <td><a href="http://www.webpagetest.org/">WebPageTest</a></td> <td>Australia</td> <td>Firefox</td> <td style="text-align:right">5.61s</td> <td style="text-align:right">5.17s</td> <td>0.44s</td> </tr> <tr> <td>Google Analytics</td> <td>All</td> <td>Chrome</td> <td style="text-align:right">3.74s</td> <td style="text-align:right">3.04s</td> <td>0.7s</td> </tr> <tr> <td>Google Analytics</td> <td>All</td> <td>Firefox</td> <td style="text-align:right">3.99s</td> <td style="text-align:right">3.71s</td> <td>0.28s</td> </tr> <tr> <td>Google Analytics</td> <td>Australia</td> <td>All</td> <td style="text-align:right">3.01s</td> <td style="text-align:right">1.69s</td> <td>1.32s</td> </tr> <tr> <td>Google Analytics</td> <td>China</td> <td>All</td> <td style="text-align:right">8.10s</td> <td style="text-align:right">6.69s</td> <td>1.41s</td> </tr> </tbody> </table> <p>I tried to segment our users in Google Analytics to make sure we did not have a negative impact on users relying on HTTP/1.1 and&hellip; I couldn&rsquo;t find enough users to draw any conclusions. MDN is lucky like that. (It&rsquo;s possible the IE11 test in the table above is on Windows 7 and does not support HTTP/2, but WebPageTest doesn&rsquo;t identify the OS.) In theory, older browsers should not be affected because the protocol falls back to HTTP/1.1.</p> <p>There was a lot of variation in the page speed data I examined. I recommend running your before and after benchmark tests multiple times on multiple days so you can take an average. Try to wait a week before drawing conclusions from your analytics data as well.</p> <p>In a perfect world you don&rsquo;t increase the amount of code on your site or invalidate anyone&rsquo;s caches in the sample time period, but we don&rsquo;t develop in a perfect world.</p> <h2 id="read-more-on-http2">Read more on HTTP/2</h2> <ul> <li><a href="https://mattwilcox.net/web-development/http2-for-front-end-web-developers">HTTP2 for front-end web developers</a></li> <li><a href="https://www.smashingmagazine.com/2016/02/getting-ready-for-http2/">Getting Ready For HTTP2: A Guide For Web Designers And Developers</a></li> <li><a href="https://blog.cloudflare.com/http-2-for-web-developers/">HTTP/2 For Web Developers</a></li> </ul> <h2 id="next">Next</h2> <p><strong>Get our pages into data centres around the world.</strong></p> <p>This involves changing our hosting services, not a small task, and changing our pages to serve the same content to all logged out users.</p> <p><strong>Decrease asset size by removing support for older browsers.</strong></p> <p>If you think working on MDN was a great job because we have very modern browser support requirements, remember we&rsquo;re also working on a <a href="https://developer.mozilla.org/en-US/docs/MDN_at_ten/History_of_MDN">10 year old code base</a>.</p> <p>Thanks for using MDN!</p> Flipping More Tables https://stephaniehobson.ca/posts/flipping-more-tables/ Thu, 25 Aug 2016 11:43:02 +0000 https://stephaniehobson.ca/posts/flipping-more-tables/ <p>A few weeks ago I gave my talk on displaying data tables on small screens at <a href="http://2016.cascadiafest.org/">Cascadia Fest</a>. Which is a super awesome 3 days conference in the Pacific North West focusing on CSS and JavaScript (Browser and Server side!)</p> <p>The video of my talk has been posted: <div class="youtube"> <iframe width="500" height="281" src="https://www.youtube-nocookie.com/embed/bGlULfoY6Ls?rel=0" frameborder="0" allowfullscreen></iframe> </div> </p> <p>And <a href="https://www.slideshare.net/stephaniehobson/flipping-tables-displaying-data-on-small-screens-201608">my slides are available here</a>.</p> Google Analytics, Privacy, and Event Tracking https://stephaniehobson.ca/posts/google-analytics-privacy-and-event-tracking/ Thu, 28 Jul 2016 09:38:57 +0000 https://stephaniehobson.ca/posts/google-analytics-privacy-and-event-tracking/ <p><em>This article was <a href="https://hacks.mozilla.org/2016/01/google-analytics-privacy-and-event-tracking/">originally published on the Mozilla Hacks blog</a>.</em></p> <p>Many of us use Google Analytics (GA) or similar third-party services to keep track of how people interact with our websites; telling us things like when people visit and what they click. This data can help us make important decisions, such as when to schedule maintenance or if a feature can be removed.</p> <p>Because these services are installed on multiple websites these third-parties can collect a lot of information about people as they move around the internet. Not everyone is comfortable with that. Some people have started taking steps to protect their privacy by installing ad blockers like Ghostery or enabling <a href="https://blog.mozilla.org/blog/2015/11/03/firefox-now-offers-a-more-private-browsing-experience/">tracking protection in Firefox</a>.</p> <p>I think this is great!</p> <h2 id="sometimes-this-breaks-things">Sometimes this breaks things</h2> <p>When code depends on these third-party services and they&rsquo;re not there stuff goes wrong.</p> <p>I&rsquo;m going to use tracking external links as my example because it&rsquo;s a common use case, but I started investigating this problem because we accidentally broke the ability to navigate <abbr title="For certain edge cases, it's not as bad as it sounds.">within</abbr> our <a href="https://developer.mozilla.org/">website</a> for users who were choosing not to load the GA script.</p> <p>I&rsquo;m also going to use the universal analytics tracking code (analytics.js) for my examples here, not the classic analytics code (ga.js), so if you notice some differences between my code and yours that might be why.</p> <h2 id="what-goes-wrong">What goes wrong?</h2> <p>The current method (Jan 2016) for <a href="https://support.google.com/analytics/answer/1136920?hl=en">tracking outbound links</a> as recommended by Google looks like this:</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&#34;http://www.example.com&#34;</span> </span></span><span class="line"><span class="cl"> <span class="na">onclick</span><span class="o">=</span><span class="s">&#34;trackOutboundLink(&#39;http://www.example.com&#39;); return false;&#34;</span><span class="p">&gt;</span> </span></span><span class="line"><span class="cl"> Check out example.com </span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span> </span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-js" data-lang="js"><span class="line"><span class="cl"><span class="kd">var</span> <span class="nx">trackOutboundLink</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nx">ga</span><span class="p">(</span><span class="s1">&#39;send&#39;</span><span class="p">,</span> <span class="s1">&#39;event&#39;</span><span class="p">,</span> <span class="s1">&#39;outbound&#39;</span><span class="p">,</span> <span class="s1">&#39;click&#39;</span><span class="p">,</span> <span class="nx">url</span><span class="p">,</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="s1">&#39;transport&#39;</span><span class="o">:</span> <span class="s1">&#39;beacon&#39;</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="s1">&#39;hitCallback&#39;</span><span class="o">:</span> <span class="kd">function</span><span class="p">(){</span><span class="nb">document</span><span class="p">.</span><span class="nx">location</span> <span class="o">=</span> <span class="nx">url</span><span class="p">;}</span> </span></span><span class="line"><span class="cl"> <span class="p">});</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre></div><p>What Google is recommending here is:</p> <ol> <li>add <code>return false</code> to your links so that clicking on them doesn&rsquo;t take the user off the page</li> <li>when a user clicks a link, add that click to the GA queue of events to track and tell GA to take the user to the new page after that is done</li> <li>GA processes the event</li> <li>GA triggers the callback, taking the user to the new page</li> </ol> <p>This guarantees that the user doesn&rsquo;t leave the site before their action is recorded. However, if GA fails to process the event&hellip; it never triggers the callback, breaking all links off the website. :(</p> <p>We are relying on GA to send the user to the new page, but what if the GA code never executes?</p> <h2 id="how-we-can-avoid-problems">How we can avoid problems</h2> <p>If you&rsquo;re using the current recommended method of adding GA to your site you&rsquo;re including something like this on all your pages:</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-js" data-lang="js"><span class="line"><span class="cl"><span class="p">(</span><span class="kd">function</span><span class="p">(</span><span class="nx">i</span><span class="p">,</span><span class="nx">s</span><span class="p">,</span><span class="nx">o</span><span class="p">,</span><span class="nx">g</span><span class="p">,</span><span class="nx">r</span><span class="p">,</span><span class="nx">a</span><span class="p">,</span><span class="nx">m</span><span class="p">){</span><span class="nx">i</span><span class="p">[</span><span class="s1">&#39;GoogleAnalyticsObject&#39;</span><span class="p">]</span><span class="o">=</span><span class="nx">r</span><span class="p">;</span><span class="nx">i</span><span class="p">[</span><span class="nx">r</span><span class="p">]</span><span class="o">=</span><span class="nx">i</span><span class="p">[</span><span class="nx">r</span><span class="p">]</span><span class="o">||</span><span class="kd">function</span><span class="p">(){</span> <span class="p">(</span><span class="nx">i</span><span class="p">[</span><span class="nx">r</span><span class="p">].</span><span class="nx">q</span><span class="o">=</span><span class="nx">i</span><span class="p">[</span><span class="nx">r</span><span class="p">].</span><span class="nx">q</span><span class="o">||</span><span class="p">[]).</span><span class="nx">push</span><span class="p">(</span><span class="nx">arguments</span><span class="p">)},</span><span class="nx">i</span><span class="p">[</span><span class="nx">r</span><span class="p">].</span><span class="nx">l</span><span class="o">=</span><span class="mi">1</span><span class="o">*</span><span class="k">new</span> <span class="nb">Date</span><span class="p">();</span><span class="nx">a</span><span class="o">=</span><span class="nx">s</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="nx">o</span><span class="p">),</span><span class="nx">m</span><span class="o">=</span><span class="nx">s</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="nx">o</span><span class="p">)[</span><span class="mi">0</span><span class="p">];</span><span class="nx">a</span><span class="p">.</span><span class="kr">async</span><span class="o">=</span><span class="mi">1</span><span class="p">;</span><span class="nx">a</span><span class="p">.</span><span class="nx">src</span><span class="o">=</span><span class="nx">g</span><span class="p">;</span><span class="nx">m</span><span class="p">.</span><span class="nx">parentNode</span><span class="p">.</span><span class="nx">insertBefore</span><span class="p">(</span><span class="nx">a</span><span class="p">,</span><span class="nx">m</span><span class="p">)})(</span><span class="nb">window</span><span class="p">,</span><span class="nb">document</span><span class="p">,</span><span class="s1">&#39;script&#39;</span><span class="p">,</span><span class="s1">&#39;//www.google-analytics.com/analytics.js&#39;</span><span class="p">,</span><span class="s1">&#39;ga&#39;</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">ga</span><span class="p">(</span><span class="s1">&#39;create&#39;</span><span class="p">,</span> <span class="s1">&#39;UA-xxxxx-x&#39;</span><span class="p">,</span> <span class="s1">&#39;auto&#39;</span><span class="p">);</span> </span></span><span class="line"><span class="cl"><span class="nx">ga</span><span class="p">(</span><span class="s1">&#39;send&#39;</span><span class="p">,</span> <span class="s1">&#39;pageview&#39;</span><span class="p">);</span> </span></span></code></pre></div><p>This snippet creates a global <code>ga</code> object. The <code>ga</code> object is available in JavaScript whether the rest of the script successfully loads from Google or not.</p> <p>This means two things:</p> <ol> <li>It is possible to add events to the queue before GA has loaded. (Cool! This is handy for tracking events that happen really quickly.)</li> <li>We can&rsquo;t check if GA has loaded by checking for the existence of the <code>ga</code> object <a href="https://johnresig.com/blog/fixing-google-analytics-for-ghostery/">like we used to</a> because it&rsquo;s always there.</li> </ol> <p>So how do we know if GA has loaded? Well, clever people have figured out that when it initializes, GA alters the global <code>ga</code> object in a few different ways. None of these changes are officially documented by Google which means any of them could break in the long term.</p> <p>In <a href="http://veithen.github.io/2015/01/24/outbound-link-tracking.html">Tracking outbound links with Google Analytics</a>, Andreas Veithen (who works at Google but was writing on his personal blog) suggests that the most reliable check is to see if the <code>ga</code> object still has the <code>q</code> array. The array is removed after GA initializes and processes all the events waiting in the <code>ga.q</code> queue. Because <code>ga.q</code> is created by the snippet we paste on our sites, changing it would require us to make changes to our websites and so would be a major change for Google to undertake. On the other hand, it would also be possible for Google to change their code to not remove <code>ga.q</code> so I&rsquo;m not sure this is more reliable than any other method.</p> <p>In <a href="https://supergeekery.com/blog/google-analytics-ghostery-and-event-tracking">Google Analytics, Ghostery, and Event Tracking</a> John Morton suggests checking for the <code>create</code> property on the <code>ga</code> object. This technique has been around the longest and is probably the most widely used (I say this after a quick informal glance at GitHub).</p> <p>In <a href="https://www.domsammut.com/code/workaround-for-when-the-hitcallback-function-does-not-receive-a-response-analytics-js">Workaround for when the hitCallback function does not receive a response (analytics.js)</a>, Dom Sammut observes that we can check for the <code>loaded</code> property on the <code>ga</code> object. This is a method used informally in <a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#product-click">some Google documentation</a> so it&rsquo;s probably also somewhat reliable. I like this one because it is obvious what we&rsquo;re checking for.</p> <p>Opting for the last method, we alter Google&rsquo;s suggested code like so:</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-js" data-lang="js"><span class="line"><span class="cl"><span class="kd">var</span> <span class="nx">trackOutboundLink</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="c1">// check if the GA object exists and that it has initialized </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="k">if</span><span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">ga</span> <span class="o">&amp;&amp;</span> <span class="nx">ga</span><span class="p">.</span><span class="nx">loaded</span><span class="p">)</span> <span class="p">{</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="c1">// if yes, rely on GA to follow link </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="nx">ga</span><span class="p">(</span><span class="s1">&#39;send&#39;</span><span class="p">,</span> <span class="s1">&#39;event&#39;</span><span class="p">,</span> <span class="s1">&#39;outbound&#39;</span><span class="p">,</span> <span class="s1">&#39;click&#39;</span><span class="p">,</span> <span class="nx">url</span><span class="p">,</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="s1">&#39;transport&#39;</span><span class="o">:</span> <span class="s1">&#39;beacon&#39;</span><span class="p">,</span> </span></span><span class="line"><span class="cl"> <span class="s1">&#39;hitCallback&#39;</span><span class="o">:</span> <span class="kd">function</span><span class="p">(){</span><span class="nb">document</span><span class="p">.</span><span class="nx">location</span> <span class="o">=</span> <span class="nx">url</span><span class="p">;}</span> </span></span><span class="line"><span class="cl"> <span class="p">});</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> <span class="k">else</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="c1">// if not, follow link ourselves </span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="nb">document</span><span class="p">.</span><span class="nx">location</span> <span class="o">=</span> <span class="nx">url</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre></div><p><strong>Making this kind of check before relying on <em>any</em> third-party script is good practice.</strong> You should also be <a href="https://eddmann.com/posts/providing-local-js-and-css-resources-for-cdn-fallbacks/">including a local fallback for any script that is not coming from your own domain</a> - including CDNs.</p> <h2 id="respecting-our-users-privacy">Respecting our users&rsquo; privacy</h2> <p><a href="http://www.pewinternet.org/2015/05/20/americans-views-about-data-collection-and-security/">Most users care about their privacy</a> and there are more steps we can take to protect it. Depending on where you work you may also be required by your country&rsquo;s laws or your company’s privacy policy to take extra care with users’ data.</p> <h3 id="configuring-google-analytics-for-privacy">Configuring Google Analytics for privacy</h3> <p>If Google Analytics is your analytics platform of choice, there are <a href="https://gu.illau.me/posts/privacy-and-google-analytics/">a number of steps you can take to make it more private</a>.</p> <p>One of these is an easy configuration option to request anonymized user IP addresses. Essentially, <a href="https://support.google.com/analytics/answer/2763052?hl=en">Google Analytics changes the last octet of the user’s IP address to 0 before recording it</a>.</p> <p>This is triggered by adding an additional line to your tracking snippet after <code> ga('send', 'pageview');</code>.</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-js" data-lang="js"><span class="line"><span class="cl"><span class="nx">ga</span><span class="p">(</span><span class="s1">&#39;set&#39;</span><span class="p">,</span> <span class="s1">&#39;anonymizeIp&#39;</span><span class="p">,</span> <span class="kc">true</span><span class="p">);</span> </span></span></code></pre></div><p>Of course, Google still gets the users&rsquo; IP address (that&rsquo;s the way the web works), we&rsquo;re just trusting them not to store it.</p> <h3 id="respecting-do-not-track-dnt">Respecting Do Not Track (DNT)</h3> <p>It&rsquo;s also possible to detect when a user has enabled Do Not Track and be pro-active about what scripts you choose to load.</p> <p>Schalk Neethling documents the process in <a href="http://schalkneethling.github.io/blog/2015/11/06/respect-user-choice-do-not-track/">Respect User Choice ~ Do Not Track</a>. In a nutshell, we wrap the GA call with a check to see if the user has enabled DNT before executing the call to include the file.</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-js" data-lang="js"><span class="line"><span class="cl"><span class="kd">function</span> <span class="nx">_dntEnabled</span><span class="p">()</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="c1">// include the helper function from https://github.com/schalkneethling/dnt-helper/blob/master/js/dnt-helper.js </span></span></span><span class="line"><span class="cl"><span class="c1"></span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="c1">// Check the value of DNT before including GA </span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">_dntEnabled</span><span class="p">())</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="c1">// include the Google Analytics snippet </span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="p">}</span> </span></span></code></pre></div><p>This means that the <code>ga</code> object will not be added to the global scope for our page, but that&rsquo;s okay, the code snippet above handles that case gracefully as well.</p> <p>Do you have other techniques/suggestions for using analytics services while respecting the online privacy of visitors to your site? Feel free to share your experience.</p> Flipping Tables https://stephaniehobson.ca/posts/flipping-tables/ Tue, 19 Apr 2016 18:37:00 +0000 https://stephaniehobson.ca/posts/flipping-tables/ <p>I was very pleased to be invited back to <a href="http://styleandclass.ca/events/2016/coding-mentorship-data/">Style and Class</a> to give a talk about making data tables responsive. Style and Class is a great Vancouver meet-up I can&rsquo;t recommend enough.</p> <p>Here are my slides, though the video and animated gifs don&rsquo;t play :(</p> <div class="slideshare"> <div class="slideshare-slides"> <iframe src="https://www.slideshare.net/slideshow/embed_code/key/2OqLxbPius4Ggf" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen> </iframe> </div> <div class="slideshare-credit"> <strong> <a href="https://www.slideshare.net/stephaniehobson/flipping-tables-displaying-data-on-small-screens" target="_blank">Flipping Tables: Displaying Data on Small Screens</a> </strong> from <strong><a href="https://www.slideshare.net/stephaniehobson" target="_blank">Stephanie Hobson</a></strong> </div> </div> <p>And the links I encouraged everyone to check out:</p> <ul> <li><a href="https://www.behance.net/gallery/Designing-Effective-Data-Tables/885004">Designing Effective Data Tables</a></li> <li><a href="http://understandinggraphics.com/design/data-table-design/">Guidelines for Designing Tables</a></li> <li><a href="https://www.darkhorseanalytics.com/blog/clear-off-the-table/">Clear Off the Table</a></li> </ul> (Still) Making Websites Better for Everyone https://stephaniehobson.ca/posts/still-making-websites-better-for-everyone/ Tue, 27 Oct 2015 18:40:28 +0000 https://stephaniehobson.ca/posts/still-making-websites-better-for-everyone/ <p>In the next few weeks I&rsquo;ll be speaking at <a href="http://jsopencalgary.lighthouselabs.ca/">JavaScript Open Day Calgary</a>, <a href="https://viewsourceconf.org">View Source</a>, and <a href="http://jsopentoronto.lighthouselabs.ca/">JavaScript Open Day Toronto</a> giving an updated version of <a href="https://www.slideshare.net/stephaniehobson/web-accessibility-making-websites-better-for-everyone">Web Accessibility: Making Websites Better for Everyone</a>.</p> <p><strong>Edit:</strong> videos have been posted for <a href="https://air.mozilla.org/stephanie-hobson-web-accessibility-making-websites-better-for-everyone/">View Source</a> and <a href="https://channel9.msdn.com/Events/JS/JavaScript-Open-Day/Web-Accessibility">JavaScript Open Day Toronto.</a> I&rsquo;m more on the ball for View Source but the JSOpenDay one has some demos.</p> <p>In my talk I encourage people to try out different assistive technologies themselves:</p> <ul> <li><a href="http://www.chromevox.com/">Chrome Vox</a> / <a href="https://www.nvaccess.org/">NVDA</a> (Windows only) / <a href="https://www.apple.com/accessibility/osx/voiceover/">VoiceOver</a> (Mac only)</li> <li>Change to a high contrast theme for your operating system or browser</li> <li>Take the batteries out of your mouse or keyboard.</li> <li>Try using a touch screen or track pad with your nose.</li> </ul> <p>Here are two demo pages that list server status for a fictional hosting company, you should compare the <a href="https://stephaniehobson.ca/demos/hosting_bad.html">bad example</a> to the <a href="https://stephaniehobson.ca/demos/hosting_good.html">good example</a> with one of the technology options listed above.</p> <p>And here are all the resources I mention in my talk:</p> <ul> <li><a href="https://webaim.org">WebAIM</a></li> <li><a href="https://wave.webaim.org">Web Accessibility Evaluation Tool (wave)</a></li> <li><a href="https://alistapart.com/article/the-accessibility-of-wai-aria">The Accessibility of WAI-ARIA</a></li> <li><a href="https://24ways.org/2009/dont-lose-your-focus/">Don&rsquo;t Lose Your :focus</a></li> <li><a href="https://alistapart.com/article/designing-safer-web-animation-for-motion-sensitivity">Designing Safer Web Animation For Motion Sensitivity</a></li> <li><a href="https://filamentgroup.com/lab/bulletproof_icon_fonts.html">Bulletproof Accessible Icon Fonts</a></li> <li><a href="https://snook.ca/archives/html_and_css/hiding-content-for-accessibility">Hiding Content for Accessibility</a></li> <li><a href="https://www.youtube.com/watch?v=GQKEE9nI1lk">Switch Control Overview</a>(a video about switch control made using a switch control)</li> </ul> Conference Debrief: An Event Apart Austin 2015 https://stephaniehobson.ca/posts/conference-debrief-an-event-apart-austin-2015/ Thu, 15 Oct 2015 10:31:02 +0000 https://stephaniehobson.ca/posts/conference-debrief-an-event-apart-austin-2015/ <p>Last week, because working at Mozilla is awesome, I got to attend <a href="https://aneventapart.com/event/austin-2015">An Event Apart Austin</a>, the conference put on by the <a href="https://alistapart.com/">A List Apart</a> organization. It&rsquo;s consistently one of the highest quality conferences for front-end/user experience talks. I try to go every other year.</p> <p>The conference was great and the organizers did a good job making the speakers accessible, sitting them with us at lunch and keeping them around for the mixer. The caliber of the attendees is also consistently high. I have great conversations no matter who I sit with at lunch.</p> <p>Most of these speakers are pros who have done their talks in multiple places so its usually possible to find videos of them online with a bit of Googling, and they might be speaking at a conference near you!</p> <h2 id="conference-overview">Conference overview</h2> <p>Designing for performance and designing with empathy were common themes this year and we got good overviews of some exciting CSS and HTML features that will be widely supported in the near future.</p> <h2 id="my-favourite-talk">My Favourite Talk</h2> <p>A CSS geek at heart I enjoyed Jen Simmons&rsquo; &ldquo;Modern Layouts: Getting Out of Our Ruts&rdquo; the most. “We&rsquo;re about to see a renaissance in design on the web,&quot; she promised at one point and I, for one, will be excited to see more than rectangles on the web. She covered CSS Shapes, Regions, Grid Layout, and the new view-port units, illustrating wonderfully with some really unique examples of layout from <em>gasp</em> print which she advocated we translate (not transfer) to the web. <a href="https://www.youtube.com/watch?v=ZNpn7FBp_9U">A similar version of this talk online if I&rsquo;ve piqued your interest.</a></p> <h2 id="talk-summaries">Talk Summaries</h2> <p><strong>Jeffrey Zeldman</strong> <em>The Fault, Dear Brutus (or: Career Advice From a Cranky Old Man)</em> Zeldman made a compelling argument for quitting your job regularly :P He had some anecdotes about how it is the easiest path to career advancement, and this resonated with my own experience. He said the same could be accomplished by switching teams within an organization and I am glad we have so much sideways movement at Mozilla.</p> <p><strong>Yesenia Perez-Cruz</strong> <em>Design Decisions Through the Lens of Performance</em> Yesenia made a clear case for designers needing to take a lot of responsibility for the performance of a website. Designers make decisions about some of the things that add the most weight to our pages: fonts, images, and functionality - before developers ever see them. She said performance budgets should be set and understood as part of the requirements process and designers can be educated to stay within them and enlisted to help communicate with clients about staying within them as well. Great talk +1 would watch again.</p> <p><strong>Cameron Moll</strong> <em>Unified UX</em> Cameron talked about how a brand&rsquo;s presence covers more screens than just a desktop and said we should be unifying user experience across browsers, devices, apps, and accounts citing the fact that 40% of all online US users start an activity on one screen and finish on another. He said we should pay attention to form and function (making widgets look and work similarly, respecting our users mental models) and data symmetry (syncing shopping carts, reading places, etc).</p> <p><strong>Karen McGrane</strong> <em>Content in a Zombie Apocalypse</em> Like Cameron spoke about the need for a unified UX, Karen spoke about the need for unified content - as much for the organization&rsquo;s benefit as the users&rsquo;. She encouraged us to find ways to create and update content in one place to share across all platforms. She despaired about how poor a tool a WYSIWYG editor is at translating styling decisions into semantic information (It&rsquo;s not a list of links floated to the right with a narrow max width - it&rsquo;s a table of contents!) and hoped for a future with better tools for storing and updating structured text so content doesn&rsquo;t have to be redesigned every time a site is.</p> <p><strong>Ethan Marcotte</strong> <em>Laziness in the Time of Responsive Design</em> Ethan, who invented the term responsive web design, encouraged us to avoid the f-word for our sites - frameworks - and encouraged us to solve problems in context, watching to see where content needs adjustments rather than blanket redesigning the experience at different sizes. And he didn&rsquo;t miss the opportunity to tell us hamburger menus are still awful.</p> <p><strong>Lara Hogan</strong> <em>Designing for Performance</em> Where Yesenia talked about process improvements for better performance Lara talked about code improvements. She talked in-depth about image compression, font sub-setting (explaining how the infamous 4 and a horse stars review bug occurred), style guides and OOCSS, and ended talking about setting a public performance budget and how to make performance everyone&rsquo;s concern rather than having performance cops.</p> <p><strong>Eric Meyer</strong> <em>Designing for Crisis</em> Based on his personal experience sitting in a stranger&rsquo;s car barreling down a highway, racing the med-evac helicopter carrying his young daughter to a hospital in an unfamiliar city, Eric implored us to add a new persona to our design toolbox: a user in crisis. We like to think we&rsquo;re designing for cheerful, calm, with-it users living in the home of the future but we don&rsquo;t get to decide when, where, or how a user will access our sites. He gave examples of how this persona could help the banking, hospital, airline, and insurance industries. And he gave some creative solutions to help us do user testing for these scenarios including using CSS to blur the page, JavaScript to transpose letters in words, or playing the Jeopardy theme song to testers. He encouraged us not to treat these users as edge cases, because defining edge cases defines the limits of what we care about, and we should care about these users. I don&rsquo;t see much potential for an MDN user to be in crisis but it&rsquo;s easy to imagine a Firefox user who just lost all their data or thinks an account of theirs has been hacked could be panicking and not thinking clearly.</p> <p><strong>Brad Frost</strong> <em>Atomic Design</em> Pioneer of style guides and pattern libraries, Brad reminded us what these look like and why they are valuable and demoed his open source tool <a href="https://patternlab.io/">patternlab.io</a> for helping to create and maintain them. <a href="https://bradfrost.com/blog/post/atomic-web-design/">He has a great system, you can read about it here.</a></p> <p><strong>Matt Haughey</strong> <em>Empathy Is Good Business: How Front-Line Customer Support Can Make You A Better Designer</em> Continuing the empathic design theme Matt encouraged us all to spend a couple hours a week doing front-line customer support and explained how Slack is set up so that all employees must do that. It gives everyone a better idea of how users are using the product and what their pain points are. Rather than having personas to refer to designers have real people they could reference. They also don&rsquo;t talk down to their users or judge the feedback they give them. It&rsquo;s all data that makes the product better.</p> <p><strong>Jeremy Keith</strong> <em>Resilience: Building a Robust Web That Lasts</em> Jeremy praised the flexibility of HTML and CSS and encouraged us to embrace their resilience rather than fighting the inherent variability of the systems. He reminded us that we can build systems that work for everyone with very basic functionality and then layer enhancements on top of it. At it&rsquo;s heart Instagram should be a bunch of <code>&lt;img&gt;</code>s and a <code>&lt;input type=&quot;file&quot;&gt;</code> and there&rsquo;s no reason to require JavaScript to see your friend&rsquo;s images or add your own. Layout, fonts, file previews, filters, are all enhancements. &ldquo;If you build pages with the idea that parts other than HTML are optional, you will create a better and stronger web page.&rdquo; - <a href="https://www.gov.uk/service-manual/making-software/progressive-enhancement.html">gov.uk</a></p> How To Debug CSS https://stephaniehobson.ca/posts/how-to-debug-css/ Sat, 15 Aug 2015 09:39:01 +0000 https://stephaniehobson.ca/posts/how-to-debug-css/ <p>Some quick notes and links for the talk I gave at <a href="https://2015.vancouver.wordcamp.org/session/debugging-css/">WordCamp Vancouver</a> about Debugging CSS.</p> <p><strong>Edit</strong>: You can now watch <a href="https://wordpress.tv/2015/10/02/stephanie-hobson-debugging-css/">a recording of Debugging CSS</a>. Spot the three projector failures!</p> <div class="frame"> <iframe class="frame-src" src="https://videopress.com/embed/y20nhn6z" allowfullscreen></iframe> </div> <h2 id="steps">Steps</h2> <ol> <li>Is the HTML valid?</li> <li>Is the CSS valid?</li> <li>Is the right CSS being applied? <ol> <li>Is what you typed being applied?</li> <li>Is other stuff being applied?</li> <li>Is what&rsquo;s being applied right?</li> </ol> </li> <li>Does CSS support what you’re doing?</li> <li>Does the browser support it?</li> <li>Can you isolate the problem?</li> <li>Ask for help</li> </ol> <h2 id="tools">Tools</h2> <ul> <li><a href="https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector">Developer tools</a></li> <li>W3C <a href="https://validator.w3.org/">HTML validator</a> / <a href="https://jigsaw.w3.org/css-validator/">CSS validator</a></li> <li><a href="http://csslint.net/">csslint.net</a></li> <li><a href="https://caniuse.com/">caniuse.com</a></li> <li><a href="https://developer.mozilla.org/">MDN</a></li> <li><a href="https://stackoverflow.com/">Stack Overflow</a></li> <li><a href="https://codepen.io/">codepen.io</a> /<a href="http://jsfiddle.net/">jsfiddle.net</a></li> </ul> <h2 id="other-resources">Other resources</h2> <ul> <li><a href="http://www.stubbornella.org/content/2012/05/02/cross-browser-debugging-css/">Cross-Browser Debugging CSS</a></li> </ul> Mobile First Is Performance First https://stephaniehobson.ca/posts/mobile-first-is-performance-first/ Mon, 23 Feb 2015 22:10:03 +0000 https://stephaniehobson.ca/posts/mobile-first-is-performance-first/ <p>Tonight I spoke at <a href="https://www.meetup.com/Vancouver-Web-Performance/">Vancouver Web Performance Meetup</a> and I promised to share my slides so here they are:</p> <div class="slideshare"> <div class="slideshare-slides"> <iframe src="https://www.slideshare.net/slideshow/embed_code/key/j10Wox7jWv754N" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen> </iframe> </div> <div class="slideshare-credit"> <strong> <a href="https://www.slideshare.net/stephaniehobson/mobile-first-is-performance-first" target="_blank">Mobile First Is Performance First</a> </strong> from <strong><a href="https://www.slideshare.net/stephaniehobson" target="_blank">Stephanie Hobson</a></strong> </div> </div> <p>If what you&rsquo;re really after are the links, let me save you a bit of time:</p> <ul> <li>Patrick Hamann - <a href="https://speakerdeck.com/patrickhamann/building-theguardian-dot-com">Building theguardian.com (slides)</a> and <a href="https://www.youtube.com/watch?v=dfweWyVScaI">Breaking News at 1000ms (video)</a></li> <li>Paul Irish - <a href="https://docs.google.com/presentation/d/1MtDBNTH1g7CZzhwlJ1raEJagA8qM3uoV7ta6i66bO2M/present#slide=id.g3eb97ca8f_10">Delivering the Goods in under 1000ms (video)</a></li> <li>Scott Jehl - <a href="https://abookapart.com/products/responsible-responsive-design">Responsible Responsive Design (book)</a></li> <li>Ilya Grigorik - <a href="http://chimera.labs.oreilly.com/books/1230000000545/index.html">High Performance Browser Networking” (book - free online!)</a></li> </ul> Smashing Conference Whistler 2014 https://stephaniehobson.ca/posts/smashing-conference-whistler-2014/ Tue, 06 Jan 2015 22:32:27 +0000 https://stephaniehobson.ca/posts/smashing-conference-whistler-2014/ <p>A few weeks ago <a href="http://smashingconf.com/whistler-2014/">Smashing Conference came to Whistler</a>. This caliber of conference comes to Canada infrequently so I couldn&rsquo;t not go ;)</p> <h2 id="the-conference">The conference</h2> <p>As good as I hoped it would be. A mix of strategy and near future technology examples.</p> <h3 id="my-favourite-talk">My Favourite Talk</h3> <ul> <li>Building the next-generation of <a href="https://theguardian.com">theguardian.com</a>, by Patrick Hamann</li> <li><a href="https://speakerdeck.com/patrickhamann/building-theguardian-dot-com">Slides</a></li> <li>The Guardian takes a true mobile-first, progressive-enhancement approach to serving their content. I was super excited to see how quickly and cleanly an article loads. I think this is the future of front-end performance and I am eager to implement much of what I learned here.</li> </ul> <h3 id="talk-summaries">Talk Summaries</h3> <p><strong>Marcin Wichary</strong><br> <em>Good is the enemy of great: On designing, and then undesigning, a perfect link underline</em><br> 200 years of typographic history was lost when we moved from printing presses to the typewriter, Marcin Took us through some of what he did in his attempt to re-create the perfect underline.His ultimate point was that it&rsquo;s important to find a balance between shipping and creating good code. Perfectionism is not the right balance but we should strive to make things good and not just improve the status quo.</p> <p><strong>Susan Robertson</strong><br> <em>Style Guides: Why bother?</em><br> Susan walked us through a long list of benefits to using a style guide. Highlights included: front-end speed, consistency, and performance. Lots of good resources here: <a href="http://styleguides.io">styleguides.io</a></p> <p><strong>Yoav Weiss</strong><br> <em>Responsive Images are Coming to a Browser Near You</em><br> I have been hearing a lot about new picture element and srcset attributes but Yoav was the first to really get me excited about them. The potential image management problems these additions could create are huge but there is a lot of potential to be really neat things with them. <code>&lt;picture&gt;</code>is a solution for providing art direction of images on different screen sizes and <code>srcset</code> gets added to if you just want to provide a smaller/larger version of an identical image.</p> <p><strong>Marcy Sutton</strong><br> <em>A Web for Everybody</em><br> Accessibility is easier if you build it you build it in from the start. Ask, does it work: With the keyboard only? In a screen reader? Without sound? Without colour? In high contrast mode? &ldquo;This stuff is not that hard.&rdquo;</p> <p><strong>Jenn Lukas</strong><br> <em>The Developer’s Ampersandwich</em><br> Things to consider when implementing type on a website: if you haven&rsquo;t been given design direction you can find the type by looking at what&rsquo;s popular and already in use, separate presentation from content, be aware of performance issues with web fonts, add accessible fallbacks for a icon fonts, use tools like typecast to communicate with designers about general styles rather than content specific styles.</p> <p><strong>Zach Leatherman</strong><br> <em>Better @font-face with Font Load Events</em><br> Web fonts are rendered blocking. Zach proposes a JavaScript fix which prioritizes a FOIT for icon fonts and a FOUT for content fonts. Lots of good stuff from <a href="http://www.filamentgroup.com/lab/bulletproof_icon_fonts.html">this excellent article of his</a>.</p> <p><strong>Stephen Hay</strong><br> <em>Easing the Pain of Designing in the Browser</em><br> We need to stop thinking about layout first, we need to start thinking about structured content first. Begin by focusing on the small screen, and then focus on type and color.</p> <p><strong>John Allsopp</strong><br> <em>The Web&rsquo;s future is offline</em><br> &ldquo;We can&rsquo;t keep building apps with the desktop mindset of permanent, fast connectivity, where a temporary disconnection or slow service is regarded as a problem and communicated as an error.&rdquo;</p> <p><strong>Dave Shea</strong><br> <em>Rolling Your Own CSS Methodology</em><br> A CSS framework is not about syntax. It&rsquo;s about discipline and optimizing for people. Ideals Mobify uses when building theirs: classes for everything, no IDs, no nesting, no !important.</p> <hr> <p>That was one day. It was a really long day.</p> <hr> <p><strong>Johnathan Snook</strong> <br> Jonathan gave a very personal talk about the development of his career overtime and the importance of empathy. It touched a lot of people, but it is difficult to summarize in two sentences.</p> <p><strong>Brad Frost</strong><br> <em>Atomic Design</em><br> If we all use the same framework we all look alike. We should be building &ldquo;Tiny Bootstraps, for every client.&rdquo; - Dave Rupert. Brad demoed <a href="http://patternlab.io">patternlab.io</a> which is a really cool tool for breaking designs down into component parts.</p> <p><strong>Lyza D. Gardner</strong><br> <em>Soothing Web Weariness: Saving the Web by Doing as Little as Possible</em><br> Make projects smaller to begin with - increase your constraints - improve them iteratively and systematically instead of accepting complexity as the status quo.</p> <p><strong>Val Head</strong><br> <em>All the Right Moves: Putting your UIs in Motion</em><br> Animations needs to be designed with intent the same way you would design any other part of the site. Prototype animations. Test that they match your site&rsquo;s style and feel fast.</p> <p><strong>Kyle Simpson</strong><br> <em>#CSS {Yawn: Yay!}</em><br> Kyle talked about some high-level concepts he&rsquo;d like to see implemented in CSS templating. It was very much a talk about the next generation of CSS informed by some complex computing science principles. I can&rsquo;t do it justice, <a href="https://speakerdeck.com/getify/number-css-yawn-yay">his slides are here</a></p> <p><strong>Tim Kadlec</strong><br> <em>In Between</em><br> Like Val, Tim talked about designing animations with intent. He had lots of great examples and data.</p> <p><strong>Paul Irish</strong><br> <em>Getting to Fast</em><br> Not all pixels are created equal. Paul talked about why the first 14KB transferred are the most important to performance.</p> <hr> <p>It was a great conference. I left feeling super excited about my job, which is how I always want to leave conferences :) I also gave a &lsquo;jam session&rsquo; talk on accessibility. They hosted it in a pub and I highly recommend pub audiences, they laugh at all your jokes! Accessibility was a theme running through all of the talks at Smashing and I am glad to see it being spoken about and incorporated into examples again I feel that, as an industry, we&rsquo;ve sort of forgotten about it for a few years.</p> Making Websites Better for Everyone https://stephaniehobson.ca/posts/making-websites-better-for-everyone/ Sat, 13 Dec 2014 11:00:15 +0000 https://stephaniehobson.ca/posts/making-websites-better-for-everyone/ <p>There&rsquo;s a few different versions of my talk floating around now. I&rsquo;m really excited and humbled to hear that people have been making changes to the way the work in response to something I said.</p> <p>The most detailed (and longest) version of my talk is available to watch on <a href="http://wordpress.tv/2014/09/02/stephanie-hobson-accessibility-with-css-making-websites-better-for-everyone/">Wordpress TV</a>.</p> <p>My first slide deck and links to the resources I recommend are part of <a href="https://stephaniehobson.ca/posts/accessibility-with-css-making-websites-better-for-everyone/">an earlier blog post</a>.</p> <p>In the most recent version of my talk I used a demo of a fictional hosting company&rsquo;s server status page. Follow these thinks to see the <a href="https://stephaniehobson.ca/demos/hosting_bad.html">bad</a> and <a href="https://stephaniehobson.ca/demos/hosting_good.html">good</a> examples and I encourage you to compare the two right now using some assistive technology, or at the very least, using your nose or elbow on your mouse or trackpad.</p> Intro to Google Tag Manager https://stephaniehobson.ca/posts/google-tag-manager-intro/ Wed, 04 Jun 2014 22:01:01 +0000 https://stephaniehobson.ca/posts/google-tag-manager-intro/ <p><em>Edit: 2018-10-30. Google now calls macros variables and rules triggers. I&rsquo;ve updated the text but not the screen shots.</em></p> <p>Google Tag Manager (GTM) is still pretty new as I write this. Stuff is still changing so I&rsquo;m going to try to focus on techniques rather than step by step instructions (but I have some of those too).</p> <h2 id="what-is-gtm">What is GTM</h2> <p>You include a code snippet from GTM on your site which, among other things, includes a file. Then you use the GTM interface to configure what goes in that file.</p> <p>This is intended to replace any scripts you&rsquo;d normally have to write yourself to track stuff that isn&rsquo;t a regular page view (example: tracking a file download as a page view). Say good bye to code like this: <code>pageTracker._trackPageview(fileurl);</code></p> <h2 id="why-do-we-care">Why do we care?</h2> <p>One snippet to trigger them all. All your tracking scripts and pixels can be moved off the page and into GTM. Smaller pages, faster loading! They have some already supported services (AdWords, DoubleClick, Remarketing, Mediaplex&hellip;) and you can theoretically code support for others in yourself.</p> <p>Theoretically, it means non-technical people will be able to do the set up for this kind of tracking. Less work for us! But let&rsquo;s face it, the interface was written by devs, it still needs some technical knowledge.</p> <p>It cuts down on the amount of code writing and maintenance we have to do in the future. Also less work for us!</p> <h2 id="is-it-a-trap">Is it a trap?</h2> <p>Could be. Yup.</p> <p>A javascript error in GTM code can break all the javascript on the page and anyone with access to your GTM account can add javascript.</p> <p>GTM seems to insist on following the href on <code>&lt;a&gt;</code> elements. So if you are hijaxing any links GMT could break your code. For example: if you are using a lightbox style plugin which opens links in overlays.</p> <p>Some GTM features can add query strings or hash tags to URLs, depending on the system on the other end of the link, this could cause problems too.</p> <p>So test, and limit the publishing permissions on your account to people who know how to test.</p> <h2 id="creating-an-account">Creating an account</h2> <p>Remember how we all went out and got personal Google Analytics accounts and added our clients to them and then stopped working for those clients and it got awkward? Google remembers too.</p> <p>You hook an existing personal login up to GTM and then have the option to create accounts. One per business is ideal here. Then you get to set up what Google is calling a container. A container contains all the code snippets you are going to want to run. Google suggests you should create a different container for each website associated with the business that owns the account.</p> <p>(This seems like sound advice if you&rsquo;re just getting started but will lead to some code duplication in the long run if you have multiple domains, I have complicated thoughts on this that belong in a separate blog post).</p> <p>Once you&rsquo;ve set up a container you get the code snippet. Place the code snippet on the page after the opening <code>&lt;body&gt;</code> tag.</p> <h2 id="whats-all-this">What&rsquo;s all this?</h2> <p>Your container contains 3 things: tags, triggers, and variables.</p> <h3 id="tags">Tags</h3> <p>Tags are individual things to do. Things like &ldquo;listen for links being clicked on&rdquo;, &ldquo;track this page view&rdquo;, &ldquo;listen for form submissions&rdquo;, &ldquo;track this conversion&rdquo;, &ldquo;track pressing play&rdquo;. They&rsquo;re individual tasks so listening for form submissions and tracking a conversion takes two separate tags.</p> <h3 id="triggers">Triggers</h3> <p>Triggers are when to apply tags. The basic one is &ldquo;on every page&rdquo;. Each trigger can have multiple conditions so you can combine them to create triggers like &ldquo;if this event is a click and it happened on an element that does not link to this website&rdquo;.</p> <h3 id="variables">Variables</h3> <p>Variables are just a way to store stuff you&rsquo;re likely to re-use (mostly text or javascript). There&rsquo;s some pre-populated ones and you can write your own. Stuff I&rsquo;ve been keeping in variables: our analytics tracking number, a line of javascript that retrieves the page title, and a complex regex that checks if the href of a link takes the user off the current site. You reference variables inside tags, triggers, and other variables by writing its name in {{double curly braces}}.</p> <h2 id="example-tracking-page-views-and-external-link-clicks-with-universal-analytics">Example: Tracking page views and external link clicks with Universal Analytics</h2> <p>My examples are all for Universal Analytics but if you&rsquo;re still using Classic the concept is the same where I pick Universal Analytics from the Tag Type menu pick Google Analytics Classic and do your best with the slightly different options that follow from there.</p> <p>This is, more or less, what we&rsquo;ll be setting up, in an order that makes sense to me:</p> <ol> <li><em>Variable</em>: your Analytics tracking number.</li> <li><em>Tag</em>: track a pageview in Analytics.</li> <li><em>Tag</em>: listen for clicked links.</li> <li><em>Trigger</em>: if link does not lead to current site.</li> <li><em>Tag</em>: create event in Analytics for outbound link click.</li> <li>Create version</li> <li>Preview</li> <li>Publish</li> </ol> <p>I found the actual order somewhat more headache inducing, and that&rsquo;s why I&rsquo;m writing a blog post about it. Hopefully you end up at the end of this list with link tracking and no headache.</p> <p>Once you&rsquo;ve followed these steps once hopefully you will understand how the pieces fit together and you can go on to work in the way that makes the most sense to you :)</p> <p>This is the part where I list actual steps, this part might change as the product develops.</p> <ol> <li><em>Variable</em>: your Analytics tracking number. <ol> <li>In Analytics get your tracking ID from Admin > Property Settings</li> <li>In GTM go to your container's overview page.</li> <li>Click the big red "new" button and pick "variable" out of the list.</li> <li> Configure the variable like this: <dl> <dt>Variable Name:</dt> <dd><kbd>tracking ID</kbd> (well you can name it whatever you want)</dd> <dt>Variable Type:</dt> <dd><kbd>Constant String</kbd></dd> <dt>Value:</dt> <dd><em>Your tracking ID</em></dd> </dl> Or, if prefer a screen shot:<br> <img src="macro1.gif" alt="Screen shot of GTM tracking id variable" width="302" height="217"> </li> <li>Save it.</li> </ol> </li> <li><em>Tag</em>: track a pageview in Analytics. <ol> <li>Click the big red "new" button and pick "tag" out of the list.</li> <li> Configure the variable like this: <dl> <dt>Tag Name:</dt><dd><kbd>Pageview</kbd></dd> <dt>Tag Type:</dt><dd><kbd>Google Analytics</kbd> & gt; <kbd>Universal Analytics</kbd></dd> <dt>Tracking ID:</dt><dd><kbd>{{tracking ID}}</kbd> <br>This is the variable we just created. You can either type it yourself or click the little lego block to pick it out of a list.</dd> <dt>Track Type:</dt><dd><kbd>Page View</kbd></dd> <dt>Firing Triggers:</dt><dd>Add <kbd>All pages</kbd> <br>You don't have to create this trigger, GTM creates it automatically.</dd> </dl> Or, if you prefer a screen shot:<br> <img src="tag_pageview.gif" alt="Screenshot of GTM tag setup up for pageviews" width="497" height="430"> </li> <li>Save it.</li> </ol> <li><em>Tag</em>: listen for clicked links. <ol> <li>Click the big red "new" button and pick "tag" out of the list.</li> <li> Configure the variable like this: <dl> <dt>Tag Name:</dt><dd><kbd>Listener - linkClick</kbd></dd> <dt>Tag Type:</dt><dd><kbd>Link Click Listener</kbd></dd> <dt>Firing Triggers:</dt><dd>Add <kbd>All pages</kbd> </dd> </dl> Leave everything else on the defaults.</li> <li>Save it.</li> </ol> </li> <li><em>Trigger</em>: if link does not lead to current site. <ul> <li>Click on the big red "new" button and pick "trigger" out of the list.</li> <li>Configure the trigger like this: <dl> <dt>Trigger Name:</dt><dd><kbd>on - outbound link click</kbd></dd> <dt>Conditions:</dt><dd><kbd>{{event}} equals gtm.linkClick</kbd></dd><dd><kbd>{{element url}} starts with </kbd><em> your site URL</em> </dd> </dl> </li> <li>Save it.</li> </ul> I actually use a complex regex in a variable for the conditions to catch a few edge cases like: urls missing the www, relative links, mailto/tel/ftp etc. but for this example and basic sites this will get what we want. </li> <li><em>Tag</em>: create event in Analytics for outbound link click. <ul> <li>Click on the big red "new" button and pick "tag" out of the list.</li> <li>Configure the trigger like this: <dl> <dt>Tag Name:</dt><dd><kbd>UA event - outbound link</kbd></dd> <dt>Tag Type:</dt><dd><kbd>Universal Analytics</kbd></dd> <dt>Tracking ID:</dt><dd><kbd>{{tracking id}}</kbd></dd> <dt>Track Type:</dt><dd><kbd>Event</kbd></dd> <dt>Category:</dt><dd><kbd>outbound-link</kbd></dd> <dt>Action:</dt><dd><kbd>{{element url}}</kbd></dd> <dt>Label:</dt><dd><kbd>{{element text}}</kbd></dd> <dt>Value:</dt><dd><kbd>1</kbd></dd> </dl> </li> <li>Save it.</li> </ul> If you have an existing implementation you are trying to match so your stats aren't disrupted you should look in Google Analytics to see what you are currently using for the event category, action and label and match those values instead :) </li> <li>Create version <ul> <li>On the Container Draft > Overview page the Create Version button is in the top right.</li> <li>If you really want to be on the ball you can amend the name or add notes to describe what you added in this version, handy in case you want to roll back.</li> </ul> </li> <li>Preview <ul> <li>The Preview button is also on the top right of the Container Draft > Overview screen.</li> <li>Click Debug in the popover</li> <li>In the next popover click on the url of your site. This will open a new window with your site and a Tag Manager window at the bottom.</li> <li>In the window at the bottom check that: <ul> <li>"Page View - Page" and "Listener - linkClick" have the status "Fired on Tag Manager Load"</li> <li>Click on a link and check that "UA event - outbound link" gets added with the status "Fired on Event "gtm.linkClick". You can usually see it flash to the top before the other page loads but if it's too fast find (or create) a link with the attribute target="_blank" to click.</li> </ul> </li> <li>If something is not working check your triggers and try again.</li> <li><strong>Also important,</strong> check that the javascript on your own pages is working properly. In an ideal world you have a list of features you can test.</li> <li>Exit preview mode</li> </ul> <li>Publish (blue button in top right of Container Draft > Overview page)</li> </ol> <p>You can see some changes applied immediately in Analytics on the Real-Time &gt; Overview page. Other events which don&rsquo;t seem to be working on Real-Time occasionally start showing up in the stats a day later. I have no insight to offer here, sorry.</p> <h2 id="summary">Summary</h2> <p>So we create tags to do things, triggers to govern when we do the things in the tags, and variables to save ourselves time when creating tags and triggers.</p> Accessibility with CSS: Making Websites Better for Everyone https://stephaniehobson.ca/posts/accessibility-with-css-making-websites-better-for-everyone/ Wed, 14 May 2014 17:20:48 +0000 https://stephaniehobson.ca/posts/accessibility-with-css-making-websites-better-for-everyone/ <p>Last night I spoke at the <a href="https://www.meetup.com/styleandclass/">Style &amp; Class Meet-up</a> about Accessibility and CSS. Posting the slides here for posterity:</p> <div class="slideshare"> <div class="slideshare-slides"> <iframe src="https://www.slideshare.net/slideshow/embed_code/key/LbZCesLu0s7bH4" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen> </iframe> </div> <div class="slideshare-credit"> <strong> <a href="https://www.slideshare.net/stephaniehobson/accessibility-with-css-making-website-better-for-everyone" target="_blank">Accessibility with CSS: Making Websites Better for Everyone</a> </strong> from <strong><a href="https://www.slideshare.net/stephaniehobson" target="_blank">Stephanie Hobson</a></strong> </div> </div> <h2 id="resources">Resources</h2> <ul> <li><a href="https://webaim.org">Intro to Accessibility</a></li> <li><a href="https://wave.webaim.org">WCAG Validator</a></li> <li><a href="https://alistapart.com/article/the-accessibility-of-wai-aria">Intro to ARIA</a></li> <li><a href="https://24ways.org/2009/dont-lose-your-focus/">:Focus and keyboard accessibility</a></li> <li><a href="http://blog.paciellogroup.com/2010/01/high-contrast-proof-css-sprites">High contrast CSS Sprites</a></li> <li><a href="http://filamentgroup.com/lab/bulletproof_icon_fonts.html">Bullet Proof Accessible Icon Fonts</a></li> <li><a href="https://snook.ca/archives/html_and_css/hiding-content-for-accessibility">The Offscreen Class</a></li> <li><a href="https://snook.ca/archives/html_and_css/floated-label-pattern-css">Floating Form Labels</a></li> <li><a href="http://www.nczonline.net/blog/2013/01/15/fixing-skip-to-content-links">Javascript fix for Skip Links</a></li> </ul> A Matter of Semantics https://stephaniehobson.ca/posts/a-matter-of-semantics/ Tue, 21 Jan 2014 20:05:49 +0000 https://stephaniehobson.ca/posts/a-matter-of-semantics/ <p><em>Adapted from a blog post on Web Services&rsquo; blog at BCIT, the audience was our content community: people who contribute content using the CMS, with little to no technical experience.</em></p> <p>Once, as part of a “getting to know you” activity at summer camp, I played a game where I was given a drawing and another camper was given a paper and pencil. Without her seeing the drawing, and without me seeing her paper, I had to try to get her to draw what I could see.</p> <blockquote> <p>“In the top left hand corner there’s a square, in the bottom right there’s a circle, big enough that it overlaps the square. Inside the circle is a triangle.”</p> </blockquote> <p>It was impossible to end up with an exact copy of the drawing. Usually the original and new drawings were hilariously different.</p> <p>Every time you visit a web site, your computer is playing this game with another computer on the other end of the internet. In order to avoid ending up with a hilariously different web site, the computers speak a few <em>really precise</em> languages to each other.</p> <p>A CMS (Content Management System) lets you make updates to a website without learning those languages. So you’re telling the CMS what you want to do and the CMS is translating your intention into one of those <em>really precise</em> languages – HTML.</p> <p>HTML doesn&rsquo;t tell the computer how to make things look. HTML tells the computer what things are: “this text is a link to another page”, “this text is a heading”, “this text a list of related stuff.” This is called <strong>semantic markup</strong>: the content is &ldquo;marked up&rdquo; with HTML to indicate its &ldquo;semantics&rdquo; or meaning.</p> <p>When users view your website, their browser combines your HTML with files the developers have written in two other languages – CSS and JavaScript – to create the web page that they see.</p> <p>CSS tells the computer how things should look: “links are blue,” “headings are bold,” “list items have bullets.”</p> <p>JavaScript tells the computer how things should work: “When the user clicks this button, show the user that paragraph.”</p> <p>With just the HTML a computer can do all kinds of interesting things with your content. It can read it out loud, translate it into a different language, put it on a really big screen (or a really little one), or search through it.</p> <h2 id="sometimes-things-get-misinterpreted">Sometimes things get misinterpreted.</h2> <p>When we edit pages in a CMS we see a visual metaphor instead of the plain HTML. We’re also playing the drawing game with the CMS. This means something that looks right might still not have the right HTML. Just because there are dots before that text doesn&rsquo;t mean it’s a list. Just because this text is bold doesn&rsquo;t mean it’s a heading.</p> <h2 id="with-the-wrong-html-the-other-computers-will-make-mistakes">With the wrong HTML the other computers will make mistakes.</h2> <p>When a screen reader comes to a list it will tell the user that there&rsquo;s a list and how long it is, if the user has been to the page before and knows they need item number eight they can skip straight to it. With the wrong HTML the user has to skip past all the other items one at a time.</p> <p>When a search engine is trying to identify what a page is about it looks for headings. Text that is marked up as an HTML heading is considered a better summary.</p> <p>When the CSS (the way the website looks) changes the HTML doesn’t. In 2010 we changed how much space is between paragraphs on the website. Before we did this some editors had decided they wanted more space between their paragraphs and inserted it themselves by adding empty paragraphs, using markup to create visual formatting. After we made changes to the CSS their pages had huge spaces between paragraphs and it looked like something was wrong with them.</p> <p>The mobile version of a website will often use the same HTML as a desktop version but different CSS. This is a very visual example of why separation of content and presentation matter.</p> <p>From time to time, we see people use tables to impose a specific visual layout on their content, something that should really be done with CSS instead. Tables are hard for mobile browsers to handle because they are so wide. To avoid distorting content in them the tables could be re-arranged. This will make tables with data in them easier to read on a mobile phone but if the HTML says “this is a table” and what is inside is not data, just an image we wanted in a different position, things could end up looking like one of our drawing game pictures gone wrong.</p> <h2 id="how-to-avoid-errors">How to avoid errors.</h2> <p>There are some simple things that can be done to avoid problems:</p> <ul> <li>When you are copy and pasting into your CMS only paste plain text.</li> <li>Use your CMS&rsquo;s editing tool bar to communicate your intent to it. Use the buttons to create lists and the style drop down to create headings.</li> <li>When inserting images remember to fill in the &ldquo;alt&rdquo; text and ask if there is a class to help you position the image where you want it on the page.</li> </ul> <p>Don&rsquo;t fight the default styles. The designer made careful decisions about how the HTML should be styled by the CSS using principles of graphic design and interface design and did user testing to refine them. This should make your job easier, you don&rsquo;t have to make these decisions yourself instead focus on the <strong>purpose</strong> of each part of your content instead of how it should look.</p> <p>If you are experienced enough to be writing your own HTML pay attention to what the meaning of the elements are.</p> HTML5 Forms OF DOOM https://stephaniehobson.ca/posts/html5-forms-of-doom/ Tue, 10 Jul 2012 16:26:19 +0000 https://stephaniehobson.ca/posts/html5-forms-of-doom/ <p>I spoke at an HTML5 Code Camp the other day on HTML5 forms because HTML5 forms are cool! They&rsquo;re so cool you can use most of them today anywhere you have a text field to increase functionality for your users!</p> <div class="slideshare"> <div class="slideshare-slides"> <iframe src="https://www.slideshare.net/slideshow/embed_code/key/fc8wSTwX7fQYZs" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen> </iframe> </div> <div class="slideshare-credit"> <strong> <a href="https://www.slideshare.net/stephaniehobson/html5-forms-of-doom" target="_blank">HTML5 Forms OF DOOM</a> </strong> from <strong><a href="https://www.slideshare.net/stephaniehobson" target="_blank">Stephanie Hobson</a></strong> </div> </div> <p><a href="https://stephaniehobson.ca/html5forms/unfinished.html">Sample form.</a></p> <p><a href="https://stephaniehobson.ca/html5forms/finished.html">Finished form (no peeking).</a></p> <h2 id="resources">Resources</h2> <p><strong>Basic Introductions</strong></p> <ul> <li><a href="http://diveintohtml5.info/forms.html">Dive Into HTML5: A Form of Madness</a></li> <li><a href="https://24ways.org/2009/have-a-field-day-with-html5-forms/">Have a Field Day with HTML5 Forms</a></li> <li><a href="https://www.html5rocks.com/en/tutorials/forms/html5forms/">Making Forms Fabulous with HTML5</a></li> <li><a href="https://alistapart.com/articles/forward-thinking-form-validation/">Forward Thinking Form Validation</a></li> </ul> <p><strong>CSS</strong></p> <ul> <li><a href="http://html5doctor.com/css3-pseudo-classes-and-html5-forms/">CSS3 Pseudo-Classes and HTML5 Forms</a></li> <li><a href="https://24ways.org/2009/have-a-field-day-with-html5-forms/">Have a Field Day with HTML5 Forms</a></li> </ul> <p><strong>Compatibility Specifics</strong></p> <ul> <li><a href="http://wufoo.com/html5/">The Current State of HTML5 Forms</a></li> <li><a href="http://miketaylr.com/code/input-type-attr.html">HTML5 inputs and attribute support</a></li> </ul> <p><strong>Shim</strong></p> <ul> <li><a href="https://github.com/ryanseddon/H5F">Ryan Seddons&rsquo;s H5F</a></li> <li><a href="https://adactio.com/journal/4272/">The design of datalist</a></li> </ul> Leave https://stephaniehobson.ca/posts/leave/ Thu, 24 May 2012 23:02:56 +0000 https://stephaniehobson.ca/posts/leave/ <p>I&rsquo;m taking a one year leave of absence from my job at BCIT beginning June 1<sup>st</sup>, 2012.</p> <p>Right now it kind of feels like I&rsquo;m doing this because I&rsquo;m crazy.</p> <p>I&rsquo;m really doing it because there&rsquo;s stuff I want to do.</p> <p>I want to build something cool. I want to learn something new. I want to live in London. I want to live in San Francisco. I want to hang out with the dear friends who live in each city who I have been apart from for way to long. I want to get to know the friends that I&rsquo;ve made in my travels but never lived near.</p> <p>Along the way I&rsquo;d going to have to do a bit of work. Contract/sub-contract work I can do remotely while I&rsquo;m traveling or job offers in San Francisco and London that will help me with the paperwork to work there.</p> <p>Work that will let me do what I do really well<sup><a href="#one">1</a></sup>, work that will let me do things I enjoy but don&rsquo;t do enough of<sup><a href="#two">2</a></sup>, and work that will give me a chance to learn what I don&rsquo;t do at all yet<sup><a href="#three">3</a></sup>.</p> <ol> <li>HTML, CSS, JavaScript, jQuery, brainstorming and problem solving.</li> <li>Responsive design, user experience testing, information architecture, interface design.</li> <li>SVG, SASS, ePub.</li> </ol> <p>I&rsquo;m also looking for cheap places to say - friend of a friends who need house sitters or subletters, empty guest rooms and comfy couches. In London or Brighton in Aug and Sept and San Francisco or Berkeley from Oct-Dec.</p> <p>If you have some work, a place to stay, or some advice for me I can be contacted on <a href="http://www.linkedin.com/in/stephaniehobsonca">LinkedIn</a>, or <a href="https://twitter.com/stephaniehobson">Twitter</a>.</p> <h2 id="an-invocation-for-beginnings">An Invocation for Beginnings</h2> <div class="youtube"> <iframe width="500" height="281" src="https://www.youtube-nocookie.com/embed/RYlCVwxoL_g?rel=0" frameborder="0" allowfullscreen></iframe> </div> Print Styles Are Responsive Design https://stephaniehobson.ca/posts/print-styles-responsive-design/ Wed, 14 Mar 2012 23:26:09 +0000 https://stephaniehobson.ca/posts/print-styles-responsive-design/ <p>Print styles are the original responsive designs. Using media queries we pare down the content, focus on readability, and design with different device capabilities in mind but when was the last time you took a good look at your print styles?</p> <p>Yes, people still print web pages. <a href="http://devblog.xing.com/frontend/monitor-webpage-printouts/">Extrapolating from these numbers</a> about 10,000 pages are printed from bcit.ca every month. The print experience is an important part of a good site and relying on your screen styles to print properly is foolish:</p> <ul> <li>Background images and colours are stripped.</li> <li>Web fonts might turn into gibberish or not print at all.</li> <li>Layout bugs can cause missing content.</li> <li>You&rsquo;re ignoring the fact that paper is a totally different medium!</li> </ul> <p>Printing can really screw up a web page.</p> <h2 id="avoid-common-problems">Avoid common problems</h2> <p>One of the most common problems I saw when doing my survey of print styles was white text printing on a white page. To save ink the browsers will strip all background colours and background images before printing so in your print style sheet be sure to over-ride any light coloured fonts. I also add a thin border to elements where the background colour is used on the screen to differentiate the content and reinforce the grid.</p> <p>There&rsquo;s a variety of common layout bugs everything from floats to absolute, fixed, fixed-width, and semi-opaque elements can get cut off, misplaced, or disappeared entirely especially when the element flows across a page break. If it&rsquo;s too wide some browsers will shrink your page until it fits and others will crop it. Where possible do away with your layout and make your content linear and fluid.</p> <p>Web fonts introduce a new quandary to the world of print styles. <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=468568">FireFox</a> and <a href="http://code.google.com/p/chromium/issues/detail?id=98011">Chrome</a> don&rsquo;t print web fonts. Have you ever seen a site with the word-spacing, line-height, and font-size picked for one font displaying its fallback font? It&rsquo;s not usually a pretty picture. I recommend over-riding web fonts in favour of a common font, especially for body copy.</p> <h2 id="focus-on-content-and-save-paper">Focus on content and save paper</h2> <p>While you&rsquo;re stripping your web fonts out, consider the readability of the rest of your typography. How does it look printed? If your page is being printed chances are someone is going to spend some time reading it - more time than they&rsquo;d spend on your site. Do what you can to make that pleasant.</p> <p>Layout elements like headers, footers, banners, ads, and menus distract from the information the user is trying consume, are un-usable on a printed page, and take up extra paper. It&rsquo;s very common to remove these elements when printing. A three-column page layout doesn&rsquo;t look so bad on one short page but if your site has a substantial amount of content those columns will likely be empty from the second page onward leaving large fields of empty space or worse your columns will spread onto a second page when your content only filled the first. What&rsquo;s your user going to do with that printed navigation menu anyway - click on it? How does that logo in your header look in black and white? Removing layout elements makes it much easier to make your remaining content fluid to avoid common print bugs and fit the page. Think about a better way to communicate the other information - more on this in a bit.</p> <h2 id="provide-a-better-print-experience">Provide a better print experience</h2> <p>Print doesn&rsquo;t <em>work</em> like a web page. The user can&rsquo;t interact with it anymore all they can do is read it. Consider what that means for content on your page that you can&rsquo;t normally see.</p> <p>There&rsquo;s some pretty fancy CSS tricks you can use to add the URL of links to the page in brackets after the link. I think I&rsquo;ve seen it done best by the <a hef="http://html5boilerplate.com/">HTML5 boilerplate</a> but I prefer to <a href="http://www.alistapart.com/articles/improvingprint/">add footnotes with javascript</a>. This is much less disruptive for readers. Either way make sure you consider how you&rsquo;ll handle links that aren&rsquo;t URLs: javascript hooks, in page anchors, mailto or tel. These same tricks can be applied to abbreviation titles and other attributes.</p> <p>Not all interactive content can be exposed. There&rsquo;s no CSS trick to print a video or Flash file and frequently this missing content will just leave a big white gap in your page. Your options are pretty much: hide it, provide a place holder, include a short summary, or include a full transcript. I&rsquo;ll leave the method up to you.</p> <p>For content revealed by javascript my suggestion is to do your best to print the content that the user sees. If they&rsquo;ve toggled open two out of ten of your FAQs, just print the full text of those two and leave the others closed. I&rsquo;ve seen several sites which don&rsquo;t include their global styles when printing but forget to include the styles their pages are dependant on in print stylesheets (this is most common with javascript). I can only imagine how frustrating that would be to a user.</p> <h2 id="provide-a-better-brand-experience">Provide a better brand experience</h2> <p>The most basic print styles make a page more readable <a href="http://evolt.org/ResponsiveWebAndPrint">at the expense of some of its character</a> but we don&rsquo;t just have to take away. You can include a print specific header and footer hidden in your HTML or add them later with javascript. This gives you a chance to include a black and white version of your logo and any other brand cues you feel are important. You might already be using a grid to maintain visual consistency between desktop and mobile, here&rsquo;s your chance to do it in print too.</p> <p>Other information you might consider adding in a print header or footer is: way-finding clues like a section or category name, general contact information like a 1-800 number (more useful than a link to a contact us page), and a short URL to help the user get back to that page. Some sites even include a QR code but <abbr title="don't do it">use your best judgement</abbr>.</p> <h2 id="speed-up-your-pages">Speed up your pages</h2> <p>It boggles my mind that browsers will still <em>delay rendering a page</em> until it has loaded a style sheet with the media type of print. #seriously <a href="http://www.phpied.com/files/css-loading/print.php">#testyours</a>. This article on <a href="http://zoompf.com/blog/2009/12/browser-performance-problem-with-css-print-media-type">Browser Performance Problem with CSS &ldquo;print&rdquo; Media Type</a> outlines the problem really well.</p> <p>If you&rsquo;re just trying to avoid the extra http request and your print styles are very small you can always just add them into your main CSS file.</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="p">@</span><span class="k">media</span> <span class="nt">screen</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"><span class="c">/* screen styles here */</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="p">@</span><span class="k">media</span> <span class="nt">print</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"><span class="c">/* print styles here */</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre></div><p>Otherwise you can look at techniques to load them asynchronously. There&rsquo;s a <a href="https://web.archive.org/web/20120318141226/http://www.duncanmcdougall.co.uk:80/delay-loading-the-print-stylesheet">couple</a> <a href="http://www.duncanmcdougall.co.uk/articles/delay-loading-print-stylesheet.html">ways</a> to do this.</p> <h2 id="seeing-it-in-action">Seeing it in action</h2> <div style="text-align:center;margin:1em;"> <span style="width:25%;display:inline-block;padding-right:11%;vertical-align:top;"> <a href="https://www.flickr.com/photos/stephaniehobson/6836645818/"><figure><img src="site.jpg" alt="The original page has full colour images and a video"/> </figure> </a> </span> <span style="width:25%;display:inline-block;padding-right:11%;vertical-align:top;"> <a href="https://www.flickr.com/photos/stephaniehobson/6836681816//"><figure><img src="before.jpg" alt="Without a print style sheet there are blank spaces and useless information"/> </figure> </a> </span> <span style="width:25%;display:inline-block;vertical-align:top;"> <a href="https://www.flickr.com/photos/stephaniehobson/6836645794/"><figure><img src="after.jpg" alt="With a print style sheet only the primary page content prints, filling the page"/> </figure> </a> </span> </div> <p>On the left is our site on a screen, on the right how it looks formatted for print. In the middle, without any print styles, you can see it <abbr title="has a number of problems">goes boom</abbr>:</p> <ul> <li>The white logo is invisible</li> <li>Chrome decides to crop rather than shrink the site to fit making it obvious things are not right.</li> <li>Our grid falls apart without the background images.* There are large gaps where the videos are.</li> <li>The only useful information in the footer is pushed off screen by a sea of links.</li> </ul> <p>Did you see what happens to the Bebas font we used on our section names? You caught me, this is a screen cap not a scan of a printed page. Bebas wouldn&rsquo;t actually print and the 6 pixels of word spacing we have to apply to it to get it to play nice looks kind of silly on Arial Narrow.</p> <p>Our print style sheet is loaded asynchronously after the rest of the page and at the same time I run functions to add a print header, print footer and the URLs of the links on the page as footnotes.</p> <p>The screen header, sidebars, banners, and footer are hidden from display and I force the main content to become fluid again. Other than that the actual body of the page needs only minor work because these styles are layered over our global styles. I darken up some text, remove videos and Flash elements, and on pages which don&rsquo;t already have outdented headings I outdent the headings. If this page had javascript elements everything would print as the user left it before printing.</p> <p>The print header includes a black and white version of our logo which prints nice and crisp compared to a colour one and uses a few thin lines to re-establish the grid creating a visual tie back the way the website looks on a monitor. It also includes the name of which section of the site the page is from and a shortened URL to return to the page.</p> <p>The footnote function is complex enough to re-use a footnote if there are multiple links to the same page, provided a shortened URL if it&rsquo;s an internal link, include fallback text for javascript links, and skip footnoting an email address if the address itself is all that&rsquo;s included between the anchor tags (our style guide mandates this but the odd one slips through the cracks).</p> <p>The very basic footer was a victim of time constraints. We couldn&rsquo;t include our 1-800 number on all pages because it&rsquo;s specific to Student Enrolment and wouldn&rsquo;t be appropriate on business services pages, for example.</p> <h2 id="code-tips">Code tips</h2> <p>If you have a large constantly evolving site I recommend making your global style sheets apply to both screen and print. It saves you the trouble of keeping two sets of stylesheets up to date when changes are made. That leaves you the task of over-riding some of the screen styles in the print style sheet. This will be much easier if you&rsquo;re already <a href="http://oli.jp/2011/ids/">avoiding IDs for styling</a>. If you&rsquo;re not it <a href="http://coding.smashingmagazine.com/2010/11/02/the-important-css-declaration-how-and-when-to-use-it/">seems to be acceptable</a> to sprinkle your print styles with !important declarations.</p> <h2 id="print-preview-lied-to-me---hicksdesignhttpstwittercomhicksdesignstatus12243956069"><a href="https://twitter.com/#!/Hicksdesign/status/12243956069">&ldquo;Print preview lied to me.&rdquo; - @hicksdesign</a></h2> <p>Test until it&rsquo;s perfect in print preview. Then test until it&rsquo;s perfect when you print to PDF. Then test until it&rsquo;s perfect when you <em>print it out <strong>on paper</strong></em>. There is no other way to be sure you&rsquo;ve got it right.</p> <h2 id="more-information">More information</h2> <ul> <li><a href="http://coding.smashingmagazine.com/2011/11/24/how-to-set-up-a-print-style-sheet/">How To Set Up A Print Style Sheet</a></li> <li><a href="http://designshack.net/articles/css/6-thinks-i-learned-about-print-stylesheets-from-html5-boilerplate/">6 Things I Learned About Print Stylesheets From HTML5 Boilerplate</a></li> </ul> CSS Loading Spinner https://stephaniehobson.ca/posts/css-loading-spinner/ Tue, 06 Sep 2011 14:34:49 +0000 https://stephaniehobson.ca/posts/css-loading-spinner/ <p>I needed a loading spinner for a side project the other day but I was too lazy to steal someone else&rsquo;s off the internet or try to re-learn making an animated GIF so I just coded my own in CSS (CSS is <a href="https://en.wikipedia.org/wiki/Law_of_the_instrument">my hammer</a>).</p> <p>On the bright side it works on any background colour and is a little transparent which is neat. And it&rsquo;s <em>way</em> faster to adjust the colour scheme than an image file would be.</p> <div class="frame"> <iframe class="frame-src" src="https://stephaniehobson.ca/loading-spinner/" allowfullscreen></iframe> </div> <h2 id="the-basic-idea">The basic idea</h2> <p>It&rsquo;s one <code>&lt;div&gt;</code> containing 8 <code>&lt;span&gt;</code>s, styled to be little grey lozenges:</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="p">.</span><span class="nc">spinner</span> <span class="nt">span</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">display</span><span class="p">:</span> <span class="kc">block</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="k">height</span><span class="p">:</span> <span class="mi">13</span><span class="kt">px</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="k">width</span><span class="p">:</span> <span class="mi">5</span><span class="kt">px</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="k">border-radius</span><span class="p">:</span> <span class="mi">2</span><span class="kt">px</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="k">background-color</span><span class="p">:</span> <span class="nb">rgba</span><span class="p">(</span><span class="mi">77</span><span class="p">,</span> <span class="mi">77</span><span class="p">,</span> <span class="mi">77</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">);</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre></div><p>In anticipation of rotating them I moved the <code>transform-origin</code> to the middle of the element and then a significant way down beneath it. Later, when I rotate the lozenges this spaces them further apart.</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="p">.</span><span class="nc">spinner</span> <span class="nt">span</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">transform-origin</span><span class="p">:</span> <span class="mi">50</span><span class="kt">%</span> <span class="mi">160</span><span class="kt">%</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre></div><p>They all have a simple animation applied to them that makes them fade in and out (it has a bit of an opacity on it just for fun):</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="p">.</span><span class="nc">spinner</span> <span class="nt">span</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">animation-name</span><span class="p">:</span> <span class="n">fade</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="k">animation-duration</span><span class="p">:</span> <span class="mi">1</span><span class="kt">s</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="k">animation-iteration-count</span><span class="p">:</span> <span class="kc">infinite</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="k">animation-direction</span><span class="p">:</span> <span class="kc">alternate</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="k">animation-fill-mode</span><span class="p">:</span> <span class="kc">backwards</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="p">@</span><span class="k">keyframes</span> <span class="nt">fade</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="nt">0</span><span class="o">%</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">background-color</span><span class="p">:</span> <span class="nb">rgba</span><span class="p">(</span><span class="mi">77</span><span class="p">,</span> <span class="mi">77</span><span class="p">,</span> <span class="mi">77</span><span class="p">,</span><span class="mf">0.8</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span><span class="line"><span class="cl"> <span class="nt">40</span><span class="o">%</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">background-color</span><span class="p">:</span> <span class="nb">rgba</span><span class="p">(</span><span class="mi">77</span><span class="p">,</span> <span class="mi">77</span><span class="p">,</span> <span class="mi">77</span><span class="p">,</span><span class="mf">0.8</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span><span class="line"><span class="cl"> <span class="nt">100</span><span class="o">%</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">background-color</span><span class="p">:</span> <span class="nb">rgba</span><span class="p">(</span><span class="mi">255</span><span class="p">,</span> <span class="mi">255</span><span class="p">,</span> <span class="mi">255</span><span class="p">,</span><span class="mf">0.8</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre></div><p>Using <code>nth-of-type</code> each lozenge is rotated 45degrees more than the last and has a delay of 250ms added to the animation on it. Unfortunately there is no easy way to do this program-magically so they have to be specified for each. Here is an example of the code for the second one:</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="p">.</span><span class="nc">spinner</span> <span class="nt">span</span><span class="p">:</span><span class="nd">nth-of-type</span><span class="o">(</span><span class="nt">2</span><span class="o">)</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">transform</span><span class="p">:</span> <span class="nb">rotate</span><span class="p">(</span><span class="mi">45</span><span class="kt">deg</span><span class="p">);</span> </span></span><span class="line"><span class="cl"> <span class="k">animation-delay</span><span class="p">:</span> <span class="mi">-750</span><span class="kt">ms</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre></div><h2 id="starting-in-the-middle">Starting in the middle</h2> <p>Did you know that you can provide a <em>negative</em> value for <code>animation-delay</code>? Cool, eh?!?! This means I can make it appear that the animation is beginning in the middle, otherwise the first time it&rsquo;s run it looks funny.</p> <h2 id="placing-the-spinner">Placing the spinner</h2> <p>I added some absolute positioning to the <code>&lt;span&gt;</code>s, so the origin of the transform is at the top left of their parent <code>&lt;div&gt;</code>. This means the spinner fans out from the top left of the <code>&lt;div&gt;</code> and you can absolutely position it to exactly where you want the <em>middle</em> of the spinner. Handy if you want to place the spinner in the middle of something, like I did.</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="p">.</span><span class="nc">spinner</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">position</span><span class="p">:</span> <span class="kc">absolute</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="k">top</span><span class="p">:</span> <span class="mi">50</span><span class="kt">%</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="k">left</span><span class="p">:</span> <span class="mi">50</span><span class="kt">%</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="p">.</span><span class="nc">spinner</span> <span class="nt">span</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">position</span><span class="p">:</span> <span class="kc">absolute</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="k">top</span><span class="p">:</span> <span class="mi">-20</span><span class="kt">px</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="k">left</span><span class="p">:</span> <span class="mi">-3</span><span class="kt">px</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="err">...</span> </span></span></code></pre></div><h2 id="changing-the-colour">Changing the colour</h2> <p>Changing the colour is as simple as creating a new animation and applying that to your special spinner spans.</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="p">.</span><span class="nc">special</span> <span class="p">.</span><span class="nc">spinner</span> <span class="nt">span</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">animation-name</span><span class="p">:</span> <span class="n">specialfade</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre></div><h2 id="using-it">Using it</h2> <p><a href="https://stephaniehobson.ca/loading-spinner/">Here&rsquo;s the loading spinner</a> with the <code>moz</code> and <code>webkit</code> prefixes. Of course, it only works in browsers that support animation and transforms but there&rsquo;s more and more of those these days.</p> <p>Also, yes, totally, please use it. <a href="https://twitter.com/stephaniehobson">Tweet me</a> if you make any improvements.</p> <h2 id="a-little-bit-more">A little bit more</h2> <p>I got a little carried away and made a few other styles:</p> <div class="frame"> <iframe class="frame-src" src="https://stephaniehobson.ca/loading-spinner/other-styles.html" allowfullscreen></iframe> </div> A style tag counts as a :first-child https://stephaniehobson.ca/posts/style-element-counts-as-a-first-child/ Wed, 24 Aug 2011 23:31:09 +0000 https://stephaniehobson.ca/posts/style-element-counts-as-a-first-child/ <p><strong>EDIT 2011-09-15: All of this applies to <code>&lt;script&gt;</code> in the body as well.</strong></p> <p>I have some bad news and a fix (I hesitate to call it good news).</p> <p>HTML5 introduces a way for us to include <code>&lt;style&gt;</code> elements on the page, we just need to give them an attribute of <code>scoped</code>. So, for example, if you have an SSI included widget you can include the styles in the widget file instead of trying to devise a way to add them to the head.</p> <p><strong>A Problem</strong></p> <p>But it causes an itsy bitsy problem with the styles. The <code>&lt;style&gt;</code> counts as an element, and if you put it first, it becomes the first-child. The styles I&rsquo;d defined for the first-child in that block were not applied to the (now) second child.</p> <p>In other words this:</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="nt">div</span> <span class="nt">p</span><span class="p">:</span><span class="nd">first-child</span> <span class="p">{</span> <span class="p">}</span> </span></span></code></pre></div><p>stopped working when I added the style to the HTML here:</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">div</span><span class="p">&gt;</span> </span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">style</span><span class="p">&gt;</span> <span class="nt">p</span> <span class="p">{</span> <span class="k">color</span><span class="p">:</span> <span class="mh">#00F</span><span class="p">;</span> <span class="p">}&lt;/</span><span class="nt">style</span><span class="p">&gt;</span> </span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>Text!<span class="p">&lt;/</span><span class="nt">p</span><span class="p">&gt;</span> </span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span> </span></span></code></pre></div><p><strong>A Fix</strong></p> <p>Fortunately we can include <samp>style</samp> in our CSS declarations (and even style it if you want, <a href="https://stephaniehobson.ca/wtf/scope_style_first-child.html">I gave it a width, and garish background colour</a> in both FF3.6 and Chrome) so an adjacent sibling selector is the fix:</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="nt">div</span> <span class="nt">style</span><span class="p">:</span><span class="nd">first-child</span> <span class="o">+</span> <span class="nt">p</span> <span class="p">{</span> <span class="p">}</span> </span></span></code></pre></div><p>I&rsquo;m not keen on going through my styles sheets and adding this rule to every place I have first-child declarations but we don&rsquo;t use scoped style elements too much so hopefully I won&rsquo;t have to.</p> <p>The other option would be to not put the <code>&lt;style&gt;</code> first in the parent I pretty clearly remember reading that the style has to be the first-child, of course, I can&rsquo;t find where I read it.</p> <p><strong>Side Note: using <samp>&lt;style scoped&gt;</samp> today.</strong></p> <p>As of August 2011 there are no browsers that support the <code>&lt;style&gt;</code> attribute but if you&rsquo;re using an HTML5 doctype you can still use <code>&lt;style scoped&gt;</code> today. Browsers have been happily rendering style elements inside the body for quite some time, it just wasn&rsquo;t valid HTML before ;)</p> <p>The old browsers will apply the styles in your scoped tag to the entire page so I combine it with a class to get the effect I intended.</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;foo&#34;</span><span class="p">&gt;</span> </span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">style</span> <span class="na">scoped</span><span class="p">&gt;</span> <span class="p">.</span><span class="nc">foo</span> <span class="nt">p</span> <span class="p">{</span> <span class="k">color</span><span class="p">:</span> <span class="mh">#00F</span><span class="p">;</span> <span class="p">}</span> <span class="p">&lt;/</span><span class="nt">style</span><span class="p">&gt;</span> </span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>Text!<span class="p">&lt;/</span><span class="nt">p</span><span class="p">&gt;</span> </span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span> </span></span></code></pre></div> Perfect Stranger https://stephaniehobson.ca/posts/perfect-stranger/ Sat, 16 Jul 2011 18:59:51 +0000 https://stephaniehobson.ca/posts/perfect-stranger/ <p><a href="https://twitter.com/perfectstranger"><figure><img src="perfectstranger.jpg" alt="Perfect Stranger"/> </figure> </a>Twitter is an amazing tool to catch a glimpse of the collective consciousness. I&rsquo;ve seen it during the Olympics and I&rsquo;ve been apart of it at conferences like An Event Apart. <a href="https://adactio.com">Jeremy Keith</a> once said that Twitter was the closest he&rsquo;d ever come to feeling as though he&rsquo;s jacked into the Matrix.</p> <p>Most of us use Twitter to keep in touch with people we know and keep up with things we care about. It makes sense, it&rsquo;s familiar and comforting but it blocks out people and ideas we disagree with and it ignores some of the most powerful potential of Twitter.</p> <p>What are we missing by insulating ourselves with the familiar? A recent episode of <a href="http://www.cbc.ca/spark/2010/08/joel-johnson-and-jonah-lehrer-on-following-complete-strangers-on-twitter/">CBC&rsquo;s Spark discussed the benefits of following a stranger</a> with Joel Johnson who wrote a <a href="http://gizmodo.com/5586970/why-i-stalk-a-sexy-black-woman-on-twitter-and-why-you-should-too">Gizmodo article</a> on the topic.</p> <p>Not only can it help us avoid <a href="https://en.wikipedia.org/wiki/Groupthink">groupthink</a> but Joel mentions a study that suggests exposure to other view points can make us more creative.</p> <p>So I had the idea to create a twitter account that will add a random tweet to my feed now and then and when I mentioned it to <a href="https://danielquinn.org/">Daniel</a> he took a few minutes and built it.</p> <p>You should follow a <a href="https://twitter.com/perfectstranger">@perfectstranger</a> on Twitter, and let me know what you think.</p> A Dull April Fool's Day https://stephaniehobson.ca/posts/dull-april-fools-day/ Sat, 16 Jul 2011 18:59:20 +0000 https://stephaniehobson.ca/posts/dull-april-fools-day/ <p>There was a rash of black and white April Fool&rsquo;s Day sites this year. We weren&rsquo;t the only ones to do it but I think we did it best, if I do say so myself. There were three parts to our little switch and it wouldn&rsquo;t have been the same without any of them:</p> <ul> <li>Desaturating the colours in the style sheet.</li> <li>Desaturating every image on the site, that&rsquo;s right, all of them.</li> <li>Authentic content.</li> </ul> <p><a href="https://www.flickr.com/photos/stephaniehobson/5584653410/"><figure><img src="oldskool.jpg" alt="The 1960s logo and a photo of giant &#39;new&#39; computer really make the home page look dated"/> </figure> </a></p> <p><strong>Desaturating the colours in the stylesheet.</strong></p> <p>I captured the colours in the stylesheet using the Web Developer Extension in FireFox. Information &gt; View Color Information produces a list of all the colours used in the styles and their hex codes. I took a screen shot of that and then desaturated it in Photoshop by adding a desaturation layer.</p> <p>Once I had the desaturated colours I did a find and replace for the original hex codes in the style sheet, sampling the new hex codes from my Photoshop document.</p> <p><strong>Desaturating all the images.</strong></p> <p>All the images? Yep, all the images.</p> <p>For this I tried out a couple different javascript libraries but ultimately went with <a href="https://mezzoblue.github.com/PaintbrushJS/demo/">PaintBrushJS</a> by <a href="https://mezzoblue.com">Dave Shea</a> because it was the only one that could handle background images and didn&rsquo;t add any extra elements to the page. PaintBrushJS uses a combination of javascript and canvas to alter the images.</p> <p>For backwards compatibility I manually converted all the header and footer assets to black and white, this also meant I could restrict the desaturating javascript to running on just the content and leaving these pieces alone, taking a bit of a load off the client.</p> <p>I actually had the easiest time getting it to work in IE&hellip; there&rsquo;s a filter. I wouldn&rsquo;t have used an evil evil filter if it hadn&rsquo;t just been for half of one day but it was so I did.</p> <p>I think this kind of photo manipulation has a place in web design since it means we can keep the unaltered versions of files and change their rendering when we change the theme, that&rsquo;s pretty powerful.</p> <p><strong>Authentic Content.</strong></p> <p>We were lucky that the <a href="https://www.bcit.ca/archives/">BCIT Archives</a> have begun digitizing much of their collection. We got a great deal of source material from the <a href="http://archives.bcit.ca/PDFs/1968_1969BCIT_PTCalendar.pdf">1968-69 Program and Course Catalogue</a>. We listed courses like Punch Card Systems and Fortran VI for the day - both sold out of course.</p> <p>Nope, the logo wasn&rsquo;t a Star Trek knock off, that&rsquo;s what the future looked like in the 60s and both BCIT and Star Trek ran with it.</p> <p>The content about campus events came from copies of the student news paper from the same era. My favourite of the new stories was about how BCIT was getting its <em>second</em> computer.</p> <p><strong>It was a lot of fun and I&rsquo;m glad we work at the kind of place that was keen to let us do it.</strong></p> FireFox's buttons are wider than IE or Chrome/Safari's https://stephaniehobson.ca/posts/firefoxs-buttons-wider-than-ie-or-chrome-safari/ Wed, 09 Mar 2011 14:29:42 +0000 https://stephaniehobson.ca/posts/firefoxs-buttons-wider-than-ie-or-chrome-safari/ <p>I hate form styling on the best of days. This is a good example of why:</p> <p>Firefox&rsquo;s buttons are wider than IE&rsquo;s or Webkit&rsquo;s. Why? This little gem in the browser&rsquo;s style sheets:</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="nt">button</span><span class="p">::</span><span class="nd">-moz-focus-inner</span><span class="o">,</span> </span></span><span class="line"><span class="cl"><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;reset&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-moz-focus-inner</span><span class="o">,</span> </span></span><span class="line"><span class="cl"><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;button&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-moz-focus-inner</span><span class="o">,</span> </span></span><span class="line"><span class="cl"><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;submit&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-moz-focus-inner</span><span class="o">,</span> </span></span><span class="line"><span class="cl"><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;file&#34;</span><span class="o">]</span> <span class="o">&gt;</span> <span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;button&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-moz-focus-inner</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">padding</span><span class="p">:</span> <span class="mi">0</span><span class="kt">px</span> <span class="mi">2</span><span class="kt">px</span> <span class="mi">0</span><span class="kt">px</span> <span class="mi">2</span><span class="kt">px</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre></div><p>That&rsquo;s right, it&rsquo;s 4px wider. Thank you FireFox.</p> <p>Fortunately, we can fix it!</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="nt">button</span><span class="p">::</span><span class="nd">-moz-focus-inner</span><span class="o">,</span> </span></span><span class="line"><span class="cl"><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;reset&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-moz-focus-inner</span><span class="o">,</span> </span></span><span class="line"><span class="cl"><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;button&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-moz-focus-inner</span><span class="o">,</span> </span></span><span class="line"><span class="cl"><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;submit&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-moz-focus-inner</span><span class="o">,</span> </span></span><span class="line"><span class="cl"><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;file&#34;</span><span class="o">]</span> <span class="o">&gt;</span> <span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;button&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-moz-focus-inner</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">padding</span><span class="p">:</span> <span class="mi">0</span><span class="kt">px</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre></div><p>That was easy :)</p> <p>We have a class on our site that is applied to every button. I call it &ldquo;formbutton&rdquo; (I didn&rsquo;t get to pick it. My boss picked it 8 years ago. It&rsquo;s a great name isn&rsquo;t it? Epic and enduring.) So I can simplify that code up to this:</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="p">.</span><span class="nc">formbutton</span><span class="p">::</span><span class="nd">-moz-focus-inner</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">padding</span><span class="p">:</span> <span class="mi">0</span><span class="kt">px</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre></div><p><strong>Want a little more info:</strong></p> <p>I found this with a little help from this article on <a href="http://www.oppenheim.com.au/2008/07/06/how-to-view-firefoxs-default-internal-css-stylesheet/">viewing FireFox&rsquo;s default style sheets</a>. The observant among you may notice there is another style in there. It is for keyboard navigation. Use your new found powers wisely, don&rsquo;t remove it without replacing it.</p> <p>Also, here&rsquo;s a link if you&rsquo;re wondering what is up with the <a href="http://www.evotech.net/blog/2007/05/after-v-after-what-is-double-colon-notation/">double colon notation.</a></p> <p>And so far it does not look like there are equivalent pseudo elements in Webkit or IE, but I will admit to not looking very hard since this fixed my problem ;)</p> Taking a photo of yourself with an iPhone https://stephaniehobson.ca/posts/taking-a-photo-of-yourself-with-an-iphone/ Wed, 15 Sep 2010 22:31:27 +0000 https://stephaniehobson.ca/posts/taking-a-photo-of-yourself-with-an-iphone/ <div class="youtube"> <iframe width="500" height="281" src="https://www.youtube-nocookie.com/embed/xckrxgvTsyY?rel=0" frameborder="0" allowfullscreen></iframe> </div> Bullets aligned to the top of the text https://stephaniehobson.ca/posts/bullets-alligned-top-text/ Fri, 10 Sep 2010 12:59:47 +0000 https://stephaniehobson.ca/posts/bullets-alligned-top-text/ <p>Know how IE and FF display list-style-image bullets at two different heights and it drives us all nuts?</p> <p><img src="https://stephaniehobson.ca/bulletfix/compare_default.gif" alt=""></p> <p>Did you know it was possible to use vertical-align on any inline element? Did you know that first-line is an inline element?</p> <p><img src="https://stephaniehobson.ca/bulletfix/compare_fix.gif" alt=""></p> <p>If you&rsquo;re working on displaying the bullets at the same height, <a href="https://stephaniehobson.ca/bulletfix/">this might be the fix for you</a>.</p> CSS3 only cover flow https://stephaniehobson.ca/posts/css3-only-cover-flow/ Fri, 28 May 2010 22:40:44 +0000 https://stephaniehobson.ca/posts/css3-only-cover-flow/ <p>Nothing teaches me how to do something like a project and I was trying to learn CSS3 so I tried to make a CSS only cover flow.</p> <p>Some of it works in FireFox but all the cool stuff works best in webkit: <a href="https://stephaniehobson.ca/coverflow/#sky">here&rsquo;s as far as I got</a>.</p> <p>Have fun with it :)</p> 2009 in Review https://stephaniehobson.ca/posts/2009/ Fri, 08 Jan 2010 19:09:46 +0000 https://stephaniehobson.ca/posts/2009/ <p>My year in review <a href="https://powazek.com/posts/2219">Powazek style</a>.</p> <p>JAN: New Years at Joel&rsquo;s. Seren born. Yelling and crying.</p> <p>FEB: Mum&rsquo;s nomination meeting. Elected to strata council.</p> <p>MAR: Giants Fan Bus.</p> <p>APR: I check into my first <a href="http://gowalla.com">Gowalla</a> spot.</p> <p>MAY: My temporary roommate drops her phone down an elevator shaft after a <a href="http://colonelpanic.ca/">Colonel Panic</a> concert. Ultimate with H.A.M.M.E.R. starts.</p> <p>JUN: Program catalogue launch. Asthon Lane, Inverness and @media.</p> <p>JUL: Fireworks with Sue. Decemberists.</p> <p>AUG: Camping. Victoria. Drive-in movie. Summerland.</p> <p>SEP: Copyfight. Franz Ferdinand and Great Big Sea.</p> <p>OCT: Barcamp. Whistler.</p> <p>NOV: Hopscotch. Bought the hat. San Francisco. Bad things happen to good people.</p> <p>DEC: UXCamp. We survived Christmas party. Quebec.</p> I lie to Batman https://stephaniehobson.ca/posts/i-lie-to-batman/ Thu, 17 Dec 2009 22:16:51 +0000 https://stephaniehobson.ca/posts/i-lie-to-batman/ <p><em><strong>Note:</strong> If you&rsquo;re following me because you&rsquo;re a code geek, like I am, and you want only my web design related feed and posts <a href="https://stephaniehobson.ca/tags/webdesign/">they have their own tag now</a>.</em></p> <p>I was asked the other night who my favourite comic book character is and anyone who knows me would answer without hesitation: Batman. They&rsquo;d be close.</p> <p>It&rsquo;s Robin all the way.</p> <p>Not Dick Grayson, Jason Todd, or Tim Drake - Robin. You know, that colourful target that swings into action next to the dark knight.</p> <figure><img src="robin.jpg" alt="Don&#39;t doubt Robin is a bad ass. He lies to Batman."/> </figure> <p>I like the idea that Batman needs a little bit of light to balance his darkness. I like the energy, optimism, and ingenuity of a kid fighting in an adult world.</p> <p>Who&rsquo;s your favourite?</p> Maintaining your CSS helps maintain your site https://stephaniehobson.ca/posts/maintaining-css-help-maintain-site/ Thu, 10 Dec 2009 12:02:44 +0000 https://stephaniehobson.ca/posts/maintaining-css-help-maintain-site/ <p>Rather than doing one giant redesign and launch, at BCIT, we&rsquo;ve been doing small updates for a while now.</p> <p>Take our footer for example, I got to update all of them using the CSS a few times and then we decided we wanted to mix up the HTML. Templates and applications were updated with the new code in phases. There were a few different ways the CSS for this could have been managed but I chose to have the old code co-exist with the new in the same style sheet and differentiated the two with IDs (let&rsquo;s say I called them #footer and #fatfooter).</p> <p>We&rsquo;ve phased in #fatfooter slowly across the 46ish templates, 3 CMSs, and only Brandon knows how many applications with their own code that make up our website.</p> <p>We should be done now and, unintentionally, I made it easy for us to check. A quick search of the server for id=&ldquo;footer&rdquo; turned up all the stragglers.</p> <p>Some of the stragglers had been neglected for a while and turned out to need more than just a new footer&hellip;</p> <p>So what&rsquo;s languishing in your code that you can delete?</p> Why Abstract Sequential? https://stephaniehobson.ca/posts/why-abstract-sequential/ Thu, 12 Nov 2009 22:02:24 +0000 https://stephaniehobson.ca/posts/why-abstract-sequential/ <p>Short answer: it&rsquo;s my thinking style :)</p> <p>It means I enjoy theory, logic, precision and abstract thought and that I learn best through lecture, independent research, and following procedures. This means I love web design but makes my blog very, very boring.</p> <p>It&rsquo;s one of four learning styles as categorized by Dr. Anthony F. Gregorc. (I totally just Googled that). I first heard about my style from my teacher and friend Cheryl Atwater. The thinking styles are actually very useful for figuring out how to deal with people. For example, if you&rsquo;re discussing something with me you&rsquo;re more likely to persuade me with logic than heartfelt pleas ;)</p> <p>The other three styles are: abstract random, concrete random, and concrete sequential. The fun stuff starts once you know which you are or which one that person at work who drives you up the wall is. Floating Neutrinos has a great information page summarizing each style&rsquo;s<a href="http://www.floatingneutrinos.com/Message/arcs/links_on_abstractrandom.htm"> learning preferences, strengths, and weaknesses</a>.</p> <p>You may be able to figure out which one is you just by<a href="http://people.usd.edu/~ssanto/gregorc.html"> reading the descriptions</a>, but here&rsquo;s a good old fashioned <a href="http://www.thelearningweb.net/personalthink.html">pen and paper quiz</a> to help you figure it out.</p> Imperfect Pitch https://stephaniehobson.ca/posts/imperfect-pitch/ Tue, 03 Nov 2009 13:07:02 +0000 https://stephaniehobson.ca/posts/imperfect-pitch/ <p>There&rsquo;s been <a href="http://www.speakoutoncopyright.ca/">a lot of talk about</a> <a href="http://www.faircopyrightforcanada.ca/">copyright in Canada</a> lately since we&rsquo;ve been trying to perfect the updates the Conservatives are pitching to our outdated copyright legislation - so reading about Jeremy&rsquo;s copyright woes in his recent post <a href="https://adactio.com/journal/1623/">Perfect Pitch</a> really struck a chord.</p> <p>He discovered <a href="http://www.thesession.org/discussions/display/21250">a page in The Sessions&rsquo;s discussion form about perfect pitch</a> had been removed from Google search results due to a copyright infringement <em>accusation</em> by a company that makes a product called Perfect Pitch - the page isn&rsquo;t about the product and, in fact, barely mentions it. So there <em>wasn&rsquo;t</em> a copyright infringement but fighting it might require someone to show up in a California court room.</p> <p>The usual method for dealing with DMCA complaints is to contact the ISP, not search engines. So why did this company without a valid complaint go to Google? Well, one goes to Google to get sites removed from search results. Maybe&hellip; search results where it is pushing down your company&rsquo;s results?</p> <figure><img src="google.jpg" alt="Google search results for perfect pitch - showing DMCA take down notice."/> </figure> <p>We don&rsquo;t know, we don&rsquo;t have the full story here, but it wouldn&rsquo;t be the first time a DMCA has been filed to remove content which isn&rsquo;t infringing on anyone&rsquo;s copyrights. <a href="http://www.eff.org/deeplinks/2008/10/mccain-campaign-feels-dmca-sting">It happened to political videos during the US Presidential elections</a> and it <em>scares</em> me.</p> <p>This is a poignant example of why we need to think our new legislation through very carefully, and why I support a &ldquo;notice and notice&rdquo; system instead of the DMCA&rsquo;s &ldquo;notice and take down&rdquo; one.</p> <p><em>UPDATE: The Perfect Pitch people contacted Jeremy with <a href="https://adactio.com/journal/1624/">an explanation</a> and are attempting to reverse their submission. It was laziness, not malice, which in some ways makes it even scarier.</em></p> Quick spam solution for email forms https://stephaniehobson.ca/posts/quick-spam-solution-for-email-forms/ Fri, 30 Oct 2009 22:23:53 +0000 https://stephaniehobson.ca/posts/quick-spam-solution-for-email-forms/ <p>I&rsquo;ve noticed spammers tend to try to fill out your whole form before trying to submit their spam. A while ago I tried adding a simple radio button field to the form with the value &ldquo;this is probably spam&rdquo;, and then hiding it with CSS.</p> <p>The spam robots helpfully check the box for you before submitting, and you can set an email filter to trash all all the responses which have it checked.</p> <p>Remember to label it appropriately so your users with CSS off know what to do with it ;)</p> Why I follow my heroes on Twitter https://stephaniehobson.ca/posts/why-i-follow-my-heroes/ Wed, 20 May 2009 22:04:29 +0000 https://stephaniehobson.ca/posts/why-i-follow-my-heroes/ <p>A few of the people I follow on Twitter lately have made blog posts or tweets about their followers trying to tell them how to tweet. They&rsquo;ve all been asked to stop Twittering personal stuff and keep providing free good advice and the response has been, &ldquo;If you don&rsquo;t like it, don&rsquo;t follow.&rdquo;</p> <p>I just want to go on the record and say I <em>like</em> the personal tweets.</p> <p>I like knowing that despite their mega awesome coding skills they still have problems with clients.</p> <p>I like knowing that while working on that beautiful design they spent an hour moving something 2 pixels to the left and then 2 pixels to the right, and then 2 pixels to the left..</p> <p>I like knowing that they still get nervous about giving presentations, lie awake at night wondering which tag would be more semantic, over dose on caffeine or have a sushi addiction.</p> <p>I like knowing that despite their commitment to user experience design, web standards, and innovation, they all go home at the end of the day to people and things they think are more important than their work - and those aren&rsquo;t always going the way they want either.</p> <p>I like knowing that they&rsquo;re human, because it makes it okay for me to be human too.</p> <hr> <p>In case you&rsquo;re wondering who I&rsquo;m talking about: <a href="https://twitter.com/zeldman">zeldman</a> <a href="https://twitter.com/fraying">fraying</a> <a href="https://twitter.com/meyerweb">meyerweb</a> <a href="https://twitter.com/hchamp">hchamp</a> <a href="https://twitter.com/mezzoblue">mezzoblue</a></p> Should I stay or should I go? https://stephaniehobson.ca/posts/should-i-stay-or-should-i-go/ Sun, 22 Mar 2009 15:08:43 +0000 https://stephaniehobson.ca/posts/should-i-stay-or-should-i-go/ <p>What should a personal website look like? What should it be for? Am I a person or a business? And what if the latest trend is for your business to be human. Stephaniehobson.ca was supposed to be a personal blog for business stuff but that&rsquo;s, well, <em>boring</em> for me and for you. So I&rsquo;m thinking of re-doing it.</p> <p>I&rsquo;m going to use this site to bring together all my activities from around the web in one place. Yeah, I know, I always have big plans, but this time I have a deadline (I hope)! I would like it done before I attend @media 2009.</p> <p>But I&rsquo;m stalled on starting because I&rsquo;m caught in a debate between leaving the other sites as the authoritative source and trying to make local copies of everything in case those other sources disappear (yes I kept my bookmarks on magnolia, how did you know?).</p> <p>The public vs private nature of this space is also a bit of a conundrum. My business contacts and potential employers <em>will</em> see this space first if they Google me. This is my first impression, what does it say about me if I&rsquo;ve been listening to ABBA and bookmarking lol cats? (Yeah, okay, I could be worse.)</p> What would you change? https://stephaniehobson.ca/posts/what-would-you-change/ Wed, 14 Jan 2009 10:53:21 +0000 https://stephaniehobson.ca/posts/what-would-you-change/ <p>Most companies are fumbling around unsure of how to use this new social media thing to market themselves, and educational institutes are no different. With so much of our target audience using social media it&rsquo;s particularly important for us.</p> <p>BCIT&rsquo;s Marketing and Communications department came to us (Web Services) last year and said - we need to do this, and we need your help. So the two groups came together and <a href="http://whatwouldyouchange.ca">What Would You Change?</a> was born.</p> <p>What Would You Change? is meant to be a place for discussion about change, any kind of change, that you would like to make. There&rsquo;s a couple tools in place for discussion, recorded videos, short text messages, and a photo mashup generator that lets you paste a picture of what you&rsquo;d change over the thing you want to change. We&rsquo;re hoping to integrate with social media better as time goes on - there are plans for Twitter and Facebook app tie-ins and you can already share your creations virtually everywhere :)</p> <p>I started by adding a window to my office:</p> <p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="480" height="360" id="viewer" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="http://whatwouldyouchange.ca/sites/viewer/viewer.swf" /><param name="FlashVars" value="xmldoc=http://whatwouldyouchange.ca/show-us/xml/213&xmlfiletype=Default" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="http://whatwouldyouchange.ca/sites/viewer/viewer.swf" quality="high" bgcolor="#ffffff" width="480" height="360" name="viewer" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" flashvars="xmldoc=http://whatwouldyouchange.ca/show-us/xml/213&xmlfiletype=Default" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></p> <p><a href="http://whatwouldyouchange.ca">What Would You Change?</a></p> Stuff I'd like to see Google Reader do https://stephaniehobson.ca/posts/stuff-id-like-to-see-google-reader-do/ Mon, 15 Sep 2008 16:21:16 +0000 https://stephaniehobson.ca/posts/stuff-id-like-to-see-google-reader-do/ <p>I wish I could filter my feeds like I do my email, marking the news items in my web comic feeds as read automatically and blocking (deleting? marking as read?) feeds originating at certain URLs (some of my friends have different&hellip; taste than I do&hellip; repeatedly).</p> <p>I also wish I could share my feeds with different audiences in mind. Right now what I share is pretty bland because my clients, friends, and family all see it. I can&rsquo;t export only fun shared items to my Facebook profile and only web related shared items to my blog everything I share goes everywhere.</p> <p>I used to wish I could use the handy bookmarklets to page through my items and have a handy way to share but they solved that with the notes bookmarklet.</p> <p>That said, I live in Reader these days, I check it as much as I do my email!</p> Links from An Event Apart 2008 - Day Two https://stephaniehobson.ca/posts/links-from-an-event-apart-2008-day-two/ Tue, 19 Aug 2008 16:54:05 +0000 https://stephaniehobson.ca/posts/links-from-an-event-apart-2008-day-two/ <dl> <dt><a href="http://edenbee.com/">Edenbee</a></dt> <dd>Social networking and carbon footprints by Clearleft.</dd> <dt><a href="https://alistapart.com/articles/dao">A Dao of Web Design</a></dt> <dd>Jeremy Keith says everyone must read this. It talks about giving up pixel perfect control of the display of your websites.</dd> <dt><a href="http://code.google.com/apis/socialgraph/">Google social graph API</a></dt> <dd>Traces XFN and hCard references to connect your different profiles and find out who you are connected to.</dd> <dt><a href="https://en.wikipedia.org/wiki/SCRUM">SCRUM</a></dt> <dd>Replacement for the waterfall development method. It&rsquo;s agile. Recommended by Kelly Goto.</dd> <dt><a href="http://snapshot.trulia.com/CA/San_Francisco/#most_expensive">Trulia Snapshot</a></dt> <dd>Data visualization by Stamen - using real estate in San Francisco.</dd> <dt><a href="http://www.rescuetime.com/">Rescue Time</a></dt> <dd>Track what you spend time doing on your computer.</dd> </dl> Links from An Event Apart 2008 - Day One https://stephaniehobson.ca/posts/links-from-an-event-apart-2008-day-one/ Mon, 18 Aug 2008 22:21:20 +0000 https://stephaniehobson.ca/posts/links-from-an-event-apart-2008-day-one/ <dl> <dt><a href="http://bobulate.com/">Bobulate</a></dt> <dd>Can&rsquo;t remember why it was mentioned but it is about IA and looks interesting.</dd> <dt><a href="https://www.wired.com/">Wired</a></dt> <dd>Apparently half the people in the room read it. Jason used it as an example of how print can be very cool looking but the web is missing that pizzaz for individual articles.</dd> <dt><a href="http://www.nytimes.com/2008/08/03/magazine/03trolls-t.html?pagewanted=1&amp;_r=1">NY Times articles about Trolls</a></dt> <dd>Don&rsquo;t feed the trolls. One of the trials of community managers.</dd> <dt><a href="http://flickr.com/groups/flickrcolorcontest/">Flickr Colouring Contest</a></dt> <dd>Making lemonaid out or error messages as part of community management.</dd> <dt><a href="http://improveverywhere.com/">Improve Everywhere</a></dt> <dd>Organizers of no pants day.</dd> <dt><a href="http://abriefmessage.com/">A Brief Message</a></dt> <dd>200 word articles on design.</dd> <dt><a href="http://icedorhot.com/">Iced or Hot</a></dt> <dd>The example website from Dan Cedarholm&rsquo;s talk. The code is good but the data is not live.</dd> <dt><a href="http://dowebsitesneedtolookexactlythesameineverybrowser.com/">http://dowebsitesneedtolookexactlythesameineverybrowser.com/</a></dt> <dd>It doesn&rsquo;t look the same in all browsers.</dd> <dt><a href="http://labs.adobe.com/">Adobe Labs.</a></dt> <dd>Dreamweaver CS4 Beta.</dd> </dl> <p>Also, <a href="https://adactio.com/journal/1504/">Jeremy Keith live blogged the whole works</a> from the front row.</p> New site for my favorite client https://stephaniehobson.ca/posts/new-site-for-my-favorite-client/ Thu, 14 Aug 2008 17:40:06 +0000 https://stephaniehobson.ca/posts/new-site-for-my-favorite-client/ <p>Just updated the look of Mum&rsquo;s campaign website: <a href="http://barbhobson.ca">Barb Hobson | A Strong Persistent Voice for Coquitlam-Maillardville</a>. I changed everything without altering one line of HTML, man do I love CSS <small>(IE6, I still hate you)</small>.</p> Accessibility Problem with Gilder/Levin Image Replacement Method https://stephaniehobson.ca/posts/accessibility-problem-with-gilderlevin-image-replacement-method/ Mon, 11 Aug 2008 21:03:13 +0000 https://stephaniehobson.ca/posts/accessibility-problem-with-gilderlevin-image-replacement-method/ <p>I have a friend who lives his life in low contrast. He is frequently the inspiration I need to go the extra mile and find an accessible solution to a programing quandary. A few weeks ago I had the good fortune to get to visit him and we cruised around the internet while drinking Rusty Nails so I could walk in his shoes for a bit.</p> <p>His computer is set up to use one of Windows XP&rsquo;s high contrast colour schemes and he also makes use of IE&rsquo;s ability to override a website&rsquo;s CSS.</p> <p>He started by showing me his university&rsquo;s home page and complaining about the large black areas which (on my computer) corresponded to the header and main navigation. After a quick look at the code I got the sinking feeling I knew exactly what was happening, and a quick look at the BCIT home page confirmed it. IE7 was giving any elements with a background image defined a black background regardless of the background colour they were assigned in the element.</p> <p>The <a href="https://www.google.com/search?q=gilder+levin+image+replacement&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t&amp;rls=org.mozilla:en-US:official&amp;client=firefox-a">Gilder/Levin method</a> basically positions a span with a background image over top of the text you want to replace. In theory, if images are not being displayed the text beneath will show through the otherwise transparent span. IE gives these spans a black background even though they should be transparent.</p> <p>The screen cap below show the BCIT home page, with the black areas corresponding to span tags using the Gilder/Levin method to place images. You can also see that we&rsquo;ve changed all of IE7&rsquo;s accessibility settings to white in an attempt to figure out which one is causing the change without success:</p> <p><a href="https://www.flickr.com/photos/stephaniehobson/2756056310/"><figure><img src="problem.jpg" alt="BCIT home page, with black areas where there should be text"/> </figure> </a></p> <p>I tried many things but nothing could be done with CSS to fix it. Considering most image replacement techniques use background images of one form or another I imagine the problem happens quite frequently. My friend was still able to navigate (albeit uncomfortably) by hovering his mouse over the navigation menus and reading the tool tips.</p> <p>The moral of this story could be something about roads to hell and good intentions, but I think the real lesson here is that all accessibility testing should be done over Rusty Nails. Go buy yourself some Drambuie.</p> Eight random things https://stephaniehobson.ca/posts/eight-random-things/ Fri, 02 May 2008 04:30:27 +0000 https://stephaniehobson.ca/posts/eight-random-things/ <p>In the spirit of <a href="https://adactio.com/journal/1449">Jeremy Keith&rsquo;s post</a>, here&rsquo;s 8 random things I see about me:</p> <ol> <li>Black queen carved like Raven.</li> <li>Small brass Buddha.</li> <li>Wind up penguin.</li> <li>iPhone.</li> <li>Microformats pocket cheat sheet.</li> <li>Salt.</li> <li>8.5 x 11 print out of the gMail &ldquo;mvelope&rdquo;.</li> <li>Label from a Christmas present: &ldquo;To Steph Love, Joel, Jim &amp; Mrs. A.&rdquo;</li> </ol> <p>You&rsquo;re it.</p> Bookstore wins a hubbie https://stephaniehobson.ca/posts/bookstore-wins-a-hubbie/ Wed, 16 Apr 2008 15:15:10 +0000 https://stephaniehobson.ca/posts/bookstore-wins-a-hubbie/ <p>Almost a year ago now the <a href="https://bcitbookstore.ca">BCIT Bookstore</a> let Web Services know that the e-commerce application they used to manage their online sales was upgrading and asked if we&rsquo;d like to help skin the new site. The department was pretty busy at the time and my manager said we didn&rsquo;t have time to help out but put them in contact with me so I could direct them to the style guide and technical guidelines.</p> <p>I had a look at the application and decided we could do better than that so I asked my manager if I could do some follow up and he said it was okay as long as it didn&rsquo;t interfere with my other work.</p> <p>I met with the Bookstore intending only to talk about the web app but ended up talking about their static store front just as much. Because of the way their inventory and software work they have not one but three online stores and they have trouble communicating the difference to their customers. They also felt like some of their most important information, like their return policy, was buried.</p> <p>Skinning the e-commerce sites was relatively easy. The new version of the application was set up logically with good CSS tags and lots of includes. Not only that, the default layout was very easy to transform into the existing template I wanted to mimic.</p> <p>I started off with this: <a href="https://www.flickr.com/gp/stephaniehobson/55n4v1" title="Larger version."><img src="https://farm2.staticflickr.com/1179/1116075730_3f24897c6b_z.jpg?zz=1" alt="BCIT Bookstore Store - Original"></a></p> <p>And created this: <a href="https://www.flickr.com/gp/stephaniehobson/n1jY39" title="Larger version."><img src="https://farm2.staticflickr.com/1419/1116007176_a9513dd1a0_z.jpg?zz=1" alt="Bookstore Store - New Version"></a></p> <p>For the static store front I made some changes to the left navigation based on the most desired pages, created three clear calls to action, placed the catch all action at the bottom of the list instead of the top of the list of options, and separated the two unrelated messages contained in the single page block on the right.</p> <p><a href="https://www.flickr.com/gp/stephaniehobson/LUT5X7" title="Larger version."><img src="https://farm2.staticflickr.com/1049/1115949204_8f4502331e_z.jpg?zz=1" alt="Original BCIT Bookstore"></a></p> <p><a href="https://www.flickr.com/gp/stephaniehobson/PWPA1R" title="Larger version."><img src="https://farm2.staticflickr.com/1397/1115948514_4dc00bb7d2_z.jpg?zz=1" alt="BCIT Bookstore with some touch ups"></a></p> <p>I worked off the side of my desk for a few months on it, meeting with the bookstore a few times, and when I was done they were happy enough with the results to email my manager and thank me in the Campus Update newsletter!</p> <p>My manger called me into his office to talk about it and I thought, &ldquo;Uh-oh, what if he&rsquo;s upset I spent so much time working on this?&rdquo; But I worried unnecessarily since he proceeded to tell me how it was good interaction design :)</p> <p>Campus Hub, the third party company who hosts the actual stores liked it so much they&rsquo;ve been directing people who want to skin their stores to talk to me for advice, and to top it all off, <a href="https://www.bcit.ca/news/events/event04180800000001.shtml">they awarded the store with a &ldquo;Hubbie&rdquo; for usability</a>.</p> Two steps forward, one step back https://stephaniehobson.ca/posts/two-steps-forward-one-step-back/ Tue, 04 Mar 2008 15:34:30 +0000 https://stephaniehobson.ca/posts/two-steps-forward-one-step-back/ <p>Tuesday I was a guest speaker at Mrs.A&rsquo;s gifted class. She&rsquo;s teaching a group of 9-12 year olds web design and asked if I&rsquo;d come in an talk for an afternoon.</p> <p>So I spent 30 minutes talking to them about the basics of user centred design and how the internet works. Then I helped them trouble shoot their table based layouts and font tags.</p> Web Directions North 2008 https://stephaniehobson.ca/posts/web-directions-north-2008/ Thu, 21 Feb 2008 20:22:53 +0000 https://stephaniehobson.ca/posts/web-directions-north-2008/ <p>Just like last year I thought I&rsquo;d post my summary of the conference that I distributed to my department. If I have any regular readers at all, it&rsquo;s probably a little too general to do you any good but I&rsquo;m happy to answer questions:</p> <p>Web Directions North is an internationally respected conference for web professionals. This year’s conference was a good high level overview of the new trends and technologies online. Some of these trends are emerging organically and we need to react to them and others are good ideas which need the support of developers to be adopted.</p> <dl> <dt>While the talks covered a variety of subjects there was a lot of overlap on these main themes:</dt> <dt>Open data</dt> <dd>Open data formats like XFN, microformats, and APIs are encouraging sites to share data between them. This allows sites to combine data for display in new ways, to make new connections between data, and to formulate it is more user friendly ways. Users may one day be able to manage their profiles, passwords, and social networks from one central account.</dd> <dt>Mobile &amp; Accessible Interfaces</dt> <dd>In a few years there will be more people in the world with the ability to access the web with a mobile device than with a computer. Designing for browsing devices challenges designers to consider different contexts and device capabilities. Bright sunlight makes low contrast sites hard to read, common input devices like a keyboard and mouse may not be available. These are the same challenges developers face making interfaces accessible and there are over lapping.</dd> <dt>Dynamic User Interfaces</dt> <dd>Many websites are providing their users with the ability to customize what information is displayed to them and how. Many more sites which don’t provide these services are being altered by users anyway using <a href="http://lifehacker.com/software/exclusive-lifehacker-download/better-gmail-2-firefox-extension-for-new-gmail-320618.php">special browser add-ons</a> or websites which take data from <a href="http://digg.com/">existing websites</a> and find <a href="http://labs.digg.com/arc/">new ways to display it</a>.</dd> </dl> <p>There are also ties between these three trends – open and accessible data is easier to gather for customization with a different user interfaces which take into account different user needs like mobility or accessibility. Some examples:</p> <dl> <dt><a href="http://ironfeathers.ca/routes/13/">Ironfeathers</a></dt> <dd>This site uses Google Maps API to display running routes but it has removed the inaccessible Google Map controls and replaced them with their own custom accessible buttons. Try zooming in on the map in Google Maps using only your keyboard – then try it on Ironfeathers.</dd> <dt><a href="http://sf.everyblock.com/locations/neighborhoods/downtowncivic-center/by-type/">Everyblock</a></dt> <dd>This site brings together data from government websites for the police and city hall, commercial sites like craigslist and social sites like Flickr in one place where it customizes it to make it more accessible, searchable, and explorable.</dd> <dt><a href="https://twitter.com/">Twitter</a></dt> <dd>This site has an open API and presents all its data as microformats. It has made it super easy for spin off sites like <a href="http://foamee.com/">foamee</a>. Foamee doesn’t require you to create a new username, password and profile – it just makes use of your twitter one. You don&rsquo;t login and update foamee from your computer you just text message it.</dd> </dl> <p>I also had good conversations with the Microsoft representatives about the version meta tag they are planning on introducing in IE8, the BBC team about CMSs and centralized CSS (we’ve got it easy), and several free lance designers about client management strategies.</p> <p>It was encouraging to see that BCIT is headed in the right direction with the incorporation of microformats into contacts and VTcal, to get confirmation that standards are still the leading industry concern, and know that our work on the Marqui templates will be moving us in the right direction to create a mobile version of the site.</p> Keeping up https://stephaniehobson.ca/posts/keeping-up/ Thu, 21 Feb 2008 20:19:31 +0000 https://stephaniehobson.ca/posts/keeping-up/ <blockquote> <p>&ldquo;From your 77 subscriptions, over the last 30 days you read 809 items&hellip;&rdquo;</p> </blockquote> <p>No wonder I don&rsquo;t read any books any more.</p> Finally figured out what my problem is https://stephaniehobson.ca/posts/finally-figure-out-what-my-problem-is/ Tue, 05 Feb 2008 11:18:38 +0000 https://stephaniehobson.ca/posts/finally-figure-out-what-my-problem-is/ <p>I read John Resig&rsquo;s article <a href="http://ejohn.org/blog/sub-pixel-problems-in-css/">Sub-Pixel Problems in CSS</a> a few days ago and found it to very useful information.</p> <p>And then today I had an &ldquo;ah-ha&rsquo; moment - this <em>this</em> is why I hate coding flexible horizontal navigation menus.</p> Google Launches Social Graph API https://stephaniehobson.ca/posts/google-launches-social-graph-api/ Mon, 04 Feb 2008 13:10:58 +0000 https://stephaniehobson.ca/posts/google-launches-social-graph-api/ <p>There were several speakers at WDN who spoke about open social networks, portability and consolidating friend information across applications. I found the talks interesting and then, while we were still at the conference, Google announced a <a href="http://code.google.com/apis/socialgraph/">Social Graph API</a> aiming to do just what we&rsquo;d been talking about.</p> Links to check out from WDN08 https://stephaniehobson.ca/posts/links-to-check-out-from-wdn08/ Fri, 01 Feb 2008 13:03:54 +0000 https://stephaniehobson.ca/posts/links-to-check-out-from-wdn08/ <dl> <dt><a href="http://ejohn.org/blog/javascript-library-overview/">JavaScript Libraries Overview</a></dt> <dd>recommended by Cameron Adams as good comparison of major libraries</dd> <dt><a href="http://www.twine.com/">Twine</a></dt> <dd>called Web 3.0 by Boris Mann</dd> <dt><a href="http://www.blueflavor.com/blog/mobile/dotmobi_mobile_web_developers_guide.php">dotMobi Mobile Web Developer&rsquo;s Guide</a></dt> <dd>by Brian Fling</dd> <dt><a href="http://www.developershome.com/wap/xhtmlmp/">XHTML Mobile Profile Tutorial</a></dt> <dd>apparently if we know XHTML we know XHTML-MP, almost</dd> <dt><a href="http://openid.net/">OpenID</a></dt> <dd>single sign on for the internet</dd> <dt><a href="http://microformats.org/wiki/social-network-portability">microformats.org/wiki/social-network-portability</a></dt> <dd>mentioned by Brain Oberkirch&rsquo;s talk on data portabilty</dd> <dt><a href="http://oauth">OAuth.net</a></dt> <dd>mentioned by Brain Oberkirch&rsquo;s talk on data portabilty</dd> <dt><a href="http://code.google.com/p/diso/">DiSo</a></dt> <dd>Distributed Social networking applications development community</dd> <dt><a href="http://www.kayak.com/">kayak</a></dt> <dd>good example of potential use of portable data</dd> <dt><a href="http://upcoming.yahoo.com/">upcoming</a></dt> <dd>I have been instructed to get an account</dd> <dt><a href="http://getsatisfaction.com/">getsatisfaction</a></dt> <dd>people powered customer service</dd> <dt><a href="http://foamee.com/">foamee</a></dt> <dd>doesn&rsquo;t require account creation, just uses your twitter info</dd> <dt><a href="http://cabspotting.org/">cabspotting.org</a></dt> <dd>live data visualization of cab locations in San Francisco, they don&rsquo;t lay the data on a map, the data makes it&rsquo;s own map</dd> </dl> Missing table based layouts https://stephaniehobson.ca/posts/missing-table-based-layouts/ Fri, 18 Jan 2008 18:17:35 +0000 https://stephaniehobson.ca/posts/missing-table-based-layouts/ <p>There&rsquo;s only one time where I ever really miss table based layouts: when I&rsquo;m trying to make a flexible horizontal navigation bar with centred links. Like <a href="https://www.bcit.ca">this</a> or this](<a href="http://louisgervais.com">http://louisgervais.com</a>) website I made for a Vancouver gourmet catering company. <em>chews on keyboard with frustration</em></p> I would live with dial up if it meant I could live here. https://stephaniehobson.ca/posts/i-would-live-with-dial-up-if-it-meant-i-could-live-here/ Mon, 31 Dec 2007 11:00:29 +0000 https://stephaniehobson.ca/posts/i-would-live-with-dial-up-if-it-meant-i-could-live-here/ <p>One of my bestest friends lives in the middle of no where. High speed internet has not yet come to this island so I&rsquo;m on dial up today, which is leading to interesting discoveries.</p> <p>For example, IE6 loads images in the html before it loads background images from the CSS. Very interesting.</p> <p>Also, turning off the images is not that easy. I wonder how true the assertion that people with dial up turn them off is.</p> <p>Bonne Annee!</p> CSS bug in IE 6 with: .class a:hover element https://stephaniehobson.ca/posts/css-bug-in-ie-6-with-class-ahover-element/ Wed, 19 Dec 2007 14:49:05 +0000 https://stephaniehobson.ca/posts/css-bug-in-ie-6-with-class-ahover-element/ <p>This bug seems to apply to styling elements under a class or id within a link on hover. Stuff like <code>.class a:hover span{}</code> or <code>#id a:hover strong{}</code>. The solution is to define a property on the parent link <code>.class a:hover{}</code> that hasn&rsquo;t been declared anywhere else in your CSS, like a text indent of 0 or something.</p> <p>All the work for the solution was done by <a href="http://www.tanfa.co.uk/css/articles/pure-css-popups-bug.asp">Tanfa, who wrote an article on IE Pure CSS Pop Ups Bug</a>, I just thought it was worth mentioning that this bug can be generalized to more than the CSS menus.</p> <p>Here&rsquo;s what happened to me:</p> <p>I had some text inside a link, and I wanted some of it to do one thing when rolled over and some of it to do something else. I marked it up like this:</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;promo&#34;</span><span class="p">&gt;</span> </span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>News<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span> </span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&#34;link.html&#34;</span><span class="p">&gt;</span>IE has lots of bugs<span class="p">&lt;</span><span class="nt">strong</span><span class="p">&gt;</span>read more<span class="p">&lt;/</span><span class="nt">strong</span><span class="p">&gt;</span>.<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span> </span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span> </span></span></code></pre></div><p>It&rsquo;s sort of a solution to the fact that &ldquo;read more&rdquo; makes bad link text. Bad. And I don&rsquo;t write the copy.</p> <p>Then I tried to style it with something like this:</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="c">/* default link behaviour */</span> </span></span><span class="line"><span class="cl"><span class="nt">a</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">text-decoration</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="k">color</span><span class="p">:</span> <span class="mh">#8ec3e2</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nt">a</span><span class="p">:</span><span class="nd">visited</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">color</span><span class="p">:</span> <span class="mh">#6d80a8</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nt">a</span><span class="p">:</span><span class="nd">hover</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">color</span><span class="p">:</span> <span class="mh">#c1fcff</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="c">/* overrides for this element */</span> </span></span><span class="line"><span class="cl"><span class="p">.</span><span class="nc">promo</span> <span class="nt">a</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">color</span><span class="p">:</span> <span class="mh">#000</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="p">.</span><span class="nc">promo</span> <span class="nt">a</span><span class="p">:</span><span class="nd">hover</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">color</span><span class="p">:</span> <span class="mh">#000</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="p">.</span><span class="nc">promo</span> <span class="nt">a</span> <span class="nt">strong</span><span class="o">,</span> </span></span><span class="line"><span class="cl"><span class="p">.</span><span class="nc">promo</span> <span class="nt">a</span><span class="p">:</span><span class="nd">visited</span> <span class="nt">strong</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">color</span><span class="p">:</span> <span class="mh">#8ec3e2</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="k">display</span><span class="p">:</span> <span class="kc">block</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="p">.</span><span class="nc">promo</span> <span class="nt">a</span><span class="p">:</span><span class="nd">hover</span> <span class="nt">strong</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">color</span><span class="p">:</span> <span class="mh">#c1fcff</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre></div><p>Which did exactly what I wanted it to do&hellip; in FireFox but in IE 6 the hover was not displaying properly. After a little tinkering the IE bug alarm bells started going off in the back of my head and Google provided <a href="http://www.tanfa.co.uk/css/articles/pure-css-popups-bug.asp">Tanfa&rsquo;s article on IE Pure CSS Pop Ups Bug</a> in response to my query.</p> <p>I added float:none to my declaration for <code>.promo a:hover{}</code> and all is now well :)</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="p">.</span><span class="nc">promo</span> <span class="nt">a</span><span class="p">:</span><span class="nd">hover</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">float</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span> </span></span><span class="line"><span class="cl"><span class="p">}</span> </span></span></code></pre></div><p>Thank you Tanfa!</p> These are a few of my favourite things https://stephaniehobson.ca/posts/these-are-a-few-of-my-favourite-things/ Fri, 14 Dec 2007 12:55:33 +0000 https://stephaniehobson.ca/posts/these-are-a-few-of-my-favourite-things/ <p><a href="https://24ways.org/2007/underpants-over-my-trousers">Comics and web design together at last!</a></p> We made the cut! https://stephaniehobson.ca/posts/we-made-the-cut/ Tue, 04 Sep 2007 11:50:43 +0000 https://stephaniehobson.ca/posts/we-made-the-cut/ <p>One of the videos we made <a href="https://stephaniehobson.ca/posts/10-seconds-of-my-15-minutes/" title="Blog post I made the other day about making gmail videos.">the other day</a> made the cut into the final <a href="http://mail.google.com/mail/help/gmail_video.html">Gmail behind the scenes video</a>.  <a href="http://www.alistair.com/">Alistair</a>&rsquo;s fancy editing shows the three of us morphing between chin up bars with 1:37 left to go.</p> <p>A second video of ours was chosen as a featured clip. If you got to the page with the final <a href="http://mail.google.com/mail/help/gmail_video.html">Gmail behind the scenes video</a> and scroll down to the map, our multi monitor video appears if you click the Vancouver icon.</p> No, wait, I wasn't done reading that! https://stephaniehobson.ca/posts/no-wait-i-wasnt-done-reading-that/ Sun, 12 Aug 2007 00:23:34 +0000 https://stephaniehobson.ca/posts/no-wait-i-wasnt-done-reading-that/ <p>When I went on vacation a few weeks ago I got a little behind on my RSS feeds. I&rsquo;d manage to whittle it down from almost 200 unread articles to about 40 over the course of the month, while keeping up with all the new articles, and I was feeling pretty good about it when I went to switch my view from new items to all items and hit &ldquo;mark all as read&rdquo; instead.</p> <p>Noooooooooooo!</p> <p>This is an unrecoverable error. There&rsquo;s no undo and there&rsquo;s no way to mark an article more than a certain number of days (30?) old as unread again even if I open it individually.</p> <p>A quick visit to the Reader group confirms that I&rsquo;m not crazy and I&rsquo;m not the only one who has done this.</p> <p>What gives Google?</p> 10 seconds of my 15 minutes https://stephaniehobson.ca/posts/10-seconds-of-my-15-minutes/ Fri, 10 Aug 2007 15:32:34 +0000 https://stephaniehobson.ca/posts/10-seconds-of-my-15-minutes/ <p>Google is having <a href="https://www.facebook.com/note_redirect.php?note_id=4253829003&amp;url=http%3A%2F%2Fmail.google.com%2Fmail%2Fhelp%2Fgmail_video.html&amp;h=027cb8a71a9f6bf4ef72960a97f41f13" title="https://mail.google.com/mail/help/gmail_video.html">this contesty thingy</a>. Which basically requires you to make 10 second (or less) videos of how gMail gets around the world. The idea is for people to get the &ldquo;Mvelope&rdquo; from the left to the right side of the screen.</p> <p>Yesterday after work Alistair filmed videos with my and Kenzie&rsquo;s help, three are up on youtube now:</p> <ul> <li><a href="https://www.youtube.com/watch?v=hVsxOxE_F1s">From computer to computer</a></li> <li><a href="https://www.youtube.com/watch?v=y98qg9pa87E">Chin up bars with fancy editing</a></li> <li><a href="https://www.youtube.com/watch?v=9jZpK5wYkBM">Gmail for lunch</a></li> </ul> What a great way to start a Monday. https://stephaniehobson.ca/posts/what-a-great-way-to-start-a-monday/ Fri, 10 Aug 2007 15:32:34 +0000 https://stephaniehobson.ca/posts/what-a-great-way-to-start-a-monday/ <p>Part of my job at BCIT is providing technical support to our content publishing community. These are the people who provide the text to fill the templates we make and keep that text up to date. Most of them aren&rsquo;t web developers and are a little intimidated by the idea of working on the website.</p> <p>Forty percent of our job is providing encouragement. &ldquo;Don&rsquo;t worry, it won&rsquo;t go up on the website until we release it so you can play around all you want.&rdquo; &ldquo;We can always undo the changes if you think you&rsquo;ve made a mistake.&rdquo; I get my best compliments from these kinds of support calls.</p> <p>This morning on of our clients told me, &ldquo;You&rsquo;ve made me feel so much better about all this now, I&rsquo;m so glad you called. What a great way to start a Monday.&rdquo;</p> <p>What a great way to start a Monday :)</p> Making the switch https://stephaniehobson.ca/posts/making-the-switch/ Mon, 30 Jul 2007 23:27:18 +0000 https://stephaniehobson.ca/posts/making-the-switch/ <p>Macs have always struck me as more of a religion than an operating system. A family friend and I have a long history of a friendly Mac vs Windows rivalry. He&rsquo;s the Mac evangelist and I was, well, I wasn&rsquo;t a Windows evangelist but I guess I played the part of a disbeliever.</p> <p>At some point in 2004 he finally won the argument and I promised my next computer would be a Mac. But then I got cold feet and I signed up for a course that required I have a Windows machine and I bought a some assembly required Windows box from one of those cheep no name computer stores that come and go over night. This particular store had been recommended to me a couple times and had stuck around for 5 or 6 years so I figured it was fairly reputable.</p> <p>A year later the Windows box self destructed. First I bought a new power supply, then a new fan, then new memory, then a new mother board and finally I stopped short of replacing the hard drive and just pronounced the damn thing dead.</p> <p>Out of excuses to not buy a Mac and very mad at my last Windows machine. I rented a Mac one for a week to see if I could live with it and decided, at the very lest, the whole command vs control thing would not drive me crazy. Once I discovered I got educational pricing (the job would suck if it wasn&rsquo;t for the benefits!) I couldn&rsquo;t even argue with the price. At the very worst I could wipe the hard drive, install Windows, and pretend I never bought a Mac.  Apple also has a very articulate <a href="http://www.apple.com/environment/">environmental policy</a> which doesn&rsquo;t hurt at all.</p> <p>I bought a 15&quot; Mac Book Pro.</p> <p>The first week I had it there were a couple times I desperately wanted my money back but after two and a half weeks these are my thoughts:</p> <p><strong>Text smoothing</strong></p> <p>As screen technology evolves I&rsquo;m sure it won&rsquo;t matter but right now with this screen on this computer I miss <a href="http://www.joelonsoftware.com/items/2007/06/12.html">the way Windows renders text</a>.</p> <p><strong>Work flow</strong></p> <p>Work flow is the thing that has bothered me the most about switching. I find I lose windows other other windows and occasionally have to minimize things to the dock one at a time to find them again. Then I have to un-minimize them because you can&rsquo;t alt-tab to things minimized to the dock.</p> <p>I really can&rsquo;t make effective use of dual monitors any more because the menu bar stays on the main screen no matter what and tool bars and pallets have to be moved individually.</p> <p>I also dislike the way applications just pile up. Every now and then I go to click on a pallet or a scroll bar and suddenly I&rsquo;m an another application.</p> <p><strong>Learning an new operating system</strong></p> <p>Switching from Windows XP to OS X was as easy as switching from Windows 98 to Windows XP. And, lets face it, even Windows users are going have to learn a new operating system when they buy their next computer and just cuz it&rsquo;s pretty doesn&rsquo;t mean Vista is going to be easy to use.</p> <p><strong>Running Windows</strong></p> <p>Running windows hasn&rsquo;t been a problem. I&rsquo;m playing with Parallels and I&rsquo;m going to give VM Ware a go before I decide on which to use but I&rsquo;ll be happy with Parallels.</p> <p><strong>Buying new everything</strong></p> <p>When I bought the Adobe creative suite for Windows apparently it came with licenses for Mac versions as well. Suite. Unfortunately I can&rsquo;t seem to locate CS2 versions of any of the Adobe stuff but I&rsquo;m happily running all the Macromedia stuff in OS X and the Adobe stuff in Windows for now.</p> <p>As for other software, hurray for educational pricing.</p> <p><strong>iPhoto Booth</strong></p> <p>Damn this is sheer <a href="http://www.facebook.com/album.php?aid=36632&amp;l=f6c55&amp;id=881350410" title="Facebook albumn of photos taken with iPhoto Booth.">dumb fun</a>.</p> <p><strong>Quicksilver</strong></p> <p><a href="http://quicksilver.blacktree.com/">Quicksilver</a> looks like it could be the coolest thing ever, but it needs to be customized to be used to it&rsquo;s full potential and I&rsquo;ve found the basic documentation to be kind of sparse. The basic idea of being able to do any task ever with a keyboard short cut is very appealing. I am all about not having to use the mouse.</p> <p><strong>Verdict</strong></p> <p>When I told my Mum that I was buying a Mac the first thing she did was seek assurances that I wouldn&rsquo;t become an Mac evangelist like our family friend. I don&rsquo;t want my money back but I don&rsquo;t think Mum has anything to worry about just yet.</p> Searching for an answer https://stephaniehobson.ca/posts/searching-for-an-answer/ Fri, 29 Jun 2007 17:02:09 +0000 https://stephaniehobson.ca/posts/searching-for-an-answer/ <p>Has anyone else noticed a bunch of really old HTML coding tutorials at the top of their search results when searching for answers to HTML coding questions lately?</p> <p>I was trying to find out if legend was a required tag in fieldset and I got a tutorial that said not to use legend because Netscape 4 doesn&rsquo;t support it yet but should soon!</p> Forming form guidelines https://stephaniehobson.ca/posts/forming-form-guidelines/ Mon, 04 Jun 2007 16:36:49 +0000 https://stephaniehobson.ca/posts/forming-form-guidelines/ <p>Who knew web design could be so&hellip; academic?</p> <p>Since I got back from @media I&rsquo;ve been hard at work on a set of guidelines which ideally will one day guide the interaction and styling of all forms on the myriad of BCIT web applications though right now will only be applied to anything in the &lsquo;public web&rsquo; look and feel.  I don&rsquo;t think I&rsquo;ve done this much research since I finished university.</p> <p>Here&rsquo;s a bit more information on my quibble with FireFox:<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=269908"> the bug report and ensuing argument</a>.  Some one who knows what they&rsquo;re doing should probably read the CSS3 proposals to see if this can be avoided in the future. Also, sadly, I&rsquo;m down to my last two chocolates from See&rsquo;s in San Francisco.</p> This time it's not IE. https://stephaniehobson.ca/posts/this-time-its-not-ie/ Mon, 28 May 2007 13:14:48 +0000 https://stephaniehobson.ca/posts/this-time-its-not-ie/ <p>Wow, FireFox does not play nice with styling legends.</p> <p>FireFox, I&rsquo;m not mad, I&rsquo;m just disappointed.</p> @media links to check out https://stephaniehobson.ca/posts/media-links-to-check-out/ Sat, 26 May 2007 02:50:53 +0000 https://stephaniehobson.ca/posts/media-links-to-check-out/ <p>This is a list consisting of all the websites and books recommended during the course of the conference that interested me enough to warrant writing down for later evaluation (including links to most of the presentations):</p> <ul> <li><a href="http://tim.oreilly.com/">Tim O&rsquo;Reilly</a></li> <li><a href="http://www.deltatangobravo.com/">Delta Tango Bravo</a></li> <li><a href="http://webtypography.net/">Web Typography</a></li> <li><a href="http://www.boxesandarrows.com/">Boxes and Arrows</a> - currently featuring <a href="http://www.boxesandarrows.com/view/comics-not-just-for">an article on comic books</a>!</li> <li><a href="http://www.netvibes.com/">Netvibes</a> - normally I&rsquo;m not a portal person. To be check out in combination with <a href="http://veerle.duoh.com/blog/comments/veerle_theme_for_netvibes/">Veerle&rsquo;s theme</a>.</li> <li><a href="http://www.searchmash.com/">searchmash</a></li> <li><a href="http://www.poetpainter.com/thoughts/">poetpainter</a></li> <li>Book: <a href="http://www.amazon.com/4-Hour-Workweek-Escape-Live-Anywhere/dp/0307353133" title="Amazon">Four Hour Work Week</a></li> <li><a href="http://ma.gnolia.com/">ma.gnolia.com</a></li> <li><a href="http://osflash.org/flashaid">Flash aid</a></li> <li><a href="http://www.notetab.com/">Note Tab</a></li> <li><a href="http://labs.digg.com/">digg labs</a></li> <li>Book: Concrete by <a href="https://en.wikipedia.org/wiki/Paul_Chadwick" title="Wikipedia entry on Paul Chadwick.">Paul Chadwick</a></li> <li><a href="http://pingerati.net/">Pingerati</a></li> <li>Book: <a href="http://www.uiaccess.com/justask/index.html">Just Ask</a></li> <li>Book: <a href="https://en.wikipedia.org/wiki/Neuromancer" title="Wikipedia entry on Neuromancer">Neuromancer</a></li> <li>Article: <a href="https://alistapart.com/articles/dao/">Tao of Web Design</a></li> <li><a href="http://www.amazon.com/Pro-JavaScript-Techniques-John-Resig/dp/1590597273">Book: Pro Javascript Techniques</a></li> </ul> <h2 id="presentations">Presentations:</h2> <p>Missed a few, let me know if you have them.</p> <ul> <li><a href="http://simplebits.com/publications/speak/juggling/">Dan Cederholm: Interface Design Juggling</a></li> <li><a href="http://www.veen.com/atmedia07.pdf">Jeffrey Veen: Designing the Next Generation of Web Apps</a> (PDF)</li> <li><a href="http://cameronmoll.com/speaking/communication">Cameron Moll: Designing for Communication</a> (isn&rsquo;t working, might not have written fast enough to get the whole thing?)</li> <li><a href="http://www.stuffandnonsense.co.uk/events">Andy Clarke: Royale with Cheese</a></li> <li><a href="http://tantek.com/presentations/2007/05/microformats-bb-you/">Tantek Celik: Microformats, Building Blocks, and You</a></li> </ul> @media: Day Two https://stephaniehobson.ca/posts/media-day-two/ Sat, 26 May 2007 02:08:34 +0000 https://stephaniehobson.ca/posts/media-day-two/ <p>Today I got two free books, Jeremy signed Bullet Proof Ajax for me and I snagged an extra Microformats cheat sheet for Brandon. All in all a success.</p> @media: Day One https://stephaniehobson.ca/posts/media-day-one/ Fri, 25 May 2007 10:10:04 +0000 https://stephaniehobson.ca/posts/media-day-one/ <p>One day I&rsquo;d like to be able to make the same kind of contribution to the web design world that these speakers have. Trying to find a way to do that is as intimidating as the idea of writing a Master&rsquo;s thesis. How does one come up with new ideas?</p> <p>The speakers have all been excellent so far. I always need a few days to process information though so I don&rsquo;t have much to say at this point.</p> <p>A few sessions feel like the same information I got at WDN which makes me question just how many of these conferences one needs to go to in a year and makes me feel better about the fact that I won&rsquo;t be able to attend <a href="http://www.aneventapart.com/events/seattle07/">An Event Apart</a>, mind you I haven&rsquo;t heard most of their speakers&hellip; Are conferences addictive? Either way I&rsquo;m out of funding sources and would have to pay for that one myself. Since I&rsquo;m on the market for a new computer that&rsquo;s not likely.</p> CADE/AMTECH Conference https://stephaniehobson.ca/posts/cadeamtech-conference/ Thu, 24 May 2007 01:56:09 +0000 https://stephaniehobson.ca/posts/cadeamtech-conference/ <p>I was in Winnipeg speaking at the <abbr title="Canadian Association for Distance Education">CADE</abbr>/<abbr title="Association for Media and Technology in Education in Canada">AMTECH</abbr> Conference last week. The weather was beautiful and I saw an excellent hockey game in which the Manitoba Moose (the Vancouver Canucks&rsquo; farm team) played spectacularly only to to be knocked out of the AHL playoffs in a very Canucks way (up 2-0 at the end of the first, lost 2-3 in OT).</p> <p>As part of the Technology Enabled Knowledge (TEK) initiative at BCIT Danny Catt, one of the faculty, was sponsored to take a trip around South America and Antarctica studying local research and responses to sustainability and environmental issues. Throughout the journey he used blogging, digital photography, virtual lecture software, shared file storage space, and of course e-mail to keep in touch which his students and communicate with the world.</p> <p>Terry Fuller, the instructional development coordinator that was helping Danny with the project submitted a paper to CADE to talk about &ldquo;Using the Internet to make Meaningful Global Connections in the Classroom.&rdquo;  I was involved in creating the <a href="http://blogs.bcit.ca/catttrax2/">web page and blog</a> that was the highlight of the project and Terry asked me to talk about the &ldquo;technical&rdquo; side of designing the website.</p> <p>Rather than boring the crowd with PHP, HTML, CSS, CMS and other <abbr title="three letter acronyms">TLA</abbr>s. I talked about the rest of the stuff that goes into the design process: user needs, site objectives, functional specifications, content requirements, information architecture, navigation design, visual design, and <a href="http://www.jjg.net/elements/pdf/elements.pdf" title="Jesse James Garrett">all that good stuff</a> but for those of you who care the site was driven by Drupal and included a XML driven flash photo gallery, a Google map mashup, and some video and audio recordings, though not as many as we&rsquo;d hoped - apparently it&rsquo;s tough to upload media files from the middle of the Amazon - who knew?</p> <p>The project was a lot of fun and very different my usual daily duties. I&rsquo;ll post a summary and the slides soon.</p> Working hard? https://stephaniehobson.ca/posts/working-hard/ Tue, 24 Apr 2007 17:58:15 +0000 https://stephaniehobson.ca/posts/working-hard/ <p>Or hardly working?</p> <p>When the network goes down the whole department starts acting like school kids when the power goes out.  We sit around waiting for the power to come back on or the teachers to tell us to go home and the longer it&rsquo;s out the more trouble we contemplate causing ;)</p> Styling Our Style Sheets https://stephaniehobson.ca/posts/styling-our-style-sheets/ Mon, 23 Apr 2007 13:15:26 +0000 https://stephaniehobson.ca/posts/styling-our-style-sheets/ <p>I&rsquo;ve been wanting to seriously redo some of the HTML and CSS behind the <a href="http://bcit.ca">BCIT</a> site since I came on board here almost a year ago.</p> <p>Well, I get my wish. We&rsquo;re going to take some baby steps towards semantic HTML and CSS (<a href="http://tantek.com/log/2007/04.html#d20t0823">POSH</a> if you like) and despite my aversion to being in charge, I&rsquo;m leading the project.</p> <p>As a first step I&rsquo;m trying to write a CSS coding style guide. I can&rsquo;t necessarily clean up the current mess but I can try to stop any new ones from being made ;)</p> <p>What I want to do is develop guidelines for:</p> <ul> <li>if and how style definitions should be divided between multiple style sheets</li> <li>what order style definitions should be listed in (I currently put all my tag definitions at the top of documents and then place my id and class definitions beneath them in the order they&rsquo;re anticipated to appear on the page)</li> <li>naming conventions for ids and classes</li> <li>commenting conventions</li> <li>what order properties should be arranged within definitions</li> <li>if and when we should use shorthand properties</li> <li>formatting guidelines</li> </ul> <p>So far my research has turned up very few examples to help me with the development. <a href="http://bitworking.org/news/CSS_Coding_Style">This somewhat out dated post</a> is the best I&rsquo;ve found so far. Part of my problem is that searching for a style guide for CSS is just coming up with guides to styling with CSS.</p> <p>Do you work with a CSS coding style guide or know any good resources for developing one?</p> Web Directions North https://stephaniehobson.ca/posts/web-directions-north/ Wed, 04 Apr 2007 14:11:08 +0000 https://stephaniehobson.ca/posts/web-directions-north/ <p>I thought I&rsquo;d post my summary of Web Directions North that I distributed to the department a month or so after the conference. I&rsquo;ve been wanting to write a more technical and personal review of it but it&rsquo;s pretty clear to me that if I haven&rsquo;t done it by now, I&rsquo;m not going to get around to doing it :)</p> <p>Web Directions North is an international conference for people who work with the web, from project managers to web programmers to web designers. This year it was hosted in Vancouver and a few of us jumped at the opportunity to go and were grateful to have the department&rsquo;s support.</p> <p>The conference covered a good balance of theoretical big thinking ideas and practical hands on code ideas and we were fortunate to come home with both things to work towards in the long run and ideas that could be implemented immediately.</p> <p>These are a few of the &ldquo;big picture&rdquo; ideas that stood out to us:</p> <ul> <li><strong>User Experience</strong> – It&rsquo;s the difference between making a website as popular as the SunDisk Sansa MP3 player and making a website as popular as the iPod. Many of the speakers talked about the ways they integrate user experience design and testing into their work early in the project process and what a huge positive impact it has had on their websites.</li> <li><strong>Web Standards</strong> – All the presenters were strong advocates of web standards. They also argued against the idea that all a website needs to meet standards is to be well coded. In their eyes a website with standards has <em>high</em> standards – it should also be accessible, backwards compatible, built using the principles of progressive enhancement, semantic, and have good user experience.</li> <li><strong>Ajax</strong> – There was a lot of discussion about Ajax, what it is, why it has become popular, and where and how to best use it. It was advocated that sites should be built to function perfectly without Ajax and Ajax can be added after to enhance user experience. There were also some user experience issues identified with using Ajax and some solutions proposed.</li> </ul> <p>These ideas touch on difference skill sets and the presenters who talked about project management felt that the ideal web team would consist of a mix of individuals with skills that cross the disciplines of development, design, usability, and content. This structure keeps the team nimble, and promotes rapid prototyping for continuous improvement.</p> <p>It&rsquo;s rare that a conference provides information you can act on the next day when you sit back down at you desk but these are ideas we found immediately useful:</p> <ul> <li><strong>Microformats</strong> – <a href="http://microformats.org/">Microformats</a> are a standardized way to add CSS to XHTML to code standardized information such as addresses and events so that programs such as address books and calendars can import them with a single click if you have a newer browser or the right plugins. The contacts application (<a href="https://www.bcit.ca/contacts">bcit.ca/contacts</a>) has been rewritten to use microformats and the new version launched March 6<sup>th</sup>!</li> <li><strong>Mashups</strong> – A mashup is when part of a website is integrated into another website. You might have seen a Google Maps mashup like this one: <a href="http://blogs.bcit.ca/catttrax2/journey/route">http://blogs.bcit.ca/catttrax2/journey/route</a>. One of the sessions covered what&rsquo;s involved in beginning a mashup and now a campus map mashup is on the way!</li> <li><strong>Progressive Enhancement</strong> – This is a &ldquo;big idea&rdquo; about how to code and a shift from the old concept of &ldquo;graceful degradation&rdquo;. The suggestion is that content should be written first and then semantic code, presentation, and behavior should be added on top of it in layers so that the core content is still accessible and intelligible if it is accessed without the presentation and behavior layers. The contacts application was rewritten using the principles of progressive enhancement; check it out with JavaScript or CSS turned off!</li> </ul> <p>If you&rsquo;re interested in learning more about any of these ideas the presentation summaries and notes are available on the <a href="http://north.webdirections.org/wdn07-resources/">Web Directions North</a> website or you can talk to Brandon, Alan or me :)</p> Striving for excellence https://stephaniehobson.ca/posts/striving-for-excellence/ Fri, 30 Mar 2007 11:51:10 +0000 https://stephaniehobson.ca/posts/striving-for-excellence/ <p>I just finished my first micoformatted page! When I was writing the information page for <a href="http://hope-international.com/fundraising/07_springdinners.html">HOPE&rsquo;s spring dinners</a> I coded all the dinners as events and the organizers as hcards :) I did work with Brandon to re-do the <a href="https://www.bcit.ca/contacts">BCIT Contacts</a> application to use microformats but he did most of the coding on that project. This is the first time I&rsquo;ve done it myself.</p> <p>I didn&rsquo;t actually tell anyone at HOPE that I&rsquo;d done it that way since it doesn&rsquo;t effect the way the page looks and I figure they&rsquo;ll discover it for themselves if it&rsquo;s useful to them. However, my friend thinks I should tell them so they recognize just how good a job I&rsquo;m doing for them.</p> <p>I don&rsquo;t really feel like I did anything other than my job. Isn&rsquo;t it my job to do a good job?</p> <p>In the last two weeks of February, <a href="http://www.cbc.ca/ideas/">CBC&rsquo;s <em>IDEAS</em></a> aired a couple programs on the ideas of Richard Sennett, a sociologist and author who has studied the organization of work. Among other things he suggests the Western world is obsessed not with the idea of craftsmanship but with productivity. In other words: it doesn&rsquo;t matter how well you do you job - just how quickly.</p> <p>The speaker at my graduation ceremony spoke at length encouraging us to &ldquo;<quote>strive for excellence</quote>&rdquo; in everything we do. Not just in the work we do but also in our interactions as part of our daily lives. From answering a client&rsquo;s e-mail to cooking dinner, he urged us to do our best.</p> <p>Is doing a good job something society has to be told to do now?</p> Delicious + FireFox + Snap Links https://stephaniehobson.ca/posts/delicious-firefox-snap-links-just-the-way-i-like-it/ Tue, 27 Mar 2007 15:06:24 +0000 https://stephaniehobson.ca/posts/delicious-firefox-snap-links-just-the-way-i-like-it/ <p>I keep up on my favorite blogs and web comics by book marking them all in Firefox and then using the &ldquo;open all in tabs&rdquo; option that FireFox so nicely includes to open all the book marks at once. That way I can keep track of which ones I&rsquo;ve read by closing them once I&rsquo;m done :) Yeah, it&rsquo;s lazy I know.</p> <p>I&rsquo;ve been wanting to have access to my bookmarks when I&rsquo;m away from my home computer (who doesn&rsquo;t) so I jumped on the <a href="http://del.icio.us/sjhobson">del.icio.us</a> band wagon a few days ago.</p> <p>I hunted around for an add-on of some sort that would let me open all my delicious bookmarks in new tabs without much success. Turns out I was being too specific. <a href="https://addons.mozilla.org/en-US/firefox/addon/4336">Snap Links</a> is a great add on that will let you select links on your screen by dragging the mouse over them, sort of the same way you&rsquo;d select icons on your desktop. And it&rsquo;s smart enough to only open the first link down in the HTML hierarchy, so with delicious you don&rsquo;t open all the edit / delete links and with search engines you don&rsquo;t open all the cached / similar pages links.</p> <p><strong>Edit:</strong> It kind of interferes with my mouse gestures if I&rsquo;m not careful but it&rsquo;s not that hard to avoid.</p> Something new today https://stephaniehobson.ca/posts/something-new-today/ Sun, 25 Mar 2007 15:20:32 +0000 https://stephaniehobson.ca/posts/something-new-today/ <p>So apparently we&rsquo;re supposed to be encoding ampersands when we write them in the href part of anchor tags.</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&#34;/file.php?fire=hot&amp;amp;beer=foamy&#34;</span><span class="p">&gt;</span>link<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>; </span></span></code></pre></div> I'm presenting at a conference! https://stephaniehobson.ca/posts/im-presenting-at-a-conference/ Tue, 20 Mar 2007 14:01:53 +0000 https://stephaniehobson.ca/posts/im-presenting-at-a-conference/ <p>One of the projects I&rsquo;ve worked on at BCIT is <a href="http://blogs.bcit.ca/catttrax2/" title="Catt -Trax2: The Antarctic to the Amazon.">Catt-Trax2</a>. The website is for Danny Catt who is traveling through South America and Antarctica exploring conservation and sustainability issues and talking to the people in those regions working with those issues daily. He&rsquo;s taking photos, video, and sound clips of this journey and blogging about his experiences. I helped architect the website and did some design and implementation work on it. We have fun stuff like a Google Maps mashup showing his route too.</p> <p>The project manager for the project is an Instructional Development Coordinator named Terry Fuller who has done an excellent job pushing the team to give their most while restraining Danny&rsquo;s overwhelming enthusiasm to keep the project in scope.</p> <p>She&rsquo;s asked me to co-present about the project at a conference for distance educators that is happening in Winnipeg in May. I&rsquo;ve applied for funding to go with her. <a href="http://cade-aced.ca/conferences/2007/viewSession.php?presenterID=119">Our names</a> are already on the website, so I hope I get the funding :)</p> Where am I going with this? https://stephaniehobson.ca/posts/where-am-i-going-with-this/ Wed, 14 Mar 2007 16:05:07 +0000 https://stephaniehobson.ca/posts/where-am-i-going-with-this/ <p>Vivian is such a great motivator. I&rsquo;m still sorry to see her go.</p> <p>I just came out of a performance review where Vivian simultaneously told me what a great job I&rsquo;m doing and laid out the changes I need to make to my life to have the world laid out at my feet by the time I&rsquo;m forty.</p> <p>She said to me that in IT there are kind of two main career paths; one which is super specialized with one specific area of technology and one that sees the big picture and manages.</p> <p>She thinks I should, and told me I have the right skills and thought processes to, be a manager.</p> <p>I&rsquo;m not sure I agree with where she wants me to go but she sure made me feel like I could get there if that&rsquo;s where I wanted to go :)</p> <p>Which begs the question, where do I want to go?</p> Insecurity https://stephaniehobson.ca/posts/insecurity/ Thu, 08 Mar 2007 21:21:29 +0000 https://stephaniehobson.ca/posts/insecurity/ <p>All I did was copy the cgi file and change the file name and now it&rsquo;s not encrypting the e-mails it sends any more.</p> <p>Hm.</p> <p><strong>Edit:</strong> Yup, the problem was that I changed the name.</p> <p><strong>Edit 07-03-26:</strong> I&rsquo;ve also discovered that cgi files are not encoded using windows text format so opening them in notepad and saving them again is enough to destroy all functionality.</p> Border Collapse https://stephaniehobson.ca/posts/border-collapse/ Tue, 06 Mar 2007 20:13:22 +0000 https://stephaniehobson.ca/posts/border-collapse/ <p>I am, for the most part, self taught when it comes to HTML and CSS. I&rsquo;ve take a few courses to get a piece of paper that says I can do what I say I can do but learned very little from them.</p> <p>I spotted this little CSS tidbit in a presenter&rsquo;s code at the <a href="https://web.archive.org/web/20070306020032/http://north.webdirections.org">Web Directions North</a> conference a few weeks ago and now I&rsquo;m wondering if this is the sort of thing I missed out on by being self taught:</p> <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="nt">table</span> <span class="p">{</span> </span></span><span class="line"><span class="cl"> <span class="k">border-collapse</span><span class="p">:</span> <span class="kc">collapse</span><span class="p">;</span> </span></span><span class="line"><span class="cl"> <span class="p">}</span> </span></span></code></pre></div><p>There are quite a few tables I&rsquo;ve designed where this would have been very useful.</p> What's keeping me busy? https://stephaniehobson.ca/posts/whats-keeping-me-busy/ Mon, 05 Mar 2007 12:16:18 +0000 https://stephaniehobson.ca/posts/whats-keeping-me-busy/ <p>Well, outside of my <a href="https://www.bcit.ca/facultystaff/bios/1431805">day job</a> I&rsquo;m:</p> <ul> <li>making my Mum a <a href="http://barbhobson.ca">website</a></li> <li>moving hosting servers for <a href="http://digitalphoenix.ca">digitalphoenix.ca</a></li> <li>learning cgi so I can create an auto generated thank you message for <a href="http://www.hope-international.com">HOPE</a>&rsquo;s donors</li> <li>taking <a href="https://www.bcit.ca/study/courses/cint1110">Mandarin</a> (what was I thinking?)</li> </ul> Hello World https://stephaniehobson.ca/posts/hello-world/ Mon, 05 Mar 2007 01:53:59 +0000 https://stephaniehobson.ca/posts/hello-world/ <p>I&rsquo;ve been wanting a professional blog for a while now. It&rsquo;s funny how there&rsquo;s somethings you can tell complete strangers and there&rsquo;s some things you can&rsquo;t.</p>