fix: Broken CSS styling for components with underscore class names#3328
fix: Broken CSS styling for components with underscore class names#3328mtrezza merged 2 commits intoparse-community:alphafrom
Conversation
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code. |
📝 WalkthroughWalkthroughAdded a Jest test file to verify webpack's CSS Modules handling for SCSS files, and configured the webpack SCSS loader with Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
## [9.1.1-alpha.1](9.1.0...9.1.1-alpha.1) (2026-04-07) ### Bug Fixes * Broken CSS styling for components with underscore class names ([#3328](#3328)) ([2048abe](2048abe))
|
🎉 This change has been released in version 9.1.1-alpha.1 |
## [9.1.1](9.1.0...9.1.1) (2026-04-07) ### Bug Fixes * Broken CSS styling for components with underscore class names ([#3328](#3328)) ([2048abe](2048abe))
|
🎉 This change has been released in version 9.1.1 |
Issue
After upgrading css-loader from v6 to v7, the sidebar menu and other components with underscore CSS class names (e.g.
section_header,settings_page,stats_label) render with broken styling. Text is visible but illegible because CSS classes are not applied correctly.Approach
css-loader v7 changed the default
exportLocalsConventionto convert underscore class names to camelCase (e.g.section_header→sectionHeader). Since the JS code accesses these via the original underscore notation (styles.section_header), the lookups returnundefinedand no CSS classes are applied.The fix adds
exportLocalsConvention: 'as-is'to the css-loader modules config to preserve original class names, matching the v6 behavior.Tasks
Summary by CodeRabbit
Tests
Chores