You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Borders on table cells are unexpectedly inherited by underlying text. I suspect this is a regression as #1037 shows borders rendering as expected. I did not find a workaround by playing with styles, but this seems correctable by changing
style: child.style, //TODO updated this. Does it work?
to only apply the inherited styles to the child:
style: child.style.copyOnlyInherited(
Style()), //TODO updated this. Does it work?
HTML to reproduce the issue:
This repros with the table provided in #1037 and also with the following HTML (abridged for brevity).
<tableclass='details_table'><tbody><trclass='about_line1'><tdclass='about_col1' valign=top>Name</td><tdvalign=top><fontface="monospace">Point Chauncey, 1.3 mi east of (depth 7 ft), San Francisco Bay, California Current</font></td></td><tr><tdclass='about_col1' valign=top>In file</td><tdvalign=top><fontface="monospace">harmonics-dwf-20210110-free.tcd</font></td></td><tr><tdclass='about_col1' valign=top>Station ID context</td><tdvalign=top><fontface="monospace">NOS</font></td></td><tr><tdclass='about_col1' valign=top>Station ID</td><tdvalign=top><fontface="monospace">SFB1309_11</font></td></td><tr><tdclass='about_col1' valign=top>Date imported</td><tdvalign=top><fontface="monospace">2021-01-05</font></td></td></tbody></table>
Device details and Flutter/Dart/flutter_html versions:
Flutter 3.6.0-1.0.pre.3
Dart SDK version: 2.19.0-377.0.dev
flutter_html: ^3.0.0-alpha.6
flutter_html_table: ^3.0.0-alpha.4
Additional info:
Let me know if you want a pull request for this line, though guidance towards finding/adding a pertinent test would be appreciated. Totally understand if there's a better way to fix this though.
A picture of a cute animal (not mandatory but encouraged)
The text was updated successfully, but these errors were encountered:
Describe the bug:
Borders on table cells are unexpectedly inherited by underlying text. I suspect this is a regression as #1037 shows borders rendering as expected. I did not find a workaround by playing with
styles
, but this seems correctable by changingflutter_html/packages/flutter_html_table/lib/flutter_html_table.dart
Line 120 in c75e0df
to only apply the inherited styles to the child:
HTML to reproduce the issue:
This repros with the table provided in #1037 and also with the following HTML (abridged for brevity).
Html
widget configuration:To repro with #1037, the
style
section can be commented out.Expected behavior:
CSS border style shouldn't be inherited, so text spans shouldn't receive their own borders.
Screenshots:
At
master
:With the patch to only apply inherited styles to cell children:
What the table in #1037 looks like at
master
:With patch:
Device details and Flutter/Dart/
flutter_html
versions:Additional info:
Let me know if you want a pull request for this line, though guidance towards finding/adding a pertinent test would be appreciated. Totally understand if there's a better way to fix this though.
A picture of a cute animal (not mandatory but encouraged)
The text was updated successfully, but these errors were encountered: