Skip to content

[BUG] line-height causes list misalignment #1100

@abcdsxg

Description

@abcdsxg

Describe the bug:

add line-height css causes list misalignment

HTML to reproduce the issue:

<style>
  .content {
    line-height: 2;
  }
</style>
<div class="content">
  <p>1</p>
  <p>2</p>
  <p>3</p>
  <ol>
    <li>11</li>
    <li>22</li>
  </ol>
</div>

Html widget configuration:

Html(
        data:
            '<style>.content {line-height:2;}</style><div class="content"><p>1</p><p>2</p><p>3</p><ol><li>11</li><li>22</li></ol></div>',
      )

Expected behavior:

Screenshots:

in chrome:
image

in flutter:
image

Device details and Flutter/Dart/flutter_html versions:

flutter_html: ^2.2.1

Stacktrace/Logcat

Additional info:

A picture of a cute animal (not mandatory but encouraged)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglistsIssues with <ol>, <ul>, and <li>

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions