pnp / pnp/sp-dev-fx-controls-react

CSS encapsulation broken in FilePicker (v3.24.0)

Open
#2,109 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
433
Forks
418
Avg merge
5d 6m
Merged PRs (30d)
19

Description

Category

Bug

Version

3.24.0

Expected / Desired Behavior / Question

Styles in FilePicker should be scoped (CSS modules), e.g.:
.header_xxxxx { ... }

Observed Behavior

After upgrading to 3.24.0, styles are no longer scoped and appear as global:
.header { clip: rect(0,0,0,0); }

Steps to Reproduce
  • SPFx 1.21.1 project

  • Install:
    npm install @pnp/spfx-controls-react@3.24.0

  • Use FilePicker

  • Run:
    gulp bundle --ship

  • Check release/assets/chunk.*.js → styles are not scoped

Check the attachments

Image Image

Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with FilePicker in an SPFx 1.21.1 project using @pnp/spfx-controls-react@3.24.0, then run gulp bundle --ship. Inspect release/assets/chunk.*.js and compare the generated selectors with the expected CSS-module form; done means FilePicker styles are scoped rather than global.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.