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

[BUG] <hr> tag doesn't work as intended when style="width: 20%;" is applied #1394

Open
AlbaneseRemy opened this issue Nov 24, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@AlbaneseRemy
Copy link

Describe the bug:

The < hr > tag (without spaces) doesn't display correctly when style is applied to it. Without width, it shows entirely

HTML to reproduce the issue:

          <div>
            <p>
              Lorem ipsum dolor sit amet
              <hr>
              Lorem ipsum dolor sit amet
              <hr style="width: 20%;">
              Lorem ipsum dolor sit amet
            </p>
          </div>

Html widget configuration:

    return Padding(
      padding: const EdgeInsets.all(5),
      child: SingleChildScrollView(
        child: Html(
          data: """
          <div>
            <p>
              Lorem ipsum dolor sit amet
              <hr>
              Lorem ipsum dolor sit amet
              <hr style="width: 20%;">
              Lorem ipsum dolor sit amet
            </p>
          </div>
          """,
          onLinkTap: (url, _, __) => LinkUtils.openLink(
            context: context,
            closeWhenOpeningLink: data.closeWhenOpeningLink,
            tour: data.tour,
            url: url,
          ),
        ),
      ),
    );

Expected behavior:
The < hr > tag should only display on 20% of the screen's width

Screenshots:
Capture d’écran 2023-11-24 à 16 22 37

Device details and Flutter/Dart/flutter_html versions:
This is compiled on Chrome (Web)

flutter_html: 3.0.0-beta.1

Flutter doctor: 
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.9, on macOS 14.0 23A344 darwin-x64, locale fr)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.84.1)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!
@AlbaneseRemy AlbaneseRemy added the bug Something isn't working label Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

1 participant