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

Bulletpoints not vertically centered in unordered list #141

Closed
besserwisser opened this issue Aug 13, 2019 · 5 comments · Fixed by #122
Closed

Bulletpoints not vertically centered in unordered list #141

besserwisser opened this issue Aug 13, 2019 · 5 comments · Fixed by #122
Milestone

Comments

@besserwisser
Copy link

besserwisser commented Aug 13, 2019

When using the unordered List with a custom font size, the position of the bullet points is off:

Screenshot 2019-08-13 at 16 43 23

Html:

<ul>
  <li>machine,</li>
  <li>mold,</li>
</ul>

Flutter:

Html(
  data: widget.text,
  useRichText: true, 
  customTextStyle: (dom.Node node, TextStyle baseStyle) {
    return baseStyle.merge(TextStyle(fontSize: 18));
  },
),

Is there any chance that I can get the bullet points to work with any font size? What can I alternatively do as a workaround?

Thank you!

@besserwisser besserwisser changed the title Bulletpoints not centered in unordered list Bulletpoints not vertically centered in unordered list Aug 13, 2019
@besserwisser
Copy link
Author

Alright, I found the issue in the rich_text_parser.dart. The BlockText Widget does not style the leadingChar accordingly. I will try to make a pull request with a leadingCharStyle argument for the BlockText constructor and passing in the nextContext.childStyle.

@besserwisser
Copy link
Author

Here is the pull request

#142

@amake
Copy link
Contributor

amake commented Aug 29, 2019

#148 may fix this without having to change the style of the bullet point, by making it use the correct baseline. But if you think it's also appropriate to have some styling affect the bullet point then this issue (and #142) are also valid.

@Sub6Resources Sub6Resources mentioned this issue Oct 2, 2019
20 tasks
@Sub6Resources Sub6Resources added this to the 1.0.0 milestone Dec 17, 2019
@RafaRuiz
Copy link

Currently happening on 2.2.1

@OPdarmawan
Copy link

image
same goes with ordered list

using version 3.0.0-alpha6

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

Successfully merging a pull request may close this issue.

5 participants