Problem/Motivation

When I pass a render array with a table, the columns are all "smushed" together and the odd/even classes that enable striping are now put on the rows. When i pass the same render array to other themes, the table looks just fine.

Steps to reproduce

Here is the render array:

$header = [
'col1' => t('COL1'),
'col2' => t('COL2'),
];
$rows = [
['test col 1', 'test'],
['test col 1', 'test'],
['test col 1', 'test'],
];
return [
'#theme' => 'table',
'#width' => '600px',
'#header' => $header,
'#rows' => $rows,
];
And here is what the returned table looks like:

COL1 COL2
test col 1 test
test col 1 test
test col 1 test

The same render array passed to, for example, the Bartik them produces a table that looks just fine.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

wdseelig created an issue. See original summary.

wdseelig’s picture

Category: Bug report » Support request

I fixed this issue with a little CSS, so I think the developers can ignore it.

ankit.maurya made their first commit to this issue’s fork.