Posts from March 2004

Fishing For Style

Published 20 years, 2 weeks past

As a followup to yesterday’s entry, I thought I’d share some details on what will be in Cascading Style Sheets: The Definitive Guide, 2nd Edition (now available for pre-order!).  Here’s the Table of Contents, or at least a core subset of it:

  1. CSS and Documents
  2. Selectors
  3. Structure and the Cascade
  4. Values and Units
  5. Fonts
  6. Text Properties
  7. Basic Visual Formatting
  8. Padding, Borders, and Margins
  9. Colors and Backgrounds
  10. Floating and Positioning
  11. Table Layout
  12. Lists and Generated Content
  13. User Interface Styles
  14. Non-Screen Media
  1. Property Reference
  2. Selector, Pseudo-Class, and Pseudo-Element Reference
  3. Sample HTML 4 Style Sheet

Owners of the first edition will notice that the chapters have been rearranged a bit.  Thanks to the expansion of selectors in CSS2, it made sense to rearrange things so that they got their own chapter (which you can read in beta form from O’Reilly), and the parts about how CSS relates to document structure were folded into the chapter about specificity and the cascade.  The consolidation of floating and positioning into one chapter really helped cut down on redundancies, although that is the longest and most-enfigured chapter in the book.  (In second place, “Basic Visual Formatting.”)  “Table Layout” talks about how tables are laid out and styled, not how to do layout with tables.  The last two chapters are basically overviews with some detail, since user interface styles are almost certainly going to change radically in CSS3 and non-screen media support is limited or largely theoretical at this stage.  There’s still enough detail to satisfy, I think.

As for the other chapters, they’re largely the same as in the first edition in terms of topical coverage.  They’ve just been updated and expanded to match what’s in CSS2.1.  As an example, “Text Properties” covers everything that it did in the first edition, now updated for 2004; plus it adds information on text-shadow, direction, and unicode-bidi.

The technical reviewers for the second edition were Tantek Çelik and Ian Hickson, who were just as tough and thorough as I’d hoped.  Ian’s one of the people who pounded the inline layout model into my head until I got it when writing the first edition, actually.  I got similar treatment from both reviewers over the interaction of generated content with non-generated elements this time around, not to mention when I tried to figure out the value syntax for text-decoration.  It used to be simple, but oh no… they had to go makin’ it all fancy.

Anyway, I hope that will give some idea of what lies ahead for those of you who do me the honor of purchasing the book.

I occasionally toy with the idea of setting up a Cafépress store with CSS-related merchandise.  If anyone out there has bought stuff (particularly T-shirts and other articles of clothing) from Cafépress, kindly let me know what you thought of it in terms of quality and durability.


Making Book

Published 20 years, 2 weeks past

This past weekend, the folks at O’Reilly and I wrapped up the final edits and adjustments to Cascading Style Sheets: The Definitive Guide, 2nd Edition.  The in-stock date is near the end of this month, so it ought to be physically sitting on shelves by the beginning of April, maybe sooner.  The page count listed on the O’Reilly page (as I write this) is an early estimate and too high; the actual page count will be closer to 550 pages.  There are a few reasons for this drop in pages:

  • The support charts have been dropped.  When the first edition came out, it made sense to include that kind of information in an appendix, so we did.  As I recently wrote on www-style, the world is much different now, and the day of nifty support charts may well have passed.  In the CSS realm, anyway.  To even present a simple yes/no support chart for CSS2 would have been a dozen pages long, and a nuanced chart with notes would easily have run five times that long.  I still have notes and warnings about particularly egregious problems sprinkled through the text, though.
  • The “CSS In Action” and “Look Ahead” chapters were also dropped.  There is plenty information available these days on how to actually use CSS, so we decided not to be redundant.  As for looking ahead, even a high-level overview of where CSS3 is headed could be a hundred pages long, and out of date the minute we printed it.  Better to wait and see where things end up than make a lot of ill-informed guesses.
  • By rearranging the way information was presented, I was able to cut a lot of redundancies that bedeviled the first edition.  I also cut out some material that seemed important back in 1999, but has long since become irrelevant (like notes about what IE3 does or doesn’t do).
  • The figure count has been scaled back.  There are still a few hundred figures throughout the book, but I went to some effort to combine several points into a single figure when I could, and not illustrate every little point I made.  You really only need to see so many examples of “boldface text,” you know?
  • The text doesn’t spend time on things that were in CSS2 but aren’t in CSS2.1, and that nobody will likely ever support.  This means that some paged-media properties like marks weren’t described, and I didn’t waste time on the CSS2 marker-styling features since they will almost certainly die out and be replaced by a different approach in CSS3.  I did cover properties like font-size-adjust and text-shadow, but not in major detail.

