Skip to content

[Bug]: placing two different spfx components on one sharepoint page removes the syling for both #27976

Description

@PauwelsYoran

Library

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

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1255U
    Memory: 15.48 GB / 31.64 GB
  Browsers:
    Edge: Spartan (44.22621.1702.0), Chromium (113.0.1774.50)
    Internet Explorer: 11.0.22621.1

Are you reporting Accessibility issue?

None

Reproduction

https://codesandbox.io/s/stupefied-fermat-9gfwe6?file=/src/index.js

Bug Description

Actual Behavior

I created two different spfx webparts, using the latests yeoman gen. Both contain a fluent ui card component.
When placing both on a single sharepoint webpage the styling gets removed from both webparts (see screenshot). Functionally they both still work, just the styling is removed. This is the same effect as if i would remove the fluent provider from my code.

image

it would be the same result as deploying the repro i provided as an spfx webpart twice (so two different onces).
It does not only affect card components but multiple fluent ui components

Expected Behavior

I would like to be able to have both components on one page with styling applied.

Logs

No response

Requested priority

Blocking

Products/sites affected

No response

Are you willing to submit a PR to fix?

yes

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions