13.02.2013 Views

WEB STANDARDS CREATIVITY

WEB STANDARDS CREATIVITY

WEB STANDARDS CREATIVITY

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

52<br />

Mo’ metro, mo’ style<br />

The New York Magazine (www.nymag.com) website<br />

redesign was, to be honest, something of a departure for<br />

me. My little company, Vertua (www.vertua.com), typically<br />

bills itself as a full-service web shop—or, at least, as fullservice<br />

as an “army of one” studio can be. However, this<br />

project was a welcome change from the norm, as it was<br />

essentially a “code-only” job: the magazine had partnered<br />

with another studio to design the new site and was looking<br />

for someone to work on building out standards-based<br />

templates. (I’d like to make an “Enter the Dragon” joke<br />

here, but I think that would just be silly.)<br />

The template list for the redesign was nothing less than<br />

impressive: the magazine had years of legacy content on<br />

the site, all presented in different layouts and templates.<br />

Furthermore, the magazine’s content management system<br />

(CMS) was powerful, but rather lightweight—much<br />

of the pages’ content is hand-rolled by a team of skilled<br />

but largely nontechnical content producers. How, then,<br />

could a standards-based design make the magazine<br />

employees’ lives easier?<br />

Figure 3-1. The finished article template<br />

In this chapter, I discuss how assigning multiple class values<br />

to an element—in this case, body—can really streamline<br />

your code and make your Cascading Style Sheets<br />

(CSS) much more modular. By writing CSS code that<br />

detects different “toggles” you write into the body element’s<br />

class, your style sheet can style the same markup<br />

in drastically different ways across pages. The result is a<br />

drastic reduction in the number of HTML templates<br />

required and the ability to make radical changes to a<br />

page’s design a snap.<br />

For the bulk of this chapter, we’ll focus on the generic<br />

article template, shown in Figure 3-1.<br />

With the small talk out the way, let’s walk through how to<br />

put this together, step by step.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!