Skip to content

[1.0.0-pre.1] configurable for left padding for <li> ? #279

@canisterism

Description

@canisterism

Hi, Thank you for such a great package.
Here I have a question about layout when using <li> of ^1.0.0-pre.1.
I can't figure it out whether I went something wrong, I missed some option or it's just not supported yet. Details down below.

Environment

  • flutter_html: ^1.0.0-pre.1
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.14.5 18F132, locale en-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.43.2)
[✓] Connected device (1 available)

• No issues found!

Steps to reproduce

Here's the code to reproduce.

Html(
  data: '''
    <ul>
      <li>qwertyuiopasdfghjklzxcvbnm</li>
      <li>qwertyuiopasdfghjklzxcvbnm</li>
      <li>qwertyuiopasdfghjklzxcvbnm</li>
      <li>qwertyuiopasdfghjklzxcvbnm</li>
      <li>qwertyuiopasdfghjklzxcvbnm</li>
      <li>qwertyuiopasdfghjklzxcvbnm</li>
    </ul>
  ''',
)

Expected Result

I think this left padding (margin) is a little bit too wide.
I wish to set the list items without left padding and margin.

Actual Result (Visual Proof)

image

You know, I don't need any space before list items. I tried to remove them, setting EdgeInsets.zero to li and ul on style: property like below.

Html(
  data: '...'
  style:  {
    'ul': Style(margin: EdgeInsets.zero, padding: EdgeInsets.zero),
    'li':  Style(margin: EdgeInsets.zero, padding: EdgeInsets.zero),
  }
)

But this didn't work. The padding and margin were left there.
I think this spacing is just an intended specification, following a standard web layout.

Thus, this issue might be a feature request. I hope there would be some way to configure li' s spacing. Or there might be a workaround.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions