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

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

Closed
canisterism opened this issue May 6, 2020 · 3 comments · Fixed by #537
Closed

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

canisterism opened this issue May 6, 2020 · 3 comments · Fixed by #537

Comments

@canisterism
Copy link

canisterism commented May 6, 2020

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.

@kassanj
Copy link

kassanj commented Jul 22, 2020

I agree, this would be nice to have.

@DFelten
Copy link
Contributor

DFelten commented Aug 11, 2020

Same problem here. I've tried a few things, but unfortunately couldn't find a workaround.

@Merthan
Copy link

Merthan commented Oct 12, 2020

Um... for some reason my list of

  • tags all had different padding
  • . on the left side like
  • this but setting the padding to 0 like you did fixed it

    It didn't fix your problem but it fixed my (kind of unrelated) problem, so thanks.

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