Maybe I missed this whole DataTable discussion, sadly. Still, it seems to
me that instead of affixing a style for every or every-other row, why not
use an nth-child pseudo style?
Substituting the actual table ID for tableID … easy enough to implement
in FWP by creating new style in the Style Editor, pasting the selector into
the TAG field ( #tableID tbody tr:nth-child(odd) ), emptying the NAME
field, then using FWP’s built-in background-color color selector.
Now someone will say “Hey, but that doesn’t work in legacy browsers!” to
which I say “It perfectly satisfies the Legacy User Experience”.
If those folks wanted their content to be attractive, they would use a
modern browser. It’s not our job to force a beautiful world down their
throats
Maybe I missed this whole DataTable discussion, sadly. Still, it seems to me that instead of affixing a style for every or every-other row, why not use an nth-child pseudo style?
The advantage of the datatable.css file is that it has support for striping etc. baked in.
You only need to add a supported class name to expose the feature.
It’s just the markup looks ham-handed and clumsy, with the tbody tr tags
each taking a class. What would I tell people, that I installed this clever
little data-table only to muck it up with inept style code?
Where did this come from anyway, before I stomp too many toes with my
effete opinions?
–
Ernie Simpson
On Thu, Jul 10, 2014 at 2:08 PM, DeltaDave email@hidden wrote:
Maybe I missed this whole DataTable discussion, sadly. Still, it seems to
me that instead of affixing a style for every or every-other row, why not
use an nth-child pseudo style?
The advantage of the datatable.css file is that it has support for
striping etc. baked in.
You only need to add a supported class name to expose the feature.
I added some classes to this table using Walter’s Add Selector action
In the Class field I have ‘order-column stripe row-border hover’
If you are linking to the standard CSS file then these classes will give you what you want - and more if you wish to add them.
Just add the class names with space between them and you will be GTG.
David
Hi Dave,
I’ve already used the Add Selector action to give my table an ID. If I attempt to add something else (such as you suggest) it knocks that out. Or appears to.
I’ve already used the Add Selector action to give my table an ID. If I attempt to add something else (such as you suggest) it knocks that out. Or appears to.
Your adding a Class not another ID
So ‘order-column stripe row-border hover’ goes in the Class field!