In drupal.css :
tr.dark td, tr.light td {
background-color: #eee;
border-bottom: 1px solid #ccc;
}
by specifying the 'td', it makes it difficult for theme developers to override this with row settings, e.g:
tr.light {
background-color: #abc;
}
would have no effect. This makes it more complex to style tables, and impossible to create a ruler effect as demoed here (move your mouse over the forum rows):
http://www.cortextcommunications.com/pushbutton/forum
(doesn't work in IE)
Also I can't see the point in specifying .light and .dark rows to be the same colour.
This patch specifies different colours for dark and light classes by row instead of by cell - both in drupal,css and pushbutton CSS. It also restores original colours to the Pushbutton forum, and adds a ruler effect.
| Comment | File | Size | Author |
|---|---|---|---|
| tables.patch | 1.53 KB | robert castelo |
Comments
Comment #1
robert castelo commentedDoes anyone know why this is specified this way in drupal.css:
tr.dark td, tr.light td {
background-color: #eee;
border-bottom: 1px solid #ccc;
}
Why specify light/dark?
Wouldn't "tr td" be enough?
Why specify "tr td"?
Wouldn't it be enough to just specify the row with 'tr'?
Comment #2
Steven commentedPerhaps it was to override the watchdog table's colors? I noticed this when I restored watchdog's coloring.
I'm not sure I like the patch though. We'd have 3 levels of coloring: alternating light/dark rows for non-active columns, and one darkest shade for the active column. Doesn't this look odd?
Comment #3
Steven commentedComment #4
moshe weitzman commentedPushbutton currently has no alternating colors on any of its tables. Thats no good. I think this issue is the right place to log this complaint.
Comment #5
Steven commentedNeither does bluemarine..
I think Kristjan decided not to mix alternating colors with the darkening of an active column. However, I've tried out such a style on my own site and it looks quite okay as long as the difference in brightness between odd/even is smaller than the difference between active/non-active.
Comment #6
moshe weitzman commentedthere are many tables in drupal which are not sortable, and thus have no active column. these tables all pay a price, with no benefit.
Comment #7
robert castelo commentedThere's a strong usability argument for alternating colours on table rows, even for people with 20/20 vision it makes it much easier to scan through a table and take in the content.
Indicating which column the table was sorted by - my vote is to put a left/right border on the column, but don't specify a fill.
Highlighting the table row that the mouse is over improves usability by giving feedback to partially sighted users and users with poor motor skills. This can add up to a significant percentage of visitors if you take the elderly into account.
Comment #8
Uwe Hermann commentedI fully agree. Make this a configurable option, and everbody will be happy ;-)
Comment #9
killes@www.drop.org commentedPatch doesn't apply anymore.
Comment #10
Uwe Hermann commentedDoes anyone still work on this? Please update the status respectively.
Comment #11
chx commentedComment #12
(not verified) commented