Stopped Designing But Still Interesting

Stopdesign has been changing out their front pages with some interesting CSS2\3 techniques. For example, instead of adding new classes to change out colors on a dl declaration, doug simply used the + symbol to add styles upon previously defined styles. This is a bizarre form of inheritance:

dd:before {
margin-right:.1em;
content:”+”;
color:#666;
}
dt + dd:before {
content:”";
}
dt + dd {
color:#b77;
}
dd + dd {
/* motivation */
color:#7a7;
}
dd + dd + dd {
/* process */
color:#79b;
}
dd + dd + dd + dd {
/* talent */
color:#bb4;
}
dd + dd + dd + dd + dd {
/* luck */
color:#666;
}

Sure you could do that with specifically id’ing classes, but still worth the note.

Leave a Reply