Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<table>'s background is set on the text style and not on the whole table cell #330

Closed
canisterism opened this issue Jun 17, 2020 · 1 comment

Comments

@canisterism
Copy link

I have HTML like below:

<table>
  <colgroup>
    <col width="30%"/>
    <col width="70%"/>
  </colgroup>
  <tr>
    <th>AAAAAAAAAAAAAAAAAAAAAAAAAAAA</th>
    <td>B</td>
  </tr>
  <tr>
    <th>A</th>
    <td>BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB</td>
  </tr>
</table>

And my styles are like this:

final Map<String, Style> htmlStyles = {
  'table': Style(
    backgroundColor: MyColors.backGroundColor,
    border: Border.all(color: MyColors.surfaceOverlay),
  ),
  'th': Style(
    display: Display.INLINE,
    alignment: Alignment.center,
    backgroundColor: MyColors.lightGrey,
    padding: const EdgeInsets.all(8),
  ),
  'td': Style(
    display: Display.INLINE,
    backgroundColor: MyColors.backGroundColor,
    padding: const EdgeInsets.all(8),
  ),
};

Then the screen would be:
image

But I expected the left-bottom cell (having 'A') to expand to the table's bottom line. Its height is just the same as its text-height.

Please let me know if there's any workaround or I went wrong.

@erickok
Copy link
Collaborator

erickok commented Feb 8, 2021

Let us know if this is still blocking for you on our master branch, where we fixed this via #484.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants