Signs of adulthood

I bought a house.

Strangely, this makes me feel like more of a “grown up” than producing a daughter did. Possibly because health insurance meant that producing the daughter cost appreciably less. Actually, according to the explanation of benefits letters I got from my insurance company, childbirth was almost exactly one third the cost of a house. America is crazy.

This lets me add a little bit of extra context into my post, though. Here’s where I’m sitting right now:

IMG_2590

Maphilight 1.3

I released maphilight 1.3 just now. (Though really I consider github the more authoritative source.)

So, IE9 broke maphilight because it was finally exposing the has_canvas codepath to IE. Turns out all the canvas stuff worked beautifully, but one call to setTimeout was relying on a non-IE feature. So that’s fixed!

Also changed since the 1.2 release (one year ago, gosh):

  • New option groupBy lets you bundle several areas together
  • New option wrapClass lets you set a classname for the wrapper div created to hold the canvas elements used by maphilight. If it’s set to true it’ll use the classname from the image.
  • .data(‘maphilight’) is checked for areas, as well as the metadata plugin. With jQuery > 1.4.3 this means that you can use JSON in an HTML5 data- attribute to pass this in. See the API docs for details.
  • Performance on image maps containing a lot of areas was terrible because I was stupid about where I triggered an event.
  • Opera compatibility was harmed by jQuery bug #6708 (fixed in 1.6), so work around that.

Feel free to submit issues / pull requests on the github project.

Unintuitve effect of overflow:hidden

I found myself having to fit a textarea into a space which had user-provided CSS (“skins”) applied to it. This worked surprisingly well, but someone found a skin which had a right-floated sidebar which was playing hell with the textarea, since the textarea needed a fixed width and textareas refuse to overlap floats. So the textare got pushed way down, which looked terrible.

(To make things easier to see, the textarea will be background:transparent throughout.)

Screen-shot-2011-01-31-at-12.05.36-AM

I looked into absolute positioning to solve my woes, and put the textarea in a position:relative div with an appropriate height, and set the textarea to be position:absolute in the top-left of that div. This got me closer.

Screen-shot-2011-01-31-at-12.05.51-AM

After this I just started fiddling with it. It occurred to me to try overflow:hidden on the textarea’s container, which had an effect I did not expect.

Screen-shot-2011-01-31-at-12.06.00-AM

So. Overflow:hidden + absolute positioning + floats = floats not interfering with content. I’m sure this follows rationally from the CSS spec, but I totally didn’t expect the effect.

Further experimentation did reveal that it’s not specific to textareas. Any absolutely positioned content will have this effect if its relative container has overflow:hidden.

Identical effect in: FF3, Chrome, and IE8. Not tested elsewhere yet.

You can see all the CSS involved on this demo page.

(@cheald says that it looks like a variant on Pup’s Box Flow Hack. I’m just happy to have independently stumbled onto something that weird.)

Change your surroundings

I work from home. I like it. However, it’s easy to get distracted and slack off.

I find that the longer I spend with my workplace set up in one location at home, the less productive I get. I seem to come to associate that spot with being distracted, instead of working.

So I move regularly. Spend a few days/weeks with one workplace, then move to another in my home. Or spend a week going out to a coffee shop every day to work there. It breaks the association and lets me get things done.

Works for me, anyway.

My experience working in offices indicates that the peer pressure of other people being around working balances out the accumulated slacking habits of a single desk. Still, given the choice I’d rather work at home and have to move around.

Simplecomic

Another new-ish release, this time a PHP webcomic content management system called simplecomic.

Features:

  • Multiple comics per day
  • Schedule posting of comics in advance
  • Masking of comic filenames so scheduled comics can’t be easily found
  • Comic descriptions, alt text, and transcripts
  • Optional chapter divisions for comics
  • “Rants” as a lightweight blog, with scheduled posting
  • Theme system
  • Static pages
  • Support for the frontpage showing the first comic from the most recent day with comics, to allow posting of “issues”

I wrote it for a friend who wanted to start her own webcomic and wasn’t happy with the existing options in the field of webcomic CMSes.

You can see an example here. It’s a dead webcomic that I happen to be hosting for sentimental reasons. Ignore the Comic Sans… it’s also there for sentimental reasons. 😛

Get it on github.

maphilight 1.2

I finally got around to officially releasing maphilight 1.2.

This mostly just updates the official jquery.com release to the HEAD of the github project.

I’d been putting it off because I spent quite a while without easy access to a Windows machine with IE8 to test the fixes that people provided. But I switched back to Windows as my main desktop recently (mainly to play games), so that was resolved.

There’s not much in the way of changes:

  • IE8 works now
  • New “neverOn” option for use with metadata by Zach Dennis, which stops individual areas from ever being hilighted
  • Handles being called on the same area twice differently; now rebuilds the hilighted regions
  • …and I added an example of triggering the hilight from another element, since it’s one of the most commonly asked questions

Hopefully I’ll be able to post here a bit more now that I have some of that guilt for not updating off my shoulders. 😛