Repository navigation
fix: scope css to sui- class prefix - #3304
laurenashpole wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 4 Skipped Deployments
|
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d4f13bd. Configure here.
| border: 0 solid transparent; | ||
| } | ||
|
|
||
| :root { |
There was a problem hiding this comment.
Moved this back out of :where([class*="sui-"]):not(:where([class*="sui-"]) :where([class*="sui-"])) because the robot is right that would cause problems if an app is toggling light/dark mode by applying classes to body.

Description
This PR updates our
reset.cssfile to scope all selectors to classes beginning with.sui-. It also updates the Storybook styling for the light/dark plugin, makes sure text is wrapped in the Text wrapper in all stories, and turns off lightningcss in Storybook (this was causing problems in Chromatic Storybook builds).What to review
Make sure the CSS makes changes make sense.
Testing
I tested this locally making sure to look at:
Note
Medium Risk
Scoped resets change how non-
sui-host pages behave (no global*reset), which can affect embedded UI and third-party markup; Storybook/Chromatic CSS pipeline changes need visual verification.Overview
Scopes the global CSS reset so box model, margin/padding zeroing, form control, media, table, code, and reduced-motion rules apply only inside
sui-class trees instead of the whole document;bodybackground is no longer set in the reset.Storybook picks up page background via
light-dark()onhtml body, appliescolor-schemeto descendants in light/dark mode, addslightningcsswithviteFinalexcludingFeatures.LightDark(to fix Chromatic builds), and updates stories to wrap copy inTextso typography/reset apply—interaction tests now assert onparentElementfordata-ui, tone classes, and tab panel visibility/focus.Reviewed by Cursor Bugbot for commit 77dfc9c. Bugbot is set up for automated code reviews on this repo. Configure here.