Skip to content

[Web] Please support a custom stylesheet for platform views #67740

@sma

Description

@sma

Flutter Web encapsulates all HTML created via HtmlElementView in a shadow DOM of a custom flt-platform-view element. The shadow DOM automatically get a style reset attached before the HTML element is added. This makes external customization of the HTML very difficult if not impossible. This is by design, I guess, but I'd like to globally customize the styles via an external .css file and not use inline styles for my HTML in each and every HtmlElementView.

Therefore, please support overwriting the all: initial style reset with a different style definition. An easy way would be to pass with ShadowRoot via getCreatedView to the callback, so that I can remove the reset and add my own style elements.

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Fluttere: web_htmlHTML rendering backend for Webplatform-webWeb applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions