2 ms·
I would have done it as follows: <div class="box hot"> and <div class="box cold">, hot is selected and cold it has been dropped in a 'recycle' container. I al
by yannis 17y ago
I would have done it as follows:
<div class="box hot"> and <div class="box cold">, hot is selected and cold it has been dropped in a 'recycle' container.
I also try to minimize id's, for example I could have <li class="cold"> as well.
I do agree with you that one should not just map all the CSS attributes into classes. Perhaps my example was not a good one. However, three or four additional sets of classes, has increased my own productivity, especially during development. I keep a partial CSS file with 5, 6 generic sets. Most large newspaper sites use this method. It all depends in what one needs to do. In this method the style sheet is 'more abstracted', it does not know about a box.cold. If you skinning a wordpress template, you better off to offer the box.cold in the stylesheet, but then you must provide a second style sheet to offer the box.hot! This method also allows a bit of presentational flexibility for new page designs, without playing with the main CSS files or adding another CSS file. Somewhere, along the line there is a golden line I guess.