Skip to content

[BUG]Can't change the background color of an iframe #1230

Open
@CpHeat

Description

@CpHeat

Describe the bug:
Not sure if it is a bug but I understood we should be able to set styles for iframes and it works to some extent but I can't get the background-color to change to anything else than white

HTML to reproduce the issue:
data: '''

<iframe width="400" src="my-widget-url" width="100%" height="120" frameBorder="0">
</iframe>

''',
style: {
"body": Style(margin: EdgeInsets.zero, padding: EdgeInsets.zero),
"iframe": Style(backgroundColor: Colors.pink),
}

Expected behavior:
The iframe contains a rounded widget, so the background behind it should be pink but is white instead

Device details and Flutter/Dart/flutter_html versions:
API 33, flutter_html 2.2.1

A picture of a cute animal (not mandatory but encouraged)
IMG_20221207_220647

Metadata

Metadata

Assignees

No one assigned

    Labels

    <iframe>Issues with the <iframe> tagbugSomething isn't workingcssEnhancements/issues with css properties

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions