Skip to content

[FEATURE] Support for max-width #1334

Open
@TheCarpetMerchant

Description

@TheCarpetMerchant

It would be nice to have support for max-width:100%, so that images that have a set width don't get rendered bigger then the screen.

Code I used to test things out :

import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';

void main() {
  runApp(
    MaterialApp(
      home: Scaffold(
        body: Html(
          data: '<img style="width:800px;max-width:5%" src="https://cdn.discordapp.com/attachments/840351500010258474/968560163382521946/2022-03-31_14-16-27_0503.jpg"/>',
        ),
      ),
    ),
  );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions