fix: remove duplicate css classes#1400
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughWalkthroughThis pull request makes styling-only changes across four Vue components: it removes the Possibly related PRs
Suggested labels
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)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| :aria-pressed="isFacetSelected(facet.id)" | ||
| :aria-label="facet.label" | ||
| class="inline-flex items-center gap-1 px-1.5 py-0.5 font-mono text-xs rounded border transition-colors duration-200 focus-visible:outline-accent/70" | ||
| class="gap-1 px-1.5 rounded transition-colors focus-visible:outline-accent/70" |
There was a problem hiding this comment.
Remove focus-visible:outline-accent/70 — focus styling is applied globally for buttons.
The inline focus-visible:outline-accent/70 utility class contradicts the project's convention. Focus-visible styling for <button> elements is already handled globally via main.css, so this class is unnecessary and may cause inconsistent focus states.
🔧 Suggested fix
- class="gap-1 px-1.5 rounded transition-colors focus-visible:outline-accent/70"
+ class="gap-1 px-1.5 rounded transition-colors"Based on learnings: "In the npmx.dev project, focus-visible styling for buttons and selects is applied globally via main.css... individual buttons or selects in Vue components should not rely on inline focus-visible utility classes like focus-visible:outline-accent/70."
📝 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="gap-1 px-1.5 rounded transition-colors focus-visible:outline-accent/70" | |
| class="gap-1 px-1.5 rounded transition-colors" |
serhalp
left a comment
There was a problem hiding this comment.
Thanks! I've been seeing these warnings locally too :)
All removed CSS classes are already part of the underlying components, causing HTML validator issues due to being duplicates when rendered.