The personal website of Chris Coyier

Archive for November, 2013

There is a Time

Friday, November 29th, 2013

Charlene sure could sing. I’ve never enjoyed a version of this tune more than this one.

“That makes you cry, pa.”
“Well I’ll fight it.”

Focus on Good

Friday, November 29th, 2013

In my latest stay at Hilton Head Health, one of the things that stuck with me is the idea of focusing on what is going well. It came at me in two different ways.

One was the concept of gratitude. Surely you are familiar with that word and what it means. But it’s also a bit of a movement (if you will) in healthy living circles. Books like this and articles like this give it life. I took a class on gratitude when I was there and heard from several people who said practicing gratitude was transformative for them. It’s simple: spending some time thinking about what is going well in your life and things you are grateful for. Perhaps even write them down.

The other way it came at me was through a physical training session. I learned earlier in the week that my swimming skills left something to be desired. I thought I had decent swimming skills but after taking a group class doing laps and being the worst in the class (of generally out-of-shape people) I learned otherwise. So I signed up to take a personal training session to learn how to swim properly.

There are dozens of little things to learn about swimming, even just the standard front crawl. For instance: get good goggles so you can see underwater which increases your comfort and confidence. Head down. Rotate your whole torso when taking a breath. Take the breath as you pull your arm back and create that pocket of air as your arm goes by. Keep your legs from falling down into the water with a stiff(ish) body. Kick your legs from the hip not the knees. Pull your hands all the way back to get a complete stroke. Keep your fingers together to cup the water. Any many more.

At some point all those things will fall into place and you’ll do them naturally without thinking. I would imagine, anyway. I’m not there yet. I need to consciously think about them to swim well. I often fail to get some most of them right and that gets frustrating.

After a poorly-swam and frustrating lap, my trainer would tell me “what went right on that lap?” What went right?! All I can think about is what went wrong. But I started to get it after a while. Focusing on what went right is far more useful. It keeps you from reveling in frustration. It helps cement a foundation to build from. It’s not just being clever or Captain Obnoxiously Positive, it’s just more effective.

I suspect this attitude of consciously focusing on what is going well is good not just for swimming lessons but every aspect of life. I intend to keep it up.

Foreword for Sass for Web Designers

Wednesday, November 27th, 2013

I enjoyed how Jeremy Keith published his foreward to the book Responsive Web Design by Ethan Marcotte. I shall do the same for Sass for Web Designers by Dan Cederholm!


Looking back at the evolution of computer languages, it seems every dozen years or so a new layer of abstraction is added. “Ones and zeros” leveled up into assembly instructions, which leveled up into compiled languages. Those compiled languages evolved and we used them to create web browsers. Web browsers digest languages like HTML, CSS, and JavaScript. Now we’re ready to level up again.

HTML, CSS, and JavaScript have been *enormously* successful languages for moving the web forward in unpredented ways. We’re building ever-bigger and more complex websites. That’s a beautiful thing. But we’ve come to the point where we need to take the next step in making what we build more manageable and maintainable. We can get there through abstraction.

CSS is in the most dire need. These days, HTML is generally produced through back-end code and templates which provide the abstraction we need. As a programming language, JavaScript already has the tools of abstraction baked in. CSS has no abstraction at all and is highly repetitive. While that simplicity was key to its adoption, it makes it unwieldy for us today. It’s CSS’s turn to level up!

Sass, as Dan will teach you in this book, has all the tools of abstraction we need. Repetitive values become variables. Repetitive groups of styles become extends. Complex rulesets and tedious vendor prefixing become mixins. With those translations comes CSS that is manageable and maintainable at any scale.

Moving to Sass isn’t a comfortable transition for some. Dan knows that all too well. He has been working with and teaching CSS to the world since before I knew what a div was. But Dan is a craftsman of the web. Just as a craftsman of wood knows when his chisel is dull, Dan knew that working directly in CSS these days is just like that dull chisel: you can do it, but you’re liable to hurt yourself.

By the time you finish this book and give Sass a real try on your first project, you’ll be a master of 95% of the important, truly value-adding parts of Sass. Let Dan be your guide. Learn that Sass doesn’t make your job harder, it makes it easier.


Dan's new book!

Half a Pedal

Wednesday, November 20th, 2013

I was riding my bicycle
half a pedal done broke off of it

Now I got me a bicycle
with only one half a pedal on it

{simple blues lick}

My baby tutu
love me only half as much as she used to

{lonely blues lick}

I pull dope in the evening
get me only half as high as it used to

{sloppy blues lick}

I went down to the old store
Got a new pedal and a new seat too

{happy blues lick}

Now my baby tutu
love me twice as much as she used to

{epic long blues lick}

I stopped doping in the evening
Now imma twice as high as I used to

{short closure blues lick}

{burp}