-
Notifications
You must be signed in to change notification settings - Fork 30.2k
[Web] Please support a custom stylesheet for platform views #67740
Copy link
Copy link
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Fluttere: web_htmlHTML rendering backend for WebHTML rendering backend for Webplatform-webWeb applications specificallyWeb applications specifically
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Fluttere: web_htmlHTML rendering backend for WebHTML rendering backend for Webplatform-webWeb applications specificallyWeb applications specifically
Flutter Web encapsulates all HTML created via
HtmlElementViewin a shadow DOM of a customflt-platform-viewelement. 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 everyHtmlElementView.Therefore, please support overwriting the
all: initialstyle reset with a different style definition. An easy way would be to pass withShadowRootviagetCreatedViewto the callback, so that I can remove the reset and add my own style elements.