So the second edition is an update of about 380 pages of the first edition, once you subtract out the stuff that was cut.  Every chapter of the first edition was reviewed and, in most cases, significantly overhauled even if it wasn’t expanded (for example, the Fonts chapter didn’t gain a lot, but it was still reworked to reduce the number of figures needed and to clarify some points).  There are four all-new chapters, five chapters with significant additions or revisions, and five more that were lightly to moderately revised.  So it’s practically a whole new book.

That’s even more true of the book I have coming out in mid- to late April from New Riders: More Eric Meyer on CSS, a sequel to Eric Meyer on CSS.  And when I say “sequel,” I really mean it: this is a collection of ten entirely new projects, so it is not a new edition of the older book.  You can own one without the other, although of course you should buy both!  Baby needs a new pair of shoes, after all.  (Okay, that’s a lie; she’s too little to be wearing shoes.  But you know what I mean.)  I’ll have more details as they become available.


Textual Healing

Published 20 years, 3 weeks past

I freely admit that I’m kind of a zealot when it comes to words and text—heck, this quiz classified me as a “grammar fuhrer.” (Note: the rating of “M” for the linked quiz may be too weak; “A” might be better.  The results you get may well offend you terribly.  Consider yourself warned.)  I love to read, and wish I could do it more often.  I enjoy writing, for that matter, because there’s a sublime joy in crafting the right sequence of words and creating the right tone as a result.  (Speaking of writing, I’ll have some things to say about that tomorrow.)  In what I regard as an exceedingly rare moment of lucidity on Rush Limbaugh’s part—perhaps he’d been off the drugs for a few days—he once said, “Words mean things.”  I absolutely agree, and not just in the narrow sense.  To me, the right words mean something far more than a string of communicative markers.  They create a meaning that is much greater than the sum of the parts.  The right words at the right time can literally change a life.

I say all that to frame what I’m going to say next.  The Man In Blue recently posted some thoughts on the use of text in Web design—or, more precisely, his opposition to its use for branding purposes.

By utilising run-of-the-mill text to render your identity, it makes it very hard to distinguish yourself from anyone else  delivering a message.  Granted, usage of plain text can itself be an identity, but I think that  Eric Meyer has pretty much cornered the market on that one.

I’m not sure if that’s meant as a compliment or a criticism, but it actually doesn’t matter.  I took it as a compliment, and I think the things I said above help explain why.  Still, I’m going to speak in some defense of using “plain” text for design.  Not a full defense, because Mr. Blue (a.k.a. Cameron Adams) is quite correct: branding is important, and visual identity is an important part of that branding.  As he says, Coca-Cola spends millions every year on branding.  I’m sure Pepsi does the same, as do a great many other companies.  As they should.  He goes on to say:

Although it might pain the purists, sometimes only an image will do.

He couldn’t be more right.  It makes a lot more sense for me to share a picture of Carolyn smiling at her mommy than it does to try to describe the same thing.  Carolyn, reclining in her car seat while in semi-profile, looks up and to the right with a broad grin on her face.  Kat's hand rests next to Carolyn's left shoulder.  If I were in charge of Amazon.com or Wired or some other branded organization, there’s no way I’d replace the logo with plain text.  Besides, an img with alt text is as accessible as plain text—a little longer to download, but not enough to make a significant difference.

For me, I stick to text because I’m not a visual designer.  I don’t have a CD full of fonts that I can use to make my text look different, graphically or otherwise, and I don’t have the patience to search free font resources to find one.  It doesn’t make sense for me to spend time flailing toward what would probably be an amateurish result when I  can just style some text and move on.

But that doesn’t mean that I settle for the default presentation of text, either.  An example is the “Cut your costs…” text at the top of Complex Spiral Consulting’s main page.  The relevant bits of its CSS are:

font: bold 166% Arial;
letter-spacing: -1px;

Yep, just boldfaced largish Arial—but the negative letter-spacing pulls the letters together just a touch, and significantly alters the visual impact of the text, making it seem weightier than normal.  Conversely, a positive letter-spacing would spread text apart, giving it a more open feel.  Most visual designers grit their teeth over this kind of thing, because it’s the crudest form of kerning imaginable.  True enough, but it still has a desirable effect, and typically one that’s underexploited.

