- last update
about 1 year ago 30,488 pass
The HTML for the table cell should look something like:
<td class="views-field views-field-title" headers="view-title-table-column">
<p class="p-class">
<a href="/node/2">title2</a>
</p>
</td>
<td class="views-field views-field-title p-class" headers="view-title-table-column">
<p>
<a href="/node/2">title2</a>
</p>
</td>
The custom class is being placed on the wrapper table cell rather than the HTML element being specified. If you switch to unformatted list style, the class is correctly applied to the P element.
If I am specifying the element I want to wrap the field, the option just below it to specify a class seems like it would apply to that element, not the parent table cell. And it doesn't seem like this behavior should change based on the display style, as it does now.
This behavior is also present in views contrib in Drupal 7.x-3.x. It is related to #1368436: Customize field HTML css class with multiple fields in a column β , though that is about what happens to classes on combined fields, whereas this appears to any and every field within a table style.
Needs work
11.0 π₯
Last updated
Related to the Views in Drupal Core initiative.
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.
Take part in Pantheon's 2021 Gift of Open Source - all contributions and expertise levels welcome!
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.