Posts from August 2005

The Constants Gardener

Published 18 years, 6 months past

This news is a little musty, but Shaun Inman updated CSS-SSC recently.  If you’re using CSS-SSC, you should definitely go grab the update.

“Hey, what’s CSS-SSC?” you exclaim?  Oh, I’m sorry.  It stands for Cascading Style Sheets Server-Side Constants.  Here’s Shaun’s initial example:

@server constants {
    linkColor: #AB6666;
    linkColorHover: #710101;
    }
a { color: linkColor; }
a:hover { color: linkColorHover; }

In other words, you can define your own constants in CSS.  This works because CSS-SSC is a preprocessor—it processes the style sheet before it’s sent to the browser, and turns it into something the browser can handle.  (Put another way, what arrives at the browser is a regular style sheet, with none of the ‘SSC’ information.)  Shaun offers more details in an earlier post.  CSS-SSC requires you to have PHP hanging about, and also to edit some stuff on your server, like .htaccess files.  You’ll also have to be careful about how you name your constants: use the constant name color, for example, and your CSS is going to go to a particularly mangled form of textual hell.

Personally, I’m both enthused and annoyed by CSS-SSC.  I think it’s a great solution: definitely one of the best, lightest-weight, easiest approaches to adding preprocessing to CSS.  I’m seriously considering putting it to use on ALA, in which I jumped through a few grouping hoops in order to get the fonts and colors just the way Jason wanted them.  Dropping back to constants would make life a bit easier—and would also simplify the whole “per-issue coloration” feature.  (Which I already have working, but via a large number of hoops, several of them on fire.)

I’m annoyed because it bothers me that Shaun had to create CSS-SSC in the first place.  There have been occasional requests for constants in CSS.  They get shot down every time.  “Use a preprocessor!” is the cry, and at first glance, CSS-SSC would seem to give credence to that response.  From my point of view, however, CSS should have had constants long ago, and what Shaun has done is proof.

The refusal to add constants as a feature of CSS has always stuck me as highly pointless.  Over the past decade, many people have expressed a need for CSS constants in a number of fora, and it’s a good bet many more have had the need without publicly expressing it.  Adding it to CSS would have done little to increase complexity on the implementor’s side; Shaun’s one-page PHP script (a good deal less when you remove the comments) proves that.  Adding it to CSS would have meant authors could just do it, without having to install anything else first.  Shaun’s made installation about as easy as it gets, but it’s still three or four steps more than should exist—and, for some authors, three or four impossible steps, due to their hosting situation.  And if you aren’t running a local web server, then you can’t test your CSS-SSC-enhanced styles locally; they’ll have to go to a web server first.

Because CSS still lacks, and will apparently continue to lack, a way to define your own constants, I’m really glad Shaun has devised this low-threshold solution.  I just wish that it hadn’t been necessary for him to do so in the first place.


The Softest Whimper

Published 18 years, 6 months past

This morning, I broadcast what might be the last radio show I ever host.

Almost nobody heard it, though, because yesterday evening the station’s 15,000 watt transmitter had a seizure and stopped sending out a signal– you know, transmitting.  So the station went off the air until 8am this morning, which happened to be the beginning of my show, the last in a nine-year run.

When we came back on the air, it was at 5 watts, which was all the transmitter was prepared to handle.  At that level, we were reaching an area of maybe ten square blocks.  At that level, the FCC technically has no province; only stations of 10 watts and above are regulated.  In theory, I could have played anything I wanted with no threat of legal reprecussions.  On the other hand, we were still webcasting, so I stuck to my format.

But instead of assembling a list of all my favorite tunes, I just put on two hours of Glenn Miller.  This wasn’t so much a case of “what’s the point?” as it was the fact that I couldn’t get into the station until ten minutes before my show.  Usually I’m there close to an hour beforehand to prepare.  And granted, I could have played an hour of Glenn Miller and an hour of favorites—but in the end, I didn’t have a good answer when I asked myself “what’s the point?”.

