Skip to content

[Feature]: v9 FluentProvider has no way to apply dark theme to body #23626

Open
@dzearing

Description

Library

React Components / v9 (@fluentui/react-components)

Describe the feature that you would like added

When we build web apps which use dark theme, body needs to be dark themed, with the right default bg/fg colors, as well font family/size/weight. We need FluentProvider to apply the theme props to the body element on demand.

In v8 and prior, we had a prop called applyTo which allowed the theme to be targeted at the body element. This was how the root provider could apply the theme to the full app. (The default behavior would still be contained, however.)

It would be great to just have this prop as well in v9. It would simplify transitioning to the new provider, and solve a major issue with v9.

Have you discussed this feature with our team

Discussed with a few people who didn't know.

Additional context

I found this using the theme provider. I exported a dark mode example. Most of the example page was light colored, which feels pretty busted. Nobody wants a half dark mode app.

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions