First, for overall general CSS styling, I think the easiest solution is to educate report designers to wrap their HTML table output in a div of their own creation. This way they can easily style the general structure in whatever manner they see fit. e.g.
<style type="text/css">
div.my-ruport-table table {
border: thin solid green;
}
div.my-ruport-table td {
border: thin solid red;
}
<div class="my-ruport-table">
<%= result_html %>
</div>
Beyond that, I believe it would be most useful to give the report designer control over the id and class attributes for the table, rows, columns, and cells. I don't currently know the best place for this control to exist, but it should allow solving problems such as:
- use even/odd classes to alternate background color of rows (this is such a common case, it might even be worth a pre-made option).
- give columns their class names based on normalized column names. This could allow someone to write a rule to highlight the column "total".
- evaluate tests against the individual field values and give ids or class names based on those tests. This could allow someone to give negative values a red color.
