demosthenes.info

I’m Dudley Storey, the author of Pro CSS3 Animation. This is my blog, where I talk about web design and development with , and . To receive more information, including news, updates, and tips, you should follow me on Twitter or add me on Google+.

web developer guide

my books

Book cover of Pro CSS3 AnimationPro CSS3 Animation, Apress, 2013

my projects

A Sass color keyword system for designers. Replaces CSS defaults with improved hues and more memorable, relevant color names.

CSSslidy: an auto-generated #RWD image slider. 3.8K of JS, no JQuery. Drop in images, add a line of CSS. Done.

tipster.ioAutomatically provides local tipping customs and percentages for services anywhere.

Black and white photograph of a string of paper dolls

Removing Elements With JavaScript

javascript / basics

Estimated reading time: 1 minute, 30 seconds

There are two methods of removing elements from web pages with JavaScript: the traditional, counter-intuitive way, and the new direct DOM4 method.

The traditional method is rather round-about: you cannot simply remove an element, but must do so via a reference to its parent. Given the following markup:

Photograph of a Victorian boy holding out an empty food bowl

CSS last-line: Controlling Widows & Orphans

css / typography

Estimated reading time: 3 minutes

While CSS has many options for controlling the first-line of text, it’s ability to control the last line is limited, although not without some uses:

A closeup of the head of a swimming polar bear, shot underwater
A photograph of a sitting tiger cub
Photograph of a male lion lying on green grass
Closeup photograph of a tiger
Photograph of a swimming polar bear, shot from underwater and underneath
A photograph of a sitting lion and lioness in profile

Filtered Flexbox: A Dynamic Image Gallery

javascript / galleries

Estimated reading time: 3 minutes

While I’ve shown filtered responsive image galleries in the past, they don’t have the dynamism that some designers desire. Of course, it’s easy to take “dynamism” too far, into what I refer to as “swooshy-swooshy” UI, with massive dependencies on frameworks and plugins and everything on the page whirling about in confusion.

This gallery code seeks balance: a straightforward UI coupled with non-disorienting animation. Along the way, we can learn a few things about making progressively enhanced UI elements.

This site helps millions of visitors while remaining ad-free. For less than the price of a cup of coffee, you can help pay for bandwidth and server costs while encouraging further articles.