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.

CommentFileSizeAuthor
tables.patch1.53 KBrobert castelo

Comments

robert castelo’s picture

Does 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'?

Steven’s picture

Perhaps 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?

Steven’s picture

Assigned: Unassigned » Steven
moshe weitzman’s picture

Title: Pushbutton Forum / Tables » Pushbutton tables missing alternating row colors

Pushbutton 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.

Steven’s picture

Neither 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.

moshe weitzman’s picture

there are many tables in drupal which are not sortable, and thus have no active column. these tables all pay a price, with no benefit.

robert castelo’s picture

There'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.

Uwe Hermann’s picture

I fully agree. Make this a configurable option, and everbody will be happy ;-)

killes@www.drop.org’s picture

Patch doesn't apply anymore.

Uwe Hermann’s picture

Does anyone still work on this? Please update the status respectively.

chx’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)