At the end of the show, as I’d planned, I delivered a short farewell to my audience, none of whom could actually hear me unless they happened to be within a few hundred feet of the transmitter.  I knew all my regular listeners, the ones to whom I’d hoped to say farewell, were beyond that range.

As I said “…and in the meantime, I’m out of here” for the last time and clicked off the microphone, the phone rang in the studio.  My God, had someone actually heard me and phoned in to say goodbye?

It was a fax machine.


Reserved ID Values?

Published 18 years, 6 months past

As a followup to my entry about id="tags" causing problems in IE/Win, here are four five test pages for IE/Win:

These are based on Kevin Hamilton’s observation that it’s highly likely the problems are caused by the tags method in IE/Win’s document.all DOM interface.  As he says:

[I]f you have an element with an id=”tags”, then document.all.tags is now a reference to that element, and no longer a method of the document.all object.

Such states would completely shatter any IE DOM scripting that relied on the document.all methods, and at least in the case of tags causes problems like crashing on print (probably because of the aforementioned conflict between the ID value and the DOM method).  The other keywords of concern are chronicled in the test pages listed above.  I’d test IE/Win myself, except I don’t have a printer handy for IE/Win to use, and besides, bug-hunting is best conducted in large groups.

Basically, load up each test page in IE/Win and do anything you can think to do.  Try to print, view source, save a local copy, et cetera, et cetera—the more obscure and offbeat, the better.  Let us know via the comments any problems you run into with said pages (trying to print them is a good first step, since that’s what messed up on tags) and I’ll add notes to each page based on what’s found.

In the meantime, I’m personally going to avoid using any of those words as ID values, and heartily recommend the same to you.

Update: I’ve added a test (for length) to the above list, and have another that’s not on the list due to its unfinished nature.  It’s a test of id="all"; the problem is, I don’t really know how to test it, or if it’s likely to be a problem at all.  Suggestions are welcomed in the comments.  I added some JavaScript links to some of the test pages as a secondary test, but I’m not sure how much good they do, to be honest.  As with suggestions, your feedback is welcome.

For those in search of more background, or trying to find new ways to test possible conflicts, or whatever, feel free to look over Microsoft’s documentation of the “all Collection”.


When Printing Kills

Published 18 years, 6 months past

Here’s a fascinating little tidbit: on some users’ machines, attempts to print out Joe Clark‘s ALA article “Facts and Opinions About PDF Accessibility” would crash Internet Explorer.  The error message mentioned a script error in line 1401: “Object doesn’t support this property or method”.  Funny thing: we weren’t doing any scripting.  The error was actually occurring shdoclc.dll/preview.dlg, which is of course a piece of the operating system.

Jason did some sleuthing and traced the crash to this line of markup:

<h2 id="tags">Tags and structure</h2>

Honestly, that was it.  So Jeffrey renamed the ID to read:

<h2 id="structure">Tags and structure</h2>

So far as we know, no more crashing in Explorer.

Ain’t browsers a slice?

(And yes, we’re aware of the clamor for a print style sheet.  More on this later.)

Update: Marten Veldthuis from Strongpsace points out that 37signals ran into a very similar problem in Backpack.  Details can be found in Jamis Buck‘s June 3rd post ie-is-teh-3v1lSpread the word: “tags” is effectively a reserved keyword, even though no such concept exists in (X)HTML.  Use it at your (users’) peril.


Perfect Packaging

Published 18 years, 6 months past

Now that’s how you package parts.  It’s almost enough to take the fear out of the words “Some Assembly Required”.


Storm Warning

Published 18 years, 6 months past

The last 36 hours have been filled with extremes.

In the wee hours of the morning yesterday, after many weeks of work and rework and extra work, A List Apart was launched in its new incarnation.  The community reaction was very strongly positive, with the strongest initial complaints being the lack of DNS switchover and the missing print style sheet.  There were other criticisms, of course, but nothing that I honestly didn’t expect from the outset.  Taken as a whole, the feedback was so much better than I’d hoped it would be.

Mid-afternoon that same day, I listened to voice mail from a recent client informing me that, due to a catastrophic misunderstanding, I’d be paid what they had understood the fees to be, and not what I had told them the fees would be.  This would mean the paycheck would be smaller than expected.  Like six or seven thousand dollars smaller.

(And don’t bother to tell me that I should have gotten it all in writing beforehand: I know that, okay?  Now I’ve really learned it, and double-hard.  Leave me in my misery and idiocy, and learn from my mistake.  That would at least confer some small bit of good.)

In the early evening, Carolyn picked up one of her letter-blocks and said enthusiastically “beee!” as she held it up toward me and used her other hand to sign “B”.  The block she held was a block with the letter B on it.  I put it in a group with a bunch of others and asked her to show me the B.  She did.  She did it twice more.  Then she did it for the letter E.  I was astonished, stunned, inexpressably proud.  It isn’t reading, but it’s a recognition of letter forms, and that’s where it all starts.

At Carolyn’s bed time, as I was searching for a book to read to her, I came across my copy of “Are You My Mother?”.  This is the book with which I taught myself to read.  It had gone missing three or four years ago, and I had searched through all our children’s books three times to try to find it.  My mother died thinking she’d accidentally given it away, or packed it into the wrong box during one of her spates of house cleaning.

It sat on the shelf as if it had never been anywhere else, and I was almost afraid to touch it, for fear it was an illusion.  The superstitious core of my soul wondered if Mom’s spirit had found the book and returned it to me.  A pivotal touchstone of my childhood, long absent and once mourned and inexplicably restored.  I couldn’t choose between elation, gratitude, and grief.

This morning, as I spun records on what could be the second-to-last radio show I ever do, Kat called to tell me that one of her best friends had disappeared, along with her money and passport, while on vacation.  From all indications, it is a purposeful disappearance, but not much less worrisome for being so.

Sometimes, I think it would be nice if life’s rich pageantry could tone things down just a shade or two.


A List Apart Returns

Published 18 years, 6 months past

A List Apart is back in business and sporting a radically new design.  Check it out!  Four columns on the main page?  Yes indeed!

I’m proud to say I had a hand in the redesign process, taking the visual goodness of Jason Santa Maria and turning it into living, breathing XHTML and CSS.  Keeping the pages from going completely crazy in broken browsers was an interesting challenge at times, but overall I think things came together rather nicely.  There may be a few glitches here and there, though we did our best to test widely and often, but if so we’ll handle them as they arise.

It was good fun working with the talented team members in this process, and I especially enjoyed being able to concentrate on what I know—building XHTML and CSS around existing designs—and leave the rest to other people who knew their stuff as well as I know mine.  Due to the strategic partnership between Complex Spiral Consulting and Happy Cog Studios, I look forward to assuming that role more often, and on ever more interesting projects.

Addendum: it seems the DNS change to point to ALA’s new Textdrive home hasn’t made it as far as I’d thought, so I’ll point you to the numeric IP address; that way, you can see it even if your local DNS hasn’t caught up yet.  Sorry for any confusion!

Addendum 2: it’s been long enough that the DNS change should have made it to all the far-flung corners of the net, so I’ve removed the numeric IP addresses.


Spamellited

Published 18 years, 6 months past

When I asked folks for their input on satellite TV providers, it simply didn’t occur to me that nearly every entry would get caught in my spam filters, thanks to an influx of DirecTV spam I experienced many months ago.  I’d use that as a criterion for choosing my service, except I got hit with Dish Network spam around the same time.

So thank you, spammers of the world, for once again putting a damper on legitimate communication.  Don’t you all have a suicide cult you could join or something?


Browse the Archive

Earlier Entries