laravel / nova-issues

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Active menu item is not styled correctly

maticlahajnar opened this issue · comments

  • Laravel Version: 9.52.16
  • Nova Version: 4.33.1
  • PHP Version: 8.1.1
  • Database Driver & Version: MySQL 8.0.36
  • Operating System and Version: Ubuntu 22.04
  • Browser type and version: Chrome 122.0.6261.111
  • Reproduction Repository: /

Description:

Current active menu item is not styled with primary color, because default text color is always applied, and active is only appended. This goes against Tailwind recommendations, that multiple classes that apply same css rule shouldn't be applied at the same time. At that point, it's guess work which will be applied based on how the underlying css is generated.

image
Here we can see the base text-gray-500 being applied instead of text-primary-500. If we switch to dark mode, the css works.

Fix would be to apply active/inactive styled directly in the :class binding.

image

Detailed steps to reproduce the issue on a fresh Nova installation:

Tough to reproduce as css can be generated differently and the same issue won't show.

Unable to reproduce the issue, please provide full reproducing repository based on fresh installation as suggested in the bug report template (or you can refer to https://github.com/nova-issues for example)

Hey there,

We're closing this issue because it's inactive, already solved, old, or not relevant anymore. Feel free to open up a new issue if you're still experiencing this problem.