fix: 背景图模式下对下拉弹出层使用毛玻璃 - #344
Merged
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
嘿——我发现了 1 个问题
面向 AI 代理的提示
请处理这次代码审查中的评论:
## 单独评论
### 评论 1
<location path="src/index.css" line_range="524" />
<code_context>
+ --mxu-bg-primary: color-mix(in srgb, var(--color-bg-primary) 88%, transparent);
+ --mxu-bg-secondary: color-mix(in srgb, var(--color-bg-secondary) 88%, transparent);
+ --mxu-bg-tertiary: color-mix(in srgb, var(--color-bg-tertiary) 88%, transparent);
+ --mxu-bg-hover: color-mix(in srgb, var(--color-bg-hover) 88%, transparent);
+ backdrop-filter: blur(12px);
+}
</code_context>
<issue_to_address>
**issue (bug_risk):** 下拉菜单悬停透明度从未应用于实际的选项元素:调用方使用了诸如 `hover:bg-bg-hover` 这样的 Tailwind 类,但 CSS 覆盖规则只匹配带有字面量 `bg-bg-hover` 类的元素。因此,将鼠标悬停在选项上时,使用的是不透明的 `var(--color-bg-hover)`,而不是预期的 88% 透明度的磨砂颜色。
**触发条件:** 启用背景图片后,用户将鼠标悬停在下拉菜单选项上。
**建议修复:** 定位生成的悬停类(例如 `.has-background-image .hover\:bg-bg-hover:hover`),或者在 `.mxu-dropdown-surface` 上覆盖 `--color-bg-hover`,使现有的 Tailwind 悬停工具类解析为磨砂颜色。
```suggestion
.has-background-image .hover\:bg-bg-hover:hover {
```
</issue_to_address>Original comment in English
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/index.css" line_range="524" />
<code_context>
+ --mxu-bg-primary: color-mix(in srgb, var(--color-bg-primary) 88%, transparent);
+ --mxu-bg-secondary: color-mix(in srgb, var(--color-bg-secondary) 88%, transparent);
+ --mxu-bg-tertiary: color-mix(in srgb, var(--color-bg-tertiary) 88%, transparent);
+ --mxu-bg-hover: color-mix(in srgb, var(--color-bg-hover) 88%, transparent);
+ backdrop-filter: blur(12px);
+}
</code_context>
<issue_to_address>
**issue (bug_risk):** The dropdown hover opacity is never applied to the actual option elements: callers use Tailwind classes such as `hover:bg-bg-hover`, but the CSS override only matches elements with the literal `bg-bg-hover` class. Consequently, hovering an option uses the opaque `var(--color-bg-hover)` instead of the intended 88%-opacity frosted color.
**Triggers:** When a background image is enabled and the user hovers a dropdown option.
**Suggested fix:** Target the generated hover class (for example `.has-background-image .hover\:bg-bg-hover:hover`) or override `--color-bg-hover` on `.mxu-dropdown-surface` so the existing Tailwind hover utility resolves to the frosted color.
```suggestion
.has-background-image .hover\:bg-bg-hover:hover {
```
</issue_to_address>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修改前


修改后


opus5.0
Made with Cursor
Sourcery 总结
通过为弹出菜单应用一致的半透明表面和背景模糊效果,提升其在背景图片上的下拉菜单可读性。
Bug 修复:
增强功能:
Original summary in English
Sourcery 总结
改进背景图片模式下的下拉菜单表面样式,使菜单更加清晰且保持一致。
Bug 修复:
增强功能:
Original summary in English
Sourcery 总结
改进背景图片模式下的浮动 UI 表面,在保留半透明视觉风格的同时,确保覆盖层内容清晰易读。
Bug 修复:
增强功能:
Original summary in English
Summary by Sourcery
Improve floating UI surfaces in background-image mode to keep overlays readable while preserving the translucent visual style.
Bug Fixes:
Enhancements: