Getting Pocket IE to Obey the “Screen” CSS Media Type

CSS Media Types can be rather handy for delivering CSS rules to one platform or another. Not uncommonly, they can be used to automagically create printer-friendly pages. They can, however, also be used to create mobile-friendly pages (such as for PDAs, cell phones and the like) through the “screen” media type. The general idea is that large screen devices (CRTs and LCD monitors) can be fed CSS rules with the “screen” media type while handheld devices get a set of CSS rules with the “handheld” media type.

One fly in the ointment is that Pocket IE tries to outthink a page’s media types. Because some front-end coders put much of their CSS in a file with the “screen” media type, the Pocket IE development team decided that their browser should render rules with the “screen” media type. Ruh-roh. All of a sudden, all of the potentially small screen-unfriendly declarations “ floating, absolute positioning and the like — were being gargled and swallowed by this diminutive browser.

What that meant was that coders had to employ CSS with “screen” and “handheld” media types; and, in addition to having the usual mobile-type tweaks in “handheld” (such as perhaps removing extraneous page elements), coders also had to resort to undoing the effects present in “screen” stylesheets. Yuk. Pleasantly, Michael Angeles discovered a workaround — by capitalizing “Screen”, Pocket IE properly ignores CSS with that media type.

I’ve not been able to find a comprehensive table of CSS media support among handheld browsers, but the comments attached to this post about CSS for Mobiles are a decent starting point. There, the author set up some test pages for CSS media support and invited readers to send in their results. Here’s an excerpt:

  • Pocket IE — applies “screen” and “handheld”
  • SonyEricsson browser — passes over “screen” and applies “handheld”
  • Blackberry (7730) — neither “screen” nor “handheld” are applied
  • Motorola browser — passes over “screen” and applies “handheld”

I wouldn’t be surprised if some handheld browsers still incorrectly apply the “screen” media type. All the same, with Pocket IE back on the good side of the force, that helps quite a bit; granted, Pocket IE doesn’t have quite the market dominance that desktop IE does, but (until now) it was still one of the major offenders among mobile support for CSS media types. And, with a work-around as straightforward as tossing in some capitalization, it’s not hard to push Pocket IE in the right direction.

BBEdit 8.5 Turns Up the Heat with Indented Soft Wrapping

BBEdit — a “professional HTML and text editor for the Macintosh” — has just had its version 8.5 release and it comes with a healthy dose of new hotness:

  • […] The price has been dropped from $199 to $125.
  • […] The toolbar as been redesiged and some functionality moved around to make it look more OS X-ish.
  • […] Code folding has been added, and works great.

Most exiting to me, though, is the addition of indented soft wrapping. The feature goes by many names, but, even if the name of it doesn’t sound familiar, there’s a good chance you’ve seen it with other editors. The basic idea is that for a line which is wrapped several times — such as a paragraph of copy in HTML — the indented parts of the line will line-up with the indention of the original line.

I’ve been looking for an OS X-based editor that I can live with for some time now. Sure, TextMate has its strong points, but up until this recent BBEdit release, I haven’t been aware of any OS X text editors that included both indented soft wrapping and a tabbed interface. For what it’s worth, there’s been an enhancement request filed to add indented soft wrapping to TextMate but the TextMate team (which is to say, Allan) hasn’t quite gotten to that one yet.

A decent text editor is one of the last puzzle pieces in transition toward OS X. Up until now, it seemed that BBEdit was just resting on its laurels, virtually begging TextMate to take away its text-editor crown. With this most recent release, though, it looks like they’ve been reinvigorated. And, if BBEdit 8.5 lives up to the write-ups, I may just be well on my way toward a Redmond-free OS. Of course, if Uncle Steve were to release Merom-based MacBook Pros, that wouldn't hurt either ;). (Fortunately, that may be not be too far off.)

Oliver’s Eatery has Awesome Club Sandwiches

Some coworkers and I went to Oliver’s Eatery for lunch yesterday. At the time, they described it as being similar to Baker Bros, but different in some manner which I can't quite recall at the moment. At any rate, as I rather enjoy Baker Bros, I thought I’d give it a shot.

As I approached the counter, I noticed that the menu was divided into sections for salads, sandwiches, pasta, and perhaps one or two others. I’m not one to pass up a good sandwich, and so I perused their offerings — their club sandwich immediately caught my eye and, voila, I ordered one. After paying at the counter, the clerk handed me one of those familiar buzzing-light-up squares to take back to my seat.

I gathered my sandwich accouterments — a napkin and some flatware — and enjoyed some chit-chat with my coworkers while my sandwich was being prepared. Jeremy’s pasta arrived first, and then one or two other coworker's meals, but mine arrived soon after that. As I took my plate back to my table, the first thing that struck me was the subtlety of the sandwich itself: unlike a club sandwich that you might find at Chain Restaurant XYZ, Oliver’s club wasn’t stacked to the ceiling merely for the sake of doing so. Still, it had all the necessary elements — roasted turkey, cheddar, bacon, lettuce and tomatoes.

Upon biting into the sandwich, I knew I had a winner. The sandwich was both hot and cold — a good thing — from the hot just-melted cheddar and cold meat and cheeses. As I enjoyed my first bite, I knew something was extraordinary about the sandwich, but I couldn't quite place my finger on it. It was like a bit like the feeling of trying to remember “Where did I see that guy before?” when watching a movie…

Finally, it dawned on me: the sandwich was made with real cheddar cheese. Not “real cheddar cheese” as a marketing ploy, but actual from-the-cow cheese. Part of what clued me in was that the cheese hadn't melted uniformly; now, cheddar isn’t supposed to melt evenly (that would be gruyère’s job), but it’s not uncommon for fake-cheddars to melt with T-1000-like consistency.

Pleasantly, the bread was also a key player in the sandwich. It was either white or wheat bread — I wasn't quite sure since it was browned due to the toasting — but it was fairly thin. I’d guess each of the slices was around 1/4 to 1/3" thick which, if you as me, is how it should be for a club sandwich (after all, the meat and cheeses are the star of a club sandwich)

Looking over their web page, it would appear that there's only one Oliver’s restaurant (as opposed to being a franchise with several locations). Well, drat to that. I mean, sure, it’s convenient that they’re close to work (they just off Frankford Road and the Tollway), but it would have been even nicer if there was one close to my home as well. I guess I’ll just have to make use of them during my working hours. C’est la vie.

Jim Davis Is a Tool

I recently ran across this article at Slate on the business process behind Garfield. In short, Jim Davis is a tool. It’s not news that his strips aren’t funny to anyone over eight — how many times can someone tell a lasagna joke? — but it also turns out that Davis is merely a man behind a curtain pulling levers and twisting knobs:

Garfield’s origins were so mercantile that it’s fair to say he never sold out—he never had any integrity to put on the auction block to begin with. But today Davis spends even less time on the strip than he used to—between three days and a week each month. During that time, he collaborates with another cartoonist to generate ideas and rough sketches, then hands them over to Paws employees to be illustrated. […]

So, it would seem that drawing the strip is merely a means to an end for Davis: he keeps the cogs in the machine turning just so that he can power his licensing efforts. To be sure, I have nothing against artists profiting off their work; still, I’m put off that a so-called artist would go through the motions, knowingly churning out drivel just for the check.

Firefox Extension to Resize Textarea Elements

It seems like one of those “now, why didn’t someone think of this sooner?” ideas now that I’ve tried it, but I’ve recently discovered Jeremy Zawodny’s Resizable Textarea extension and I dig it. Like the name says, it allows you to resize text-entry boxes (<textarea> fields) in Firefox. There’re no fancy hotkeys to learn — you just grab the edge of the box, your pointer turns into a double-headed arrow and you can pull on the edge to resize it. Dandy.

Oh, and if you’re running Firefox 2.0 Beta 2 — a perfectly cromulent arrangement — you may have a bit of a hiccup since Resizable Textarea extension has only been green-lit to work on versions up to Firefox 1.5. Not to worry — the Nightly Tester Tools extension can take care of that for you. Among other things, it adds an “override compatibility” to the normal extension dialog box; since most extension authors are very conservative in their version boundaries, overriding those tends to work almost every time.