useCss individual column styles bug
Hey so loving the package ! One thing I am noticing is that when using the useCss flag, not all columns styles are respected. It seems to add combine all individual column styles and apply to each column of the row ?
for example if I have a row where the first column's background is explicitly set to blue, and no other columns have the background color. When printing all of the columns now have the background of blue.
from debugging it seems like this line which combines the styles is causing individual column styling to be over ridden
styles: useCss ? polyfills_1.assign(rowStyles, cellStyles) : null, in -> parseTableSection
@simonbengtsson I'm noticing that in this code here
for (let i = 0; i < row.cells.length; i++) {
let cell = row.cells[i];
let style = window.getComputedStyle(cell);
if (includeHidden || style.display !== "none") {
let cellStyles = useCss ? parseCss(cell, state().scaleFactor()) : {};
resultRow.push({
rowSpan: cell.rowSpan,
colSpan: cell.colSpan,
styles: useCss ? assign(rowStyles, cellStyles) : null,
content: cell
});
}
}
the style variable
let style = window.getComputedStyle(cell);
is never used ?
#439
👍
Fix included in 3.0.5