Skip to content

[docs] Add a CSS Modules to StyleX migration playbook - #1812

Open
ahmedsadid wants to merge 1 commit into
facebook:mainfrom
ahmedsadid:codemod-skills/v1
Open

[docs] Add a CSS Modules to StyleX migration playbook#1812
ahmedsadid wants to merge 1 commit into
facebook:mainfrom
ahmedsadid:codemod-skills/v1

Conversation

@ahmedsadid

@ahmedsadid ahmedsadid commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

What changed / motivation ?

  • Adds a conservative CSS Modules-to-StyleX migration playbook for LLM agents.
  • Covers inventory, safe conversion, blocker reason codes, declaration conservation, and verification.
  • Embeds the guide on the LLM Resources page using the existing scrollable copy interface.

Linked PR/Issues

Fixes #1810

Validation

Read every declaration in 40 CSS Modules files from two pinned OSS repos and recorded which can be safely converted. The rest must stay in CSS: their rendering depends on something the component doesn't own — an externally targeted class name, a DOM position, a consumer-overridable custom property — so converting them silently changes the page. We then ran the playbook once per file with gpt-5.6-sol.

Repository Declarations Safe to convert Converted
Docusaurus 269 68 64
Umami 383 325 325
Total 652 393 389 (99%)

Zero unsafe conversions — nothing that should have stayed in CSS was converted. All 652 declarations accounted for.

Convertibility is a property of the codebase, not the playbook: Docusaurus is a published theme whose class names are a public API (25% convertible), Umami a self-contained app (85%).

Additional Context

image

Pre-flight checklist

@vercel

vercel Bot commented Aug 15, 2026

Copy link
Copy Markdown

@ahmedsadid is attempting to deploy a commit to the Meta Open Source Team on Vercel.

A member of the Team first needs to authorize it.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 15, 2026
@ahmedsadid
ahmedsadid marked this pull request as ready for review August 16, 2026 04:22
@nowshin-108
nowshin-108 self-requested a review August 16, 2026 04:38

@nowshin-108 nowshin-108 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I'll let @mellyeliu weigh in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs] Add a CSS Modules to StyleX migration playbook

3 participants