Zoomable UIs

Direct Link

Joni Korpi on the redesign of his personal website, where he describes all the issues involving “zoomable user interfaces”, or ZUIs. For example, clicking on a link will zoom into that particular element rather than cause a full page refresh. …

Avatar of Robin Rendle
Shared by Robin Rendle on

“Shake” CSS Keyframe Animation

This assumes the use of an autoprefixer.

.face:hover {
  animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}

@keyframes shake {
  10%, 90% {
    transform: translate3d(-1px, 0, 0);
  }
  
  20%, 80% {
    transform: translate3d(2px, 0, 
Avatar of Sarah Drasner
Sarah Drasner on (Updated on )

Recent Conference Talks Worth Watching

These are some of my favorites from conferences I’ve either been to lately, have watched online, or were recommended to me (in which case they aren’t always super recent). I link up the playlist of videos from the conference the …

Avatar of Chris Coyier
Chris Coyier on (Updated on )

MailChimp Style Guide

Direct Link

Interesting that it’s not about code or design (in a traditional sense). It’s about writing and copy and tone and and that kind of thing. Distinctly different from their Patterns. Makes sense to me. There doesn’t seem to be …

Avatar of Chris Coyier
Shared by Chris Coyier on

randomColor

David Merfield:

There are lots of clever one-liners for generating random colors:

'#' + Math.floor(Math.random()*16777215).toString(16);

Unfortunately, this code naturally produces lots of greys and browns and murky greens.

randomColor generates attractive colors by default. More specifically, randomColor produces bright colors

Avatar of Chris Coyier
Chris Coyier on (Updated on )

Compare jQuery Objects

You can’t really compare if two jQuery objects are the same…

if ($(selectionOne) === $(selectionTwo)) {

}

You can compare DOM objects though…

if ($(selectionOne)[0] === $(selectionTwo)[0]) {

} 

But that’s only really useful if you’re comparing a single element, …

Avatar of Chris Coyier
Chris Coyier on

A jQuery hasAttr() Equivalent

jQuery doesn’t really have an .hasAttr() function. You might assume that it does, but alas, it does not.

A StackOverflow thread has some pretty good solutions.

Get the attribute, check the value
var attr = $(this).attr('name');

// For some browsers, 
Avatar of Chris Coyier
Chris Coyier on (Updated on )