fix: lower z-index of file path header to prevent overlapping version dropdown#2161
fix: lower z-index of file path header to prevent overlapping version dropdown#2161ghostdevv merged 1 commit intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughWalkthroughA CSS utility class for the sticky header container in the file viewer toolbar has been updated from Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 Tip You can enable review details to help with troubleshooting, context usage and more.Enable the |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3414c4c2-993d-4e6f-b79b-98d27ced7c73
📒 Files selected for processing (1)
app/pages/package-code/[[org]]/[packageName]/v/[version]/[...filePath].vue
| <div class="flex-1 min-w-0 self-start"> | ||
| <div | ||
| class="sticky z-10 top-25 bg-bg border-b border-border px-4 py-2 flex items-center justify-between gap-2 text-nowrap overflow-x-auto max-w-full" | ||
| class="sticky z-5 top-25 bg-bg border-b border-border px-4 py-2 flex items-center justify-between gap-2 text-nowrap overflow-x-auto max-w-full" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify z-index utility usage and UnoCSS theme support.
# Expected:
# 1) `z-5` appears in this page.
# 2) `uno.config.ts` has no custom zIndex theme override enabling `z-5`.
rg -n --type=vue '\bz-5\b|\bz-\d+\b' app/pages/package-code/[[org]]/[packageName]/v/[version]/[...filePath].vue
rg -n 'presetWind4|zIndex|theme' uno.config.tsRepository: npmx-dev/npmx.dev
Length of output: 216
🏁 Script executed:
# Check line 365 in the Vue file (and surrounding context)
head -370 app/pages/package-code/[[org]]/[packageName]/v/[version]/[...filePath].vue | tail -10Repository: npmx-dev/npmx.dev
Length of output: 605
🏁 Script executed:
# Check for z-index utilities in the file (without type specification)
rg -n 'z-\d+' app/pages/package-code/[[org]]/[packageName]/v/[version]/[...filePath].vueRepository: npmx-dev/npmx.dev
Length of output: 218
🏁 Script executed:
# Get full uno.config.ts content
cat uno.config.tsRepository: npmx-dev/npmx.dev
Length of output: 8601
🌐 Web query:
UnoCSS Wind preset default z-index scale values utilities z-0 z-1 z-5
💡 Result:
The UnoCSS Wind preset (now deprecated and renamed to preset-wind3, which inherits from preset-mini) aims for compatibility with Tailwind CSS and Windi CSS z-index utilities. Tailwind CSS defines a standard z-index scale: z-0 (0), z-10 (10), z-20 (20), z-30 (30), z-40 (40), z-50 (50), and z-auto (auto). Multiple sources confirm these values for Tailwind, which the Wind preset emulates. No official UnoCSS documentation explicitly lists the Wind preset's z-index scale values. However, since the preset provides Tailwind CSS compatibility, it generates the same utilities: z-0 = z-index: 0; z-1 is not standard in Tailwind but may generate z-index: 1 via arbitrary values or theme extension; z-5 generates z-index: 5 via arbitrary [z-[5]] or theme extension; standard steps are z-10 = 10, etc. z-1 and z-5 are supported via arbitrary values (e.g., z-[1], z-[5]) or custom theme extensions, as seen in user configs. Official docs direct users to Tailwind/Windi documentation and the interactive docs/source code for full rules.
Citations:
- 1: https://unocss.dev/presets/wind3
- 2: https://unocss.dev/guide/
- 3: https://windframe.dev/tailwind/classes/tailwind-z-ndex
- 4: https://avacdocs.ups.edu.ec/docs/z-index/
- 5: https://unocss.dev/config/layers
- 6: https://unocss.dev/config/
Use a valid UnoCSS z-index utility at line 365.
z-5 is not part of the default Wind4 z-index scale, so this class will be ignored and the sticky header will have no explicit z-index. The proposed z-1 fix is equally invalid—both require arbitrary value syntax or a custom theme extension. Use z-0 instead, which is part of the standard Tailwind scale emulated by Wind4.
Proposed fix
- class="sticky z-5 top-25 bg-bg border-b border-border px-4 py-2 flex items-center justify-between gap-2 text-nowrap overflow-x-auto max-w-full"
+ class="sticky z-0 top-25 bg-bg border-b border-border px-4 py-2 flex items-center justify-between gap-2 text-nowrap overflow-x-auto max-w-full"📝 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.
| class="sticky z-5 top-25 bg-bg border-b border-border px-4 py-2 flex items-center justify-between gap-2 text-nowrap overflow-x-auto max-w-full" | |
| class="sticky z-0 top-25 bg-bg border-b border-border px-4 py-2 flex items-center justify-between gap-2 text-nowrap overflow-x-auto max-w-full" |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
🔗 Linked issue
🧭 Context
📚 Description
before

after
