-
Notifications
You must be signed in to change notification settings - Fork 303
Fix Products dropdown transparency on Thousands of developers section #2743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request removes the devDependency "@sveltejs/adapter-node" from package.json and updates the ProductsSubmenu.svelte component with CSS styling modifications. The component changes include increasing the z-index from z-10 to z-[9999], introducing a new "products-dropdown-bg" class to replace previous wrapper styling, and adding a global style definition for the new class with black/gray background and full opacity. Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/lib/components/ProductsSubmenu.svelte`:
- Around line 233-239: Remove the dead duplicate background-color in the
ProductsSubmenu.svelte style block by deleting the first background-color:
`#000000` declaration so only background-color: `#232325` remains for
.products-dropdown-bg; also evaluate whether the :global(.products-dropdown-bg)
wrapper is necessary—if the class is only used inside this component, replace
:global(.products-dropdown-bg) with a local .products-dropdown-bg selector and
ensure the template applies that class to the element so Svelte's scoped CSS
handles it.
🧹 Nitpick comments (1)
src/lib/components/ProductsSubmenu.svelte (1)
115-115: Use a reasonable z-index value aligned with the project's scale.The
z-[9999]value is excessively high and isolated to this component. The project uses a z-index scale up toz-1000for overlays; usingz-[100]orz-[1000]would be more appropriate. The current value makes it difficult to layer other UI elements (modals, notifications, etc.) above or below the dropdown without further z-index conflicts.Proposed fix
- 'data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in relative !left-1/2 z-[9999] mx-auto mt-6 hidden w-full -translate-x-1/2 flex-col items-center p-0 outline-none [max-inline-size:86.875rem] md:flex' + 'data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in relative !left-1/2 z-[1000] mx-auto mt-6 hidden w-full -translate-x-1/2 flex-col items-center p-0 outline-none [max-inline-size:86.875rem] md:flex'
| <style> | ||
| :global(.products-dropdown-bg) { | ||
| background-color: #000000; | ||
| background-color: #232325; | ||
| opacity: 1; | ||
| } | ||
| </style> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate background-color declaration — first value is dead code.
Line 235 sets background-color: #000000`` which is immediately overridden by #232325 on Line 236. Remove the dead declaration.
Also, consider whether :global() is necessary here. Since the class is applied within this component's template, Svelte's scoped styling (without :global) should work if the class is applied to a direct element in this component.
Proposed fix
<style>
- :global(.products-dropdown-bg) {
- background-color: `#000000`;
+ .products-dropdown-bg {
background-color: `#232325`;
opacity: 1;
}
</style>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <style> | |
| :global(.products-dropdown-bg) { | |
| background-color: #000000; | |
| background-color: #232325; | |
| opacity: 1; | |
| } | |
| </style> | |
| <style> | |
| .products-dropdown-bg { | |
| background-color: `#232325`; | |
| opacity: 1; | |
| } | |
| </style> |
🤖 Prompt for AI Agents
In `@src/lib/components/ProductsSubmenu.svelte` around lines 233 - 239, Remove the
dead duplicate background-color in the ProductsSubmenu.svelte style block by
deleting the first background-color: `#000000` declaration so only
background-color: `#232325` remains for .products-dropdown-bg; also evaluate
whether the :global(.products-dropdown-bg) wrapper is necessary—if the class is
only used inside this component, replace :global(.products-dropdown-bg) with a
local .products-dropdown-bg selector and ensure the template applies that class
to the element so Svelte's scoped CSS handles it.
Fixes #11279
This PR adds an opaque background to the Products dropdown to prevent UI overlap on the “Thousands of developers” section.

Before
After

Summary by CodeRabbit
Chores
Style