Christian Heilmann

You are currently browsing the archives for the General category.

Archive for the ‘General’ Category

Shorter DOMscript via cloning vs. generating elements

Thursday, December 8th, 2005

cloned sheepI just looked through some of my older scripts and other people’s code and realised that a lot of time we bloat our methods by repeating the same functionality.

This is especially true when it comes to generating a lot of HTML via the DOM.

We keep repeating the same document.createElement and setAttribute lines over and over. Wouldn’t it be more efficient to create those once when initialising our script and then cloning them? (more…)

RSS feeds everywhere, even in the smallest room

Thursday, December 8th, 2005

If you ever wondered if and where people read your RSS feeds, you might be in for a surprise, when your audience is in Taiwan. It seems there is a new product available that prints out RSS feeds onto toilet paper Would be great to have a control element to define the print strength, in case you want to leave a lasting impression.

What I want from CSS3 – nested declaration blocks

Tuesday, December 6th, 2005

Back in October, Andy Budd wanted to have min- and max-padding in CSS3, so it seems only fair that for my 200th post here I can also give my $.02 and ask (and maybe stomp my little feet) for something in CSS3 (after all we can celebrate together in well, roughly 2010 when all browsers support it – that is if we still use browsers then):

I want nested declaration blocks!

I basically want them as I hate repeating myself, and I hate repeating code when it is not needed. (more…)

DOMCollapse fixed for Safari – create unobtrusive collapsible page elements without knowing JavaScript

Tuesday, December 6th, 2005

I just updated DOMCollapse to support Safari and use proper DOM2 unobtrusive event handling.

If you don’t know it yet, DOMCollapse is a script that allows you to turn any page element into a trigger, that shows or hides the following element, by adding a CSS class to it.

Enjoy and please check for bugs.

Tested on MSIE 6, Firefox 1.07, Firefox 1.5 and Opera 8 on PC and Safari on Mac.

Comment at the original DOMCollapse post

How to create a CSS Toolshed submission – step by step

Friday, December 2nd, 2005

It has been quite a while since I started the CSS Toolshed, and I expected a lot of submissions after hundreds of people downloaded the templates, but now – more than two weeks later – I only got one good submission to show.

OK, I get the message: I cannot expect developers to work in conditions like these to submit something for a project they don’t get any money from. It is frustrating enough having to deal with these at work, but at least there is a paycheck in it.

So, to make it a bit easier, I updated the templates pack to include

  • all the necessary images
  • more templates containing almost all elements of the building block gallery
  • pre-defined CSS selectors with all the content elements

As the pièce de résistance, I created a new demo design called Happy Cock and wrote down what I was doing while developing it.

So if you need to get an insight as to how to create a CSS Toolshed entry (or simply a flexible CSS layout) go and read:

Hopefully this will help the toolshed get some more submissions, I’d hate simply to let it die…