Revert: Fix CSS variable conflicts between ObjectUI and fumadocs#153
Revert: Fix CSS variable conflicts between ObjectUI and fumadocs#153
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…age exports Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
📦 Bundle Size Report
Size Limits
|
|
✅ All checks passed!
|
|
@copilot 首页样式崩了,会不会是样式冲突 |
There was a problem hiding this comment.
Pull request overview
This pull request fixes a critical styling issue where ObjectUI component styles were not loading in fumadocs documentation, causing interactive demos to render without proper Tailwind/Shadcn styling (missing borders, colors, spacing).
Changes:
- Added CSS file exports to
@object-ui/componentspackage.json to make styles importable by consuming applications - Imported ObjectUI component CSS in the documentation site's global.css before fumadocs theme CSS to ensure proper style cascade
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/components/package.json | Added CSS export paths (./index.css, ./dist/index.css) and maintained backward compatibility with legacy ./dist/style.css path |
| apps/site/app/global.css | Imported @object-ui/components/index.css before fumadocs theme CSS to ensure ObjectUI styles load first |
| "./dist/index.css": "./dist/index.css", | ||
| "./dist/style.css": "./dist/index.css" |
There was a problem hiding this comment.
The package.json exports have been updated to use index.css instead of style.css, but the README documentation still references the old path @object-ui/components/dist/style.css on line 46. For consistency, the README should be updated to document the new recommended import path @object-ui/components/index.css to match the new exports structure.
| "./dist/index.css": "./dist/index.css", | |
| "./dist/style.css": "./dist/index.css" | |
| "./dist/index.css": "./dist/index.css" |
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
|
✅ All checks passed!
|
The initial fix caused CSS variable conflicts that broke the homepage styles. This PR reverts those changes.
Problem
The initial attempt to fix missing styles added
@import '@object-ui/components/index.css';to global.css, which caused the homepage to break due to CSS variable conflicts:--background,--foreground,--primary, etc.)--fd-background,--fd-foreground,--fd-primary, etc.)Discovery
After investigation, the plugin demo pages already work correctly without the CSS import - they use fumadocs' CSS variables and render properly.
Changes
apps/site/app/global.csspackages/components/package.jsonResult
Homepage (Fixed):

Plugin Demos (Working):

All pages now display correctly:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.