How can you add a field value to css?
Copying out the relevant portion of the template:

&lt;tbody&gt;
  &lt;?php foreach ((array) $rows as $row): ?&gt;
    &lt;tr&gt;
      &lt;?php foreach ($row as $cell): ?&gt;
        &lt;td id="&lt;?php print $cell['id']; ?&gt;" class="&lt;?php print $cell['class']; ?&gt;"&gt;
          &lt;?php print $cell['data']; ?&gt;
        &lt;/td&gt;
      &lt;?php endforeach; ?&gt;
    &lt;/tr&gt;
  &lt;?php endforeach; ?&gt;
&lt;/tbody&gt;


If you want the &lt;td&gt; wrapping your cell to have an additional class based upon what is inside that cell, you will need to do something like this:

&lt;tbody&gt;
  &lt;?php foreach ((array) $rows as $row): ?&gt;
    &lt;tr&gt;
      &lt;?php foreach ($row as $cell): ?&gt;
        &lt;?php
          $new_class= // grab information out of $cell['data']
        ?&gt;
        &lt;td id="&lt;?php print $cell['id']; ?&gt;" class="&lt;?php print $cell['class'] . ' ' .  $new_class; ?&gt;"&gt;
          &lt;?php print $cell['data']; ?&gt;
        &lt;/td&gt;
      &lt;?php endforeach; ?&gt;
    &lt;/tr&gt;
  &lt;?php endforeach; ?&gt;
&lt;/tbody&gt;


If it's not easy to do, $cell['data'] is probably HTML since it is just being printed, you do have the entire $view object to work with, and there, you can grab stuff out of $view-&gt;result and correlate that to these cells.