The other reason I stick to text is that it’s almost infinitely more flexible than raster graphics like GIF and JPEG.  If I decide to resize the “meyerweb.com” in the masthead, all I have to do is fiddle with a line of CSS.  For that matter, I do change the size of that text on sub-pages, just as I do the masthead itself.  I can also change the text color to suit the masthead graphic.  For every one of the 26 mastheads I’ve created (this week’s is #6), I’ve changed the text color to blend better with the background.  Doing this was, again, a change of a couple of lines of text.  It would be even better if RGBA color values were widely supported, so I could make the text colored and translucent, but never mind that now.  (Side note to Dean Edwards: how about adding RGBA support to IE7?)

And, of course, the user can resize text, which I regard as a benefit, although a lot of designers regard it with pure horror.  If I had the name of this site as a graphic, then in any browser except Opera, resizing the content display would leave the graphic text unchanged.  That bugs me.  If there were universal vector-graphic support, say for SVG, then I could use it to create any font-and-logo combination I was able to dream up (or hire someone to create for me).  Even with the widespread availability of the Adobe SVG plugin, it’s still not enough.  I know, beyond any doubt, that a Web browser will support text rendering.  I don’t have the same confidence about SVG or even Flash, both of which can be scaled.

So I stick with text.  Realize that this is not what I would tell a corporate client to do.  When I worked with Macromedia, I didn’t tell them that they should replace their logo graphic with plain text stating “Macromedia,” and it wouldn’t even have occured to me.  If I were to work with Adobe or Microsoft or Apple or Red Hat or anyone who’d established a visual identity based around an image, I wouldn’t even consider telling them to replace it with plain text.  I’d agitate for sensible alt text, of course.

But for this site, or for Peter‘s site—both of which are personal sites—I don’t see anything wrong with using text.  (Then again, I guess I wouldn’t, having a corner on this particular market and all.)  In a lot of ways, I think it’s preferable, reducing bandwidth consumption and server hits.

And, y’know… it’s text.  C’mon, everybody, sing it with me:

Text is natural, text is good Not everybody loves it But everybody should

Or, if you groove to an older, smoother beat:

I can tell you, darling, that it’s textual healing Mark up, mark up, mark up, mark up, let’s design tonight Wake up, wake up, wake up, wake up, text will do it right

Thankyew!  Try the veal.


Hack and Slash

Published 20 years, 3 weeks past

Back in January, I reacted to Peter Nederlof‘s whatever:hover by musing that it would be nice to see behaviors used to extend IE in other useful ways, like adding generated content support and so on.  Dean Edwards, regardless of whether he saw what I had to say, is doing that and more with his in-progress IE7 behavior suite.  Can you say, “will add support for attrribute selectors, multiclass selectors, and adjacent-sibling selectors to IE/Win?”  Oh yeah… I thought so.  And that’s just the beginning.  He has generated content on his list of things that will be supported, and a whole lot more besides.  The behavior is currently alpha, but it’s everything I could possibly have hoped for and more.  I’m going to be keeping a close eye on Dean’s work, and will be putting it to use as it moves out of beta.

In a similar vein, Dean also created an XBL binding to let Gecko-based browsers use Microsoft behaviors.  I think he just might be a genius.  Thankfully, he’s using his powers for good instead of evil.

Hopefully, I can get one of you XSLT gurus to do the same on my behalf.  I have a problem that’s proven beyond my ability to grasp.  Basically, I have a list of events that include start and end dates; here’s the basic markup that drives it.  I can get a list of upcoming events, no problem; I just pass in information about the current date when I run the XSLT and do comparisons.  What I need is a list of recent events, where “recent” is defined as occuring within the past three months, even if those months straddle a New Year.  I also want to get at least the most recent event even if it didn’t happen within the last three months.  And, of course, I want any results sorted in reverse chronological order.  I cannot figure out how to do all that in XSLT.  Any pointers or takers for this one?  I could really use some help.

(Yeah, yeah, doing it with some database or other would be a snap.  I’m trying to do it in XSLT.  Think of it as a creative design constraint.)

On a totally different note, here’s an interesting pair of articles from SF Gate: Gay marriage momentum stuns both backers and foes and Where Is My Gay Apocalypse?  Thanks to Jeff Veen and Simon Willison for the pointers.


Family Leave

Published 20 years, 3 weeks past

Travel and work have conspired to keep me from updating in a while.  We headed off to New York City (or at least its eastern suburbs) for an extended weekend at Kat’s parents’ house, so Carolyn’s now taken her first two airline flights.  She was really well behaved, which was no doubt a relief to the people seated around us in the ERJ-135s (seating capacity: 37) we took to and from JFK.  Kat’s brother Neil flew in from San Francisco to meet his niece for the first time, and some friends and family in the area gathered on Sunday to meet Carolyn.  It’s a good thing she’s so cheerful and happy to meet new people.

While we were gone, I received some e-mail that hypothesized that last week’s masthead graphic was, um… was… er… let’s just say he wanted to know if it was an extreme anatomical closeup.  In a sense, the answer is “yes.”  It was a closeup from a picture of a giraffe’s eye taken from a distance of about two feet; the same picture, in fact, that I submitted to the Mirror Project.  I’ve been told that I should have an “About the Masthead” area of the site.  Somehow, I find it more fun to leave things a little mysterious, at least for the more abstract masthead images.  After all, if I explained everything up front, I wouldn’t get amusing e-mail.

There should be plenty of opportunities for you to guess.  This week’s masthead is #5 in a series of 26, and I expect I’ll have added even more before #26 goes up at the end of July.


Browse the Archive

Later Entries