All posts by Mark

Image by deeminllama: http://fc08.deviantart.net/fs45/f/2009/086/a/3/you_are_here_by_deeminllama.jpg

Super-simple Geolocation

“Remember, no matter where you go, there you are.” ― Buckaroo Banzai

Over the past several years mobile devices have brought us a lot of new great features and capabilities, things that people now are starting to expect from computing devices. Features like touch-capability, then multi-touch, GPS to tell where the device (and user) is, motion- and light-sensing, device orientation, access to the device’s camera, and even more. Wouldn’t it be great if web developers had access to all of those amazing new device features? Well, some of that is possible right now.
Continue reading Super-simple Geolocation

A simple crossfading slideshow made with CSS

“Simplicity is the ultimate sophistication.” ― Leonardo da Vinci

One of the great things about the current web design landscape, compared to a few years ago, is that now it’s possible to create things with just HTML & CSS that you would have in the past needed to use JavaScript or even Flash to accomplish. One example of this is a simple image slideshow, a set of images that automatically rotates every X seconds, often with a caption for each image, like the one below (mouse over for caption).

class-header-css3

CSS3: CSS3 delivers a wide range of stylization and effects, enhancing the web app without sacrificing your semantic structure or performance. Additionally Web Open Font Format (WOFF) provides typographic flexibility and control far beyond anything the web has offered before.
class-header-semantics

Semantics: Giving meaning to structure, semantics are front and center with HTML5. A richer set of tags, along with RDFa, microdata, and microformats, are enabling a more useful, data driven web for both programs and your users.
class-header-offline

Offline & Storage: Web Apps can start faster and work even if there is no internet connection, thanks to the HTML5 App Cache, as well as the Local Storage, Indexed DB, and the File API specifications.
class-header-device

Device Access: Beginning with the Geolocation API, Web Applications can present rich, device-aware features and experiences. Incredible device access innovations are being developed and implemented, from audio/video input access to microphones and cameras, to local data such as contacts & events, and even tilt orientation.
class-header-connectivity

Connectivity: More efficient connectivity means more real-time chats, faster games, and better communication. Web Sockets and Server-Sent Events are pushing (pun intended) data between client and server more efficiently than ever before.
class-header-multimedia

Multimedia: Audio and video are first class citizens in the HTML5 web, living in harmony with your apps and sites. Lights, camera, action!
class-header-3d

3D, Graphics & Effects: Between SVG, Canvas, WebGL, and CSS3 3D features, you’re sure to amaze your users with stunning visuals natively rendered in the browser.
class-header-performance

Performance & Integration: Make your Web Apps and dynamic web content faster with a variety of techniques and technologies such as Web Workers and XMLHttpRequest 2. No user should ever wait on your watch.

Images and captions are from the W3C

Wait, how is the transition happening automatically, without JavaScript?

Thanks for asking. It’s accomplished through the magic of CSS keyframe animation (Also see: An Introduction To CSS3 Keyframe Animations by Louis Lazaris for an introduction). If you’re already pretty familiar with CSS animations, then go read this article by Lea Verou and see if you don’t learn something new :-)
Continue reading A simple crossfading slideshow made with CSS

Repeating patterns in CSS with :nth-child and :nth-of-type

“What we call chaos is just patterns we haven’t recognized. What we call random is just patterns we can’t decipher.” ― Chuck Palahniuk

I’ve been trying to wrap my head around how the :nth-child pseudo-class can be used to create repeating patterns with CSS, beyond just even and odd (which are perfect for zebra-striping table rows, amongst other things). What really helped me understanding it was coding up a few examples to play around with. These examples are all available on CodePen too, so you can fork or edit them there if you want. I’ll embed the pen at the bottom. Note that while I will use :nth-child for all of the examples below, they should all work just as well with the :nth-of-type pseudo-class. Continue reading Repeating patterns in CSS with :nth-child and :nth-of-type

Design until it sucks less; leveling up on design

“Design is easy. All you do is stare at the screen until drops of blood form on your forehead.” — Marty Neumeier

Farm gold and level Up your design skillsI picked the quote above for this post because it’s remarkably similar to my own design process, which I like to think of as “tweak it until it sucks less.” Then I keep on iterating until a deadline looms, squint at it until I can tell myself it looks good enough, launch it, and then feel slightly mortified every time I see it from then on. I know it’s not uncommon to be your own worst critic but even so, a couple of required art classes in college, a lone graphic design class from Parsons, and a whole lot of “on the job experience” is just about the extent of my design education, so it’s past time to level-up. In searching about for the right approach, I’ve found a few good resources that I want to share. Continue reading Design until it sucks less; leveling up on design

Random fly-in animation using Sass

“It’s a cruel and random world, but the chaos is all so beautiful.”
― Hiromu Arakawa

One of the things that’s changed in the CSS world over the past several years is the rise of CSS preprocessors, and Sass is one of the most popular (LESS is another big one, if you’re interested here’s a comparison between the two from Smashing Magazine; here’s another comparison from CSS Tricks).  I hadn’t explored either much until recently, as useful as they are they have to fit into your workflow, and I just haven’t had the opportunity to use either in the context of my day job, but coding playground Codepen makes it super-easy to try out Sass (LESS too, if that’s more your thing).
Continue reading Random fly-in animation using Sass

Old dog, learning new tricks

“There is no need to sharpen my pencils anymore. My pencils are sharp enough.”
— Ze Frank

Before we get things started here, you should really watch this video. Even if you’ve seen it before, watch it again. It’ll be worth it, I promise.

As someone roughly the same age as Ze there (give or take 18 months), one thing I’ve noticed over the years is how the older you get the quicker the years go by, and time has a way of slipping away from you, especially when you’re not paying attention. This point was brought home most recently when, in cleaning up my web hosting from old long-abandoned projects and old cruft, I realized that it’s been over a decade since I registered a domain name and took my first steps into blogging.
Continue reading Old dog, learning new